Re: A problem(?) with pthreads



Carl Krauthauser <carl UDel Edu> writes:
...
> /usr/local/bin/bash ../../../libtool --mode=link cc  -g
> -I/home/carl/garnome/include -I/usr/X11R6/include -I/usr/local/include
> -L/home/carl/garnome/lib -L/usr/X11R6/lib -L/usr/local/lib
> -L/usr/compat/linux/lib -L/usr/lib  -O2 -pipe  -L/home/carl/garnome/lib
> -L/usr/X11R6/lib -L/usr/local/lib -L/usr/compat/linux/lib -L/usr/lib   -o
> name-client-2  name-client.o name-support.o ../../../src/orb/libORBit-2.la
> libORBitCosNaming-2.la -lm -L/home/carl/garnome/lib -lglib-2.0 -lintl
> -liconv
> cc -g -I/home/carl/garnome/include -I/usr/X11R6/include
> -I/usr/local/include -O2 -pipe -o .libs/name-client-2 name-client.o
> name-support.o  -L/home/carl/garnome/lib -L/usr/X11R6/lib -L/usr/local/lib
> -L/usr/compat/linux/lib -L/usr/lib ../../../src/orb/.libs/libORBit-2.so
> ./.libs/libORBitCosNaming-2.so

[snip]

> Now, it looks like it is looking for a posix thread library.  There is a
> libpthread.so library in /usr/compat/linux/lib, to which I added as part
> of the LDFLAGS in gar.conf.mk.  FreeBSD has a library source for a
> libpthread library that is installed in /usr/lib; I've also added this to
> LDFLAGS.  However, as is clear from the error message, it doesn't see
> these shared libraries.  Any thoughts as to how to get around this issue;
> any suggestions would be most welcome!

As you can notice, there's no "-lpthread" in any of above commands.
So, you may workaround this by adding -lpthread also to LDFLAGS, or
simply doing it by hand whenever such thing occurs, eg. using
something like:

cc -g -I/home/carl/garnome/include -I/usr/X11R6/include
-I/usr/local/include -O2 -pipe -o .libs/name-client-2 name-client.o
name-support.o  -L/home/carl/garnome/lib -L/usr/X11R6/lib -L/usr/local/lib
-L/usr/compat/linux/lib -lpthread -L/usr/lib
../../../src/orb/.libs/libORBit-2.so ./.libs/libORBitCosNaming-2.so

(for this particular case, I've just copied the command verbatim, and
added -lpthread after -L/usr/compat/linux/lib)

I didn't try this, but I hope it will help.

Cheers,
Danilo



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