[Bug other/15246] New: Incorrect dependencies for libraries installed with libtool
danglin at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat May 1 21:38:00 GMT 2004
libtool is configured using the compilers in the build directory. On
systems that need to relink shared libraries prior to installation, this
causes dependences on the build directory to be introduced into the .la
files generated by libtool. For example, this is the dependency_libs
for libstdc++.la after installation:
dependency_libs=' -L/xxx/gnu/gcc-3.3/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src
-L/xxx/gnu/gcc-3.3/objdir/hppa1.1-hp-hpux10.20/libstdc++-v3/src/.libs -lm -lm -lm
-L/xxx/gnu/gcc-3.3/objdir/gcc -L/usr/local/lib -L/opt/gnu/gcc/gcc-3.2.3/lib/gcc-
lib/hppa1.1-hp-hpux10.20/3.2.3 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib
-L/opt/gnu/gcc/gcc-3.2.3/lib/gcc-lib/hppa1.1-hp-hpux10.20/3.2.3/../../.. -lgcc_s
-lgcc_s -lm -lgcc_s -lgcc_s'
In the case, /xxx/gnu/gcc-3.3/objdir is the build directory and
/opt/gnu/gcc/gcc-3.2.3 is the installation prefix.
Using the build gcc in libtool also causes gcc shared libraries to
be linked against libgcc_s in the build directory:
# chatr libstdc++.sl
libstdc++.sl:
shared library
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path enabled first /opt/gnu/gcc/gcc-3.2.3/lib/.
internal name:
libstdc++.sl.5
shared library list:
dynamic /usr/lib/libM.1
dynamic /xxx/gnu/gcc-3.3/objdir/gcc/libgcc_s.sl
This hardcodes the patch for the build directory into the library.
However, since the path is dynamic and embedded path search is enabled,
the dynamic loader will usually get correct library. It would be
best if libtool used the newly installed version of gcc for the
relink.
The incorrect dependency list can be edited after installation.
If you don't do that, you can end up with other libraries linked against
the libraries (libgcc_s.sl) in the build directory. This can cause
apps to fail when the build directory is removed.
--
Summary: Incorrect dependencies for libraries installed with
libtool
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: hppa1.1-hp-hpux10.20, hppa2.0w-hp-hpux11*
GCC host triplet: hppa1.1-hp-hpux10.20, hppa2.0w-hp-hpux11*
GCC target triplet: hppa1.1-hp-hpux10.20, hppa2.0w-hp-hpux11*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15246
More information about the Gcc-bugs
mailing list