I am trying to statically link a program on a RH9 system with the 7.1 icc compiler. From this forum I found out that I need to copy an older version of glibc somewhere. I did as suggested and got glibc-2.2.93-5 from RH8 and installed
to include the libraries. I can compile programs now and they run fine. In order to statically link my program I also installed
included -L/opt/intel/old_libs/usr/lib in icc.cfg and changed the above libc-2.2.93.so to
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
GROUP ( /opt/intel/old_libs/lib/libc2.2.93.so /opt/intel/old_libs/usr/lib/libc_nonshared.a )
I still can't statically link my program though. I get all sorts of errors along the lines of:
/usr/lib/libc.a(dl-libc.o)(.text+0xb4): In function `__libc_dlclose':
: multiple definition of `__libc_dlclose'
/opt/intel/old_libs/usr/lib/libc-2.2.93.a(dl-libc.o)(.text+0xac): first defined here
Why would the linker even try to look for /usr/lib/libc.a? I must confess that I really don't know what I am doing here, so I might be doing something really stupid. Could someone please hint me in the right direction?
Thanks a lot,