[lug] Odd linking errors

Riggs, Rob RRiggs at doubleclick.net
Wed Feb 20 09:59:30 MST 2002


I'm receiving the following errors when linking some executable
applications:

/lib/libc.so.6: undefined reference to `_dl_out_of_memory at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_clktck at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_argv at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_check_map_versions at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_debug_mask at GLIBC_2.2.3'
/lib/libc.so.6: undefined reference to `_dl_load_lock at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_init_all_dirs at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_debug_printf at GLIBC_2.2.3'
/lib/libc.so.6: undefined reference to `_dl_init at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_all_dirs at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_nloaded at GLIBC_2.2'
/lib/libc.so.6: undefined reference to `_dl_pagesize at GLIBC_2.2'

Now, I've seen similar errors reported on a few lists, but no one seems to
have an adequate answer as to what causes it. The workaround that I've come
up with is to explicitly link to ld-linux.so.2 at the very end of the linker
command line. 

However, when running the linker with verbose output, I see that it does
indeed link with ld-linux.so.2, but at the beginning.

collect2 version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) (i386 Linux/ELF)
/usr/bin/ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 ....

I'm running Red Hat 7.1 with the latest patches.

This doesn't occur in most cases. For instance I haven't had any problems
with stock SRPMS failing to compile and link. This is only occuring with an
in house app that I am looking at porting from Solaris.

Any clue as to what would cause this problem?

-Rob




More information about the LUG mailing list