[uClibc]problems linking libz

Todd Sundsted toddx503 at yahoo.com
Sat May 11 03:05:01 UTC 2002


I have been fighting with this problem for the last several days.  I am trying
to link a simple program with a version of libz.so that I built with uClibc but
I can't get the linker to pick up my version of libz.so -- it insists on
picking up the version installed in /lib.

Here's the rundown:

1) I compiled and installed uClibc (in /usr/i386-linux-uclibc/)
2) I changed my path to include /usr/i386-linux-uclibc/bin
3) I built and installed libz in /usr/local
4) I built a small test program that calls deflate()
5) I compiled and linked with:
   gcc -o foo foo.c -I/usr/local/include -L/usr/local/lib -lz
6) ldd reports:
   libz.so.1 => /lib/libz.so.1
   libc.so.0 => /usr/i386-linux-uclibc/lib/libc.so.0
   /usr/i386-linux-uclibc/lib/ld-uClibc.so.0 =>
/usr/i386-linux-uclibc/lib/ld-uClibc.so.0
   libc.so.6 => /lib/libc.so.6
   ld-linux.so.2 => /lib/ld-linux.so.2

I have tried compiling and linking separately and even invoking the linker
directly with the same results.  A month or two ago, someone wrote in with the
same problem.  The suggested solution was to install libz in the same
installation directory as uClibc.  I tried this, but it did not fix the
problem.

I'm sure I'm missing something obvious.  Any suggestions would be appreciated.

Thanks,
Todd


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com



More information about the uClibc mailing list