[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#231024: libc6-dev: unresolved symbols for -ldl



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:

	gotom@moog:~/debian/glibc/bugs/231024> gcc -o cftest cftest.c -ldl
	gotom@moog:~/debian/glibc/bugs/231024> 

BTW, moving libdl.so.2 from /usr/lib shows:

	gotom@moog:~/debian/glibc/bugs/231024> sudo mv /usr/lib/libdl.so /tmp
	gotom@moog:~/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
	gotom@moog:~/debian/glibc/bugs/231024> sudo mv /usr/lib/libdl.a /tmp
	gotom@moog:~/debian/glibc/bugs/231024> gcc -o cftest cftest.c -ldl
	gotom@moog:~/debian/glibc/bugs/231024> 

So I think Neale's environment got something broken.  Please reinstall
your gcc, glibc, and so on.

Regards,
-- gotom




Reply to: