libtool
[Top][All Lists]
Advanced

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

Re: Suppressing --whole-archive


From: Ralf Wildenhues
Subject: Re: Suppressing --whole-archive
Date: Thu, 26 Feb 2009 21:04:21 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Barthelemy,

* Barthelemy von Haller wrote on Thu, Feb 26, 2009 at 01:37:37PM CET:
> First of all, I apologize for the very late reply, but I had to leave  
> work for personal reasons for more than a month.

No problem of course.  I keep having too little time for free software
all the time.

> Ralf Wildenhues a écrit :
>> * Barthelemy von Haller wrote on Mon, Jan 05, 2009 at 11:56:53AM CET:
>>> My problem appears when building a shared library using, amongst 
>>> others,  static libraries. It generates something like :
>>
>> Please always post the input command line that is given to libtool,
>> that gives valuable hints as to whether libtool generated the
>> --whole-archive arguments.
>>   
> Ok, so here is what is output before the command I pasted in my first email.
>
> /bin/sh ../../libtool --mode=link g++ -fPIC -Wall -Wextra -Wshadow  
> -Wredundant-decls  -g -O2   -o libAmoreCore.la -rpath /opt/amore/lib  
> -release 1.1 -L/local/root/lib -L/date/monitoring/Linux -lmonitor  
> -L/usr/local/lib -lshift -L/date/db/Linux -lDb -L/date/infoLogger/Linux  
> -lInfo -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm  
> -lmygcc -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree  
> -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lGui  
> -pthread -lm -ldl -rdynamic -rdynamic -L/usr/lib/mysql -lmysqlclient -lz  
> -lcrypt -lnsl -lm -lmygcc   -lRMySQL CoreDict.lo StringUtility.lo  
> Event.lo MOMessage.lo MonitorInterface.lo MonitorObject.lo  
> MySQLServer.lo PoolInterface.lo RuntimeModule.lo SocketInterface.lo  
> TDATEEventParser.lo Run.lo Session.lo LogBook.lo InfoLogger.lo  
> RunControl.lo AmoreDA.lo AmoreDABackEnd.lo
>
>>   
>>> g++ -shared -nostdlib   
[...]
>>> .libs/InfoLogger.o .libs/RunControl.o .libs/AmoreDA.o   
>>> .libs/AmoreDABackEnd.o -Wl,--whole-archive   
>>> /usr/lib/mysql/libmysqlclient.a /usr/lib/mysql/libz.a   
>>> -Wl,--no-whole-archive  -L/opt/root/lib -L/date/monitoring/Linux   
[...]
>>> -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -lstdc++ -lm -lc 
>>> -lgcc_s  /usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o   
>>> /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o  -Wl,-soname   
>>> -Wl,libAmoreCore-1.0.so -o .libs/libAmoreCore-1.0.so
>>>
>>> Where you can see, in the middle :
>>> -Wl,--whole-archive /usr/lib/mysql/libmysqlclient.a   
>>> /usr/lib/mysql/libz.a -Wl,--no-whole-archive
>>>
>>> The problem is that those two static libraries contain similar 
>>> symbols  leading to a lot of errors such as
[...]

>> Do files /usr/lib/mysql/libmysqlclient.la and /usr/lib/mysql/libz.la
>> exist, and if yes, could you please post their contents?
>>   
> Yes they exist.

> *********** /usr/lib/mysql/libmysqlclient.la *************
> # libmysqlclient.la - a libtool library file
[...]
> # Is this an already installed library?
> installed=yes
[...]
> # Directory that this library needs to be installed in:
> libdir='/usr/lib/mysql'
> *********** end of /usr/lib/mysql/libmysqlclient.la *************


> *********** /usr/lib/mysql/libz.la *************
>
> # libz.la - a libtool library file
[...]
> # Is this an already installed library?
> installed=yes
[...]
> # Directory that this library needs to be installed in:
> libdir='/usr/lib/mysql'
>
> *********** end of /usr/lib/mysql/libz.la *************

OK, now I'm officially confused.  Both of the libraries are not
convenience archives (as indicated by the nonempty 'libdir' and
'installed' settings).  So I still don't see where this whole archive
thingy comes from.  Could be one of the other libraries.  But in order
to be able to say for sure, I would need to look at the output of
  /bin/sh ../../libtool --tag=CXX --config

as well as the output of the --mode=link command line above, with
--debug added as first argument after ../../libtool.  Please gzip this
output, it will be large.

Thanks,
Ralf




reply via email to

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