Re: Suppressing --whole-archive

2009-03-02 Thread Barthelemy von Haller

Hi,

Indeed, it is almost an antiquity... :
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06

I will update it. Thanks a lot for your help
Barth

Ralf Wildenhues a écrit :

* Barthelemy von Haller wrote on Fri, Feb 27, 2009 at 04:46:32PM CET:
  

Hi again, sorry the second attachment was wrong. Here is the correct one.



Yep, thanks.  It also shows that I forgot to ask a more basic question
first: namely, which libtool version is was.  The log shows that it's
1.5.6.  This is very old.  The corresponding code has changed since,
and the code that would expand to this whole-archive bit has gone.

I would urge you to please use a newer libtool, or ask the maintainers
of the package you're using to rebootstrap it with a newer version.
Current Libtool is 2.2.6a.

FWIW, the bug has been fixed in 1.5.20, with

commit a02e5b87b812205f06e54cb0a06baaacbc815245
Author: Peter O'Gorman pe...@...
Date:   Tue May 31 03:47:34 2005 +

* ltmain.in: Do not add installed static litool libraries to
convenience, they are not convenience libraries.
Reported by Chen-Mou Cheng chenmou.ch...@gmail.com

diff --git a/ltmain.in b/ltmain.in
index 6d6eb18..be7c7a5 100644
--- a/ltmain.in
+++ b/ltmain.in
@@ -2729,8 +2729,6 @@ EOF
  fi
fi
  else
-   convenience=$convenience $dir/$old_library
-   old_convenience=$old_convenience $dir/$old_library
deplibs=$dir/$old_library $deplibs
link_static=yes
  fi


Cheers,
Ralf
  


--
Barthélémy von Haller
barthelemy.von.hal...@cern.ch
CERN PH-AID (ALICE DAQ)



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-02-28 Thread Ralf Wildenhues
* Barthelemy von Haller wrote on Fri, Feb 27, 2009 at 04:46:32PM CET:
 Hi again, sorry the second attachment was wrong. Here is the correct one.

Yep, thanks.  It also shows that I forgot to ask a more basic question
first: namely, which libtool version is was.  The log shows that it's
1.5.6.  This is very old.  The corresponding code has changed since,
and the code that would expand to this whole-archive bit has gone.

I would urge you to please use a newer libtool, or ask the maintainers
of the package you're using to rebootstrap it with a newer version.
Current Libtool is 2.2.6a.

FWIW, the bug has been fixed in 1.5.20, with

commit a02e5b87b812205f06e54cb0a06baaacbc815245
Author: Peter O'Gorman pe...@...
Date:   Tue May 31 03:47:34 2005 +

* ltmain.in: Do not add installed static litool libraries to
convenience, they are not convenience libraries.
Reported by Chen-Mou Cheng chenmou.ch...@gmail.com

diff --git a/ltmain.in b/ltmain.in
index 6d6eb18..be7c7a5 100644
--- a/ltmain.in
+++ b/ltmain.in
@@ -2729,8 +2729,6 @@ EOF
  fi
fi
  else
-   convenience=$convenience $dir/$old_library
-   old_convenience=$old_convenience $dir/$old_library
deplibs=$dir/$old_library $deplibs
link_static=yes
  fi


Cheers,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-02-27 Thread Barthelemy von Haller

Hi Ralf,

Ralf Wildenhues a écrit :
[...]

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.




[...]


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.
  
I am not completely sure of what you asked in second (--mode=link) but 
here is what I did :

/bin/sh ../../libtool --tag=CXX --config  libtoolOutput1.txt
/bin/sh ../../libtool --debug --tag=CXX --mode=link  libtoolOutput2.txt 
21
I would be pleased to send other information if that was not what you 
meant.

I attached a tgz with the two files.

Thanks,
Ralf
  

Thanks a lot, and have a nice week-end !
Barth

--
Barthélémy von Haller
barthelemy.von.hal...@cern.ch
CERN PH-AID (ALICE DAQ)



output.tgz
Description: GNU Zip compressed data
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-02-27 Thread Ralf Wildenhues
* Barthelemy von Haller wrote on Fri, Feb 27, 2009 at 03:22:51PM CET:
 Ralf Wildenhues a écrit :
 [...] 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.
   
 I am not completely sure of what you asked in second (--mode=link) but  
 here is what I did :
 /bin/sh ../../libtool --tag=CXX --config  libtoolOutput1.txt
 /bin/sh ../../libtool --debug --tag=CXX --mode=link  libtoolOutput2.txt  
 21
 I would be pleased to send other information if that was not what you  
 meant.

The first is ok.   For the second, I meant to see the output of the
following long line, when run in the correct directory:

/bin/sh ../../libtool --debug --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

(and yes, both stdout and stderr in the same file please).

You can probably get this output also with something like
  make
  rm -f libAmoreCore.la
  make libAmoreCore.la LIBTOOLFLAGS=--debug

if you are using Automake = 1.10.

Thanks,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-02-27 Thread Barthelemy von Haller

Hi,

Ralf Wildenhues a écrit :

* Barthelemy von Haller wrote on Fri, Feb 27, 2009 at 03:22:51PM CET:
  

Ralf Wildenhues a écrit :


[...] 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.
  
  
I am not completely sure of what you asked in second (--mode=link) but  
here is what I did :

/bin/sh ../../libtool --tag=CXX --config  libtoolOutput1.txt
/bin/sh ../../libtool --debug --tag=CXX --mode=link  libtoolOutput2.txt  
21
I would be pleased to send other information if that was not what you  
meant.



The first is ok.   For the second, I meant to see the output of the
following long line, when run in the correct directory:

/bin/sh ../../libtool --debug --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

(and yes, both stdout and stderr in the same file please).
  

Ok, I have attached the output of the previous command.

You can probably get this output also with something like
  make
  rm -f libAmoreCore.la
  make libAmoreCore.la LIBTOOLFLAGS=--debug

if you are using Automake = 1.10.
  

I did with the first method.

Thanks,
Ralf
  

Cheers,
Barth

--
Barthélémy von Haller
barthelemy.von.hal...@cern.ch
CERN PH-AID (ALICE DAQ)



libtoolOutput3.tgz
Description: GNU Zip compressed data
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-02-27 Thread Barthelemy von Haller

Hi again, sorry the second attachment was wrong. Here is the correct one.

Cheers,
Barth

Ralf Wildenhues a écrit :

* Barthelemy von Haller wrote on Fri, Feb 27, 2009 at 03:22:51PM CET:
  

Ralf Wildenhues a écrit :


[...] 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.
  
  
I am not completely sure of what you asked in second (--mode=link) but  
here is what I did :

/bin/sh ../../libtool --tag=CXX --config  libtoolOutput1.txt
/bin/sh ../../libtool --debug --tag=CXX --mode=link  libtoolOutput2.txt  
21
I would be pleased to send other information if that was not what you  
meant.



The first is ok.   For the second, I meant to see the output of the
following long line, when run in the correct directory:

/bin/sh ../../libtool --debug --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

(and yes, both stdout and stderr in the same file please).

You can probably get this output also with something like
  make
  rm -f libAmoreCore.la
  make libAmoreCore.la LIBTOOLFLAGS=--debug

if you are using Automake = 1.10.

Thanks,
Ralf
  


--
Barthélémy von Haller
barthelemy.von.hal...@cern.ch
CERN PH-AID (ALICE DAQ)



libtoolOutput4.tgz
Description: GNU Zip compressed data
___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-02-26 Thread Ralf Wildenhues
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


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-01-05 Thread Bob Friesenhahn

On Mon, 5 Jan 2009, Barthelemy von Haller wrote:


The problem is that those two static libraries contain similar symbols 
leading to a lot of errors such as


/usr/lib/mysql/libz.a(adler32.o): In function `adler32':
/data1/mysqldev/tmp-200707041150-5.0.45-27425/rpm/BUILD/mysql-5.0.45/zlib/adler32.c:61: 
multiple definition of `adler32'
/usr/lib/mysql/libmysqlclient.a(adler32.o):/data1/mysqldev/tmp-200707041150-5.0.45-27425/rpm/BUILD/mysql-5.0.45/zlib/adler32.c:61: 
first defined here


How can I remove this -Wl,--whole-archive which is put around the static 
libraries ?


What do you expect the result of this change to be?  Will you be happy 
if it works for you, but not for many other people?


Note that even if the libraries are shared libraries, my experience is 
that the level of success is similar to betting at the horse races, or 
a visit to Las Vegas blackjack tables.  Depending on the operating 
systems involved, and order of execution, the similarly named symbol 
may be pulled from one library or the other at run time since DLL 
symbols are resolved upon first use.


Bob
==
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/



___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-01-05 Thread Ralf Wildenhues
Hello Barthelemy,

* Barthelemy von Haller wrote on Mon, Jan 05, 2009 at 11:56:53AM CET:

 I found a message which corresponds exactly to my problem :  
 http://osdir.com/ml/gnu.libtool.general/2004-02/msg00093.html

Not really.

 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.

 g++ -shared -nostdlib  
 /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o  
 /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o  .libs/CoreDict.o  
 .libs/Event.o .libs/LogInterface.o .libs/Map.o .libs/MOMessage.o  
 .libs/MonitorInterface.o .libs/MonitorObject.o .libs/MySQLServer.o  
 .libs/PoolInterface.o .libs/RuntimeModule.o .libs/SocketInterface.o  
 .libs/TDATEEventParser.o .libs/Run.o .libs/Session.o .libs/LogBook.o  
 .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  
 -lmonitor -L/usr/local/lib -lshift -L/date/db/Linux -lDb  
 -L/date/infoLogger/Linux -lInfo -L/usr/lib/mysql -lCore -lCint -lRIO  
 -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix  
 -lPhysics -lMathCore -lThread -lGui -pthread -ldl -lcrypt -lnsl -lRMySQL  
 -L/usr/lib/gcc/i386-redhat-linux/4.1.2  
 -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

 /usr/lib/mysql/libz.a(adler32.o): In function `adler32':
 
OK, this is kind of weird.  Libtool only uses whole-archive for
convenience archives, and those are normally not installed.
Libtool has a conceptual difference between static libraries and
convenience archives; the former are considered normal libraries,
just not shared, the latter are intended to be incorporated as a
whole into a final output, be that a library (normal) or a program.

It is recommended against installing such a convenience library,
and actually, one has to hack a bit in order to do so.

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

Thanks,
Ralf


___
http://lists.gnu.org/mailman/listinfo/libtool


Re: Suppressing --whole-archive

2009-01-05 Thread Barthelemy von Haller

Hi,

I found a message which corresponds exactly to my problem : 
http://osdir.com/ml/gnu.libtool.general/2004-02/msg00093.html


Unfortunately nobody ever answered this question :)

My problem appears when building a shared library using, amongst others, 
static libraries. It generates something like :
g++ -shared -nostdlib 
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o 
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o  .libs/CoreDict.o 
.libs/Event.o .libs/LogInterface.o .libs/Map.o .libs/MOMessage.o 
.libs/MonitorInterface.o .libs/MonitorObject.o .libs/MySQLServer.o 
.libs/PoolInterface.o .libs/RuntimeModule.o .libs/SocketInterface.o 
.libs/TDATEEventParser.o .libs/Run.o .libs/Session.o .libs/LogBook.o 
.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 
-lmonitor -L/usr/local/lib -lshift -L/date/db/Linux -lDb 
-L/date/infoLogger/Linux -lInfo -L/usr/lib/mysql -lCore -lCint -lRIO 
-lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix 
-lPhysics -lMathCore -lThread -lGui -pthread -ldl -lcrypt -lnsl -lRMySQL 
-L/usr/lib/gcc/i386-redhat-linux/4.1.2 
-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


/usr/lib/mysql/libz.a(adler32.o): In function `adler32':
/data1/mysqldev/tmp-200707041150-5.0.45-27425/rpm/BUILD/mysql-5.0.45/zlib/adler32.c:61: 
multiple definition of `adler32'
/usr/lib/mysql/libmysqlclient.a(adler32.o):/data1/mysqldev/tmp-200707041150-5.0.45-27425/rpm/BUILD/mysql-5.0.45/zlib/adler32.c:61: 
first defined here


How can I remove this -Wl,--whole-archive which is put around the 
static libraries ?


Thanks a lot in advance

Barth

--
Barthélémy von Haller
barthelemy.von.hal...@cern.ch
CERN PH-AID (ALICE DAQ)



___
http://lists.gnu.org/mailman/listinfo/libtool


Suppressing --whole-archive

2004-02-25 Thread Jim Fehlig
Is there a way to suppress the insertion of --whole-archive/--no-whole-archive placed around static libraries when linking them with a shared library? I have an autotools project containing common code that is linked as several convenience libraries which are subsequently used by both binaries and shared objects within the project. When linking binaries with the convenience libs, only those symbols referenced are brought into the binary. When linking shared objects (e.g. an Apache module, call it mod_foo), all symbols from the convenience libs are included in mod_foo since Libtool wraps them in --whole-archive/--no-whole-archive. I would like only those symbols referenced by mod_foo to be included.I have tried adding the -rpath option to LDFLAGS of the convenience libs with the result that both static and shared libs are created. Libtool then chooses the shared version of the "convenience" libs when linking mod_foo and hence all of the referenced symbols are undefined in mod_foo.I have also tried the lib_LTLIBRARIES primary form with combinations of -static and -rpath LDFLAGS with similar results, i.e. I either get all of the symbols from the "convenience" libs or none.I was unable to locate a similar issue in the archives and the answer is not obvious to me from section 3.7 of the manual. My workaround is to directly create Makefile.in's in the shared object directories and bypass Libtool from linking but would prefer to be consistent and use Automake/Libtool throughout the project.Libtool 1.4.2Automake 1.6.3Autoconf 2.53Thanks in advance.Jim
___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool