ITEM: J4871L

Can't get fortran to link in files.



        Fortran level 2.3.0.23 with U491193 and U491194.  Files that
cannot be accessed are:
        ImInitialize
        __Iconv_open
        ImIoctl
        ImlookupString
        Imfilter
        Imcreate 
Initially had the error fcodeR2 not found in ksh.
Tried to statically link executable and now get the above errors. When
someone with another machine tries to run it it says symbols
undefined.
        Had him fax his linking line. He seems to have the libraries that
are need to fix part of these error messages. It seems that these messages
have to do with AIX. Found out the program is a graphical based program
that draws graphical context. He can compile and execute this code on
a two different machines: one at 3.2.5 and one at 3.2.3. Asked him to
link in the library libIM.a (-lIM) and -liconv to see if this resolves messages.
        Linking these messages resolved the linking and executable errors.

        He's encountered the age old problem of backward 
compatability.  If he statically links his FORTRAN code on 3.2.5 and tries to
execute it on an earlier version of the OS, he gets undefined symbols in the
kernel.  If he tries to use the dynamic versions of the libraries, he has
problems if the run-time libraries are at different levels. 
        Now when he tries to run the executable that statically linked his 
application on 3.2.5 and his customer is running 3.2.3.  The customer is getting
an exec format error when he tries to run his application because of undefined
symbols from the kernel (namely _system_configuration and _fp_trapstate_ker).  

Response:

 I suggested that his application use a
shared version of the c library, but a static copy of everything else.
To do this, we made these changes to their build procedure:

1) execute the command
      ld -r -o tmp.o -bnso -lXt -lX11 -lxlf -lIM -liconv

2) place this command before the final link in their makefile

3) change the final link, and remove these components:
      -bnso -bI:/lib/syscalls.exp -lXt -lX11 -lIM -liconv

4) add the tmp.o object where the other libraries used to be listed.
   Since xlf is used to perform the link, the shared version of -lxlf
   will fall _after_ tmp.o on the command line, and the static copy
   will be used.  Since -lm is static, it will be included in the
   link as well.

Since -lc remains shared, and was not included in step 1 above, the
application will rely upon the copy of libc found on the machine.
This copy will hide any difference in kernel symbols that the
application is not concerned about.



Support Line: Can't get fortran to link in files. ITEM: J4871L
Dated: June 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:43
Comments or suggestions? Contact us