bug-libtool
[Top][All Lists]
Advanced

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

Re: libtool 1.5.12: -pthread lost


From: Andreas Schwab
Subject: Re: libtool 1.5.12: -pthread lost
Date: Mon, 07 Feb 2005 14:33:20 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Peter O'Gorman <address@hidden> writes:

> Andreas Schwab wrote:
>> libtool is throwing away the -pthread flag during linking.  It is now put
>> in compiler_flags instead of deplibs, but the former seems to be ignored.
>> Reverting this patch fixes the problem:
>> 2005-01-16  Peter O'Gorman  <address@hidden>
>>      * ltmain.in: Don't pass through compiler-like thread flags when
>>      using $LD to do the linking. Use compiler_flags instead.
>> Reported by address@hidden
>
> As long as you put quotes around "fixes" :)

Ok :-)

> On what system? What does the generated libtool's archive_cmds have?

I don't see archive_cmds being used anywhere for computing link_command.

It happens for example when compiling openldap on linux (after running
`autoreconf -fi'):

/bin/sh ../..//libtool --mode=link cc  -O2 -fmessage-length=0 -Wall     -o 
apitest apitest.o libldap_r.la ../../libraries/liblber/liblber.la 
../../libraries/liblutil/liblutil.a -lsasl2  -lssl -lcrypto  -lcrypt -lresolv  
-pthread
cc -O2 -fmessage-length=0 -Wall -o .libs/apitest apitest.o  
./.libs/libldap_r.so 
/usr/src/packages/BUILD/openldap-2.2.23/libraries/liblber/.libs/liblber.so 
../../libraries/liblber/.libs/liblber.so ../../libraries/liblutil/liblutil.a 
/usr/lib/libsasl2.so -ldl -lssl -lcrypto -lcrypt -lresolv
./.libs/libldap_r.so: undefined reference to `pthread_create'
./.libs/libldap_r.so: undefined reference to `pthread_kill_other_threads_np'
./.libs/libldap_r.so: undefined reference to `pthread_setconcurrency'
./.libs/libldap_r.so: undefined reference to `pthread_kill'
./.libs/libldap_r.so: undefined reference to `pthread_attr_setstacksize'
./.libs/libldap_r.so: undefined reference to `pthread_mutex_trylock'
./.libs/libldap_r.so: undefined reference to `pthread_join'
./.libs/libldap_r.so: undefined reference to `pthread_getconcurrency'
collect2: ld returned 1 exit status

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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