At Wed, 4 Feb 2004 15:24:30 -0500, Daniel Jacobowitz wrote: > > I did indeed have a copy of libdl.so in /usr/lib: > > > pwd > > /fs/mama/usr/lib > > > ls -l libdl* > > -rw-r--r-- 1 root root 10752 Jan 20 09:29 libdl.a > > lrwxrwxrwx 1 root root 20 Jan 23 11:08 libdl.so -> > > ../../lib/libdl.so.2 > > > > I renamed it and tried my compile again: > > > mv libdl.so libdl.so.dpkg-horked > > ~/tmp $ cc -o cftest cftest.c -ldl > > /tmp/cceQnY35.o(.text+0x20): In function `main': > > : warning: Using 'dlopen' in statically linked applications requires at > > runtime the shared libraries from the glibc version used for linking > > ~/tmp $ ./cftest || echo gar > > ~/tmp $ > > > > So it looks as though that worked, although I'm baffled by it, since it > > was a symlink to the one in /lib. However, gcc still isn't happy about > > something. Both libc6 and libc6-dev are version 2.3.3ds1-11. > > > > Thank you! > > Wait, that's not right. The libdl.so -> ../../lib/libdl.so.2 symlink > is correct. But it should not trigger static linking. > > Something else on your system is badly broken to produce this behavior.
I have no problem with this example program cftest.c: [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> gcc -o cftest cftest.c -ldl [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> BTW, moving libdl.so.2 from /usr/lib shows: [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> sudo mv /usr/lib/libdl.so /tmp [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> gcc -o cftest cftest.c -ldl /tmp/cciygHsT.o(.text+0x20): In function `main': : warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> sudo mv /usr/lib/libdl.a /tmp [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> gcc -o cftest cftest.c -ldl [EMAIL PROTECTED]:~/debian/glibc/bugs/231024> So I think Neale's environment got something broken. Please reinstall your gcc, glibc, and so on. Regards, -- gotom