libtool
[Top][All Lists]
Advanced

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

Re: pthreads in libtool'd shared library...


From: Ralf Wildenhues
Subject: Re: pthreads in libtool'd shared library...
Date: Sat, 30 Oct 2004 21:09:37 +0200
User-agent: Mutt/1.5.6+20040722i

* Chris Bowlby wrote on Fri, Oct 29, 2004 at 06:59:16PM CEST:
> Hi All,
> 
>  I've been building a standard library for an application that I'm working 
> on and noticed that once I started to attempt to work in threads the 
> linking stage seems to have dropped the link to libc_r.so, as shown in the 
> compiler details below:
> 
> /bin/bash ../../../libtool --mode=link g++  -g -O2   -L/usr/local/lib 
> -L/usr/lib -L/usr/compat/linux/lib -o libtest.la -rpath 
> /usr/local/data_cop/lib -module -Wsymbolic test.lo  -lc_r -lcrypt -lpq 
> -lcipher
> g++ -shared -nostdlib /usr/lib/crti.o 
> /usr/lib/crtbeginS.o  .libs/test.o  -L/usr/local/lib -L/usr/lib 
> -L/usr/compat/linux/lib -lcrypt -lpq -lcipher -lstdc++ -lm -lgcc 
> /usr/lib/crtendS.o /usr/lib/crtn.o  -Wl,-soname -Wl,libtest.so.0 -o 
> .libs/libtest.so.0
*snip*
> 
> If we look at the first part, the -lc_r is compiled into it, but once it 
> creates the libtest.so.0 file, it forgets that I need to have that there, 
> is there a parameter that I need to set somewhere in the configure.ac 
> script or Makefile.am file so that libtool picks up that I need the 
> pthreads library linked in?

Try using -pthread instead of adding -lc_r directly (who adds it?).
If that's not the right answer, then it's because I'm stabbing in the
very dark -- you do not state neither the Libtool version you use nor
any slight detail about the system this happens on, unfortunately.
Not that I know whether I could help you then.

Regards,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]