[Top][All Lists]

[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: Sun, 31 Oct 2004 19:44:49 +0100
User-agent: Mutt/1.5.6+20040722i

* Chris Bowlby wrote on Sun, Oct 31, 2004 at 02:42:51AM CET:
>  Thanks for the help, but seemed to have no effect, I'm building this on a 
> FreeBSD 4.10-STABLE box, with libtool version 1.5.8.
> I  was not adding the -lc_r parameter itself, automake/configure did that 
> for me during the compile process. So far, each time I compile and try to 
> execute the command, I get the following error:
> ./test
> /usr/local/test/lib/ Undefined symbol "pthread_create"
> So I can tell right off that the pthread library (in this case it should be:
> /usr/lib/
> It's got to be something I'm missing in the linkage process, the current 
> looks like:
> libtest_la_SOURCES = test.cxx
> libtest_la_LDFLAGS = -module -Wsymbolic -pthread

Try adding -no-undefined.  Should fail at library link time then.

Did you check that the `-pthread' option is really passed to the
compiler?  I don't have FreeBSD available to test (and no experience
with it), but online docs suggest it to be sufficient.

More random thoughts: try putting -pthread as very last thing on the
  libtool --mode=links -o ...
cmdline.  Try the g++ link line (which libtool generates) by hand
and try to see what's necessary to fix it.

BTW, -Wsymbolic is not mentioned in the online docs.  Is that the same
as -Bsymbolic?

> #libtest_la_LDFLAGS = -version-info 

No need to remove the version-info.


reply via email to

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