[uClibc]Problem linking with libpthread [FIXED???]
Manuel Novoa III
mjn3 at codepoet.org
Tue May 21 17:22:56 UTC 2002
Hello,
On Tue, May 21, 2002 at 12:00:27PM -0500, Jonathan Hankins wrote:
> Hey again,
>
> I got uclibc libpthread.so to link correctly by exporting
> LD_LIBRARY_PATH, but I still don't know why uclibc libdl.so links
> correctly even when LD_LIBRARY_PATH is unset. Below is the output from
> ldconfig, showing my glibc libdl.so and libpthread.so -- from what it
> shows, I don't see any difference with regard to their location. Then
> is another test compile linking with libpthread.so first without, and
> then with LD_LIBRARY_PATH set.
>
> Hope this helps!
(stuff omitted)
>
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games
>
> $ echo $LD_LIBRARY_PATH
>
>
> $ export PATH=/usr/i386-linux-uclibc/bin:$PATH
>
> $ gcc test.c -lpthread
>
> $ ldd a.out
> libpthread.so.0 => /lib/libpthread.so.0
> libc.so.0 => /usr/i386-linux-uclibc/lib/libc.so.0
> /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0
> libc.so.6 => /lib/libc.so.6
> ld-linux.so.2 => /lib/ld-linux.so.2
>
Do the thread tests in tests/pthread exhibit the same behavior for you?
If not, and they work, could you humor me and try something like
gcc test.c -lpthread -lc -lpthread -lc
and see if that works.
Thanks,
Manuel
More information about the uClibc
mailing list