[lsb-discuss] Missing symbols when using ifort for mixed C/Fortran
craig.scott at csiro.au
Fri Jan 7 18:12:07 PST 2011
Ran into an interesting problem today. I have a 64-bit machine (SLED 11) on which I'm building some mixed C/Fortran code using the intel ifort compiler. This particular combination builds fine with ifort/gcc on various platforms (32- and 64-bit, various flavours of linux). However, if I build the C parts with the lsbcc compiler instead, then when ifort goes to link a program I see the following error:
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crt1.o: In function `_start':
/usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:106: undefined reference to `__libc_csu_fini'
/usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:107: undefined reference to `__libc_csu_init'
The command that leads to this is:
/opt/intel/Compiler/11.1/064/bin/intel64/ifort -assume old_logical_ldio -O3 -o someapp someapp.f -L`pwd` -lpgplot -L/opt/lsb/lib64-4.0 -lX11
Since this problem is specific to using the lsbcc compiler in this context, I thought I'd ask if anyone here has any ideas about what might be going on. The only references I can find online to something vaguely like this talk about a missing 32-bit glibc library, but I'm not yet convinced this applies here (and if it did, I'm not sure how we could deal with it in a LSB-friendly way).
Let's not worry about whether the resulting binary would actually be LSB-compatible just yet. Just getting it to build is step 1, after which I can then check if any non-LSB symbols exist in the resultant binaries.
Dr Craig Scott
Computational Software Engineering Team Leader, CSIRO (CMIS)
More information about the lsb-discuss