[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool 1.5 -static and installed libraries
From: |
Howard Chu |
Subject: |
libtool 1.5 -static and installed libraries |
Date: |
Sun, 28 Aug 2005 13:19:03 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050827 SeaMonkey/1.1a |
We just migrated from libtool-1.4.3 to 1.5.18 in the OpenLDAP CVS HEAD,
and are seeing a new linking problem. By default we link with -static so
that our local libtool-generated libraries get statically linked. But we
don't use -all-static; we don't want to alter the default linking for
system-installed libraries.
On SuSE 9.x when the libdb devel RPM is installed, a libdb.la file is
also installed, and libtool 1.5 finds and reads this file. In this case,
libtool chooses to link the static libdb into our slapd executable,
rather than the shared library, even though the .la file says
"installed=yes". This results in an unusable binary on SuSE 9.x because
the default static library doesn't support thread-local storage/NPTL,
while the default C library requires it. (But if the shared library is
used instead, the runtime linker can locate the correct libdb.)
So the question is, why does linking with -static cause libtool to
behave like -all-static was used, why does it ignore the installed
status of the libraries?
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/
- libtool 1.5 -static and installed libraries,
Howard Chu <=