bug-libtool
[Top][All Lists]
Advanced

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

bug#9223: Random (re)-linking order


From: Elias Pipping
Subject: bug#9223: Random (re)-linking order
Date: Tue, 02 Aug 2011 19:17:36 +0200 (CEST)

Hello,

I have gnutls 2.10.5 installed which provides
/usr/lib64/libgnutls.so.26.

I'm trying to install gnutls 3.0.0 which will provide
/usr/lib64/libgnutls.so.28.

To that end, I run

  % ./configure --prefix=$HOME/tmp \
      --without-p11-kit \
      --enable-openssl-compatibility
  % make
  % make install

Note that --enable-openssl-compatibility is actually the default.

Once `make` finishes to run, I'll have a
libextra/.libs/libgnutls-openssl.so.

Calling `readelf -d` on this file will reveal that it was correctly
linked against the newly built version of gnutls:

  0x0000000000000001 (NEEDED)             Shared library: [libgnutls.so.28]

Here's how that file was created:

  libtool: link: gcc -std=gnu99 -shared  .libs/gnutls_openssl.o \
    .libs/openssl_compat.o  -Wl,--whole-archive ../gl/.libs/libgnu.a \
    -Wl,--no-whole-archive  -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath \
    -Wl,/home/pipping/gnutls-3.0.0/lib/.libs -Wl,-rpath -Wl,/usr/lib64 \
    -Wl,-rpath -Wl,/home/pipping/tmp/lib /usr/lib64/libtasn1.so -lrt \
    ../lib/.libs/libgnutls.so    -Wl,-soname -Wl,libgnutls-openssl.so.27 \
    -o .libs/libgnutls-openssl.so.27.0.0

However, during installation, the following will happen:

  libtool: relink: gcc -std=gnu99 -shared  .libs/gnutls_openssl.o \
    .libs/openssl_compat.o  -Wl,--whole-archive ../gl/.libs/libgnu.a \
    -Wl,--no-whole-archive  -Wl,-rpath -Wl,/usr/lib64 -Wl,-rpath \
    -Wl,/home/pipping/tmp/lib -L/usr/lib64 -ltasn1 -lrt \
    -L/home/pipping/tmp/lib -lgnutls \
    -Wl,-soname -Wl,libgnutls-openssl.so.27 \
    -o .libs/libgnutls-openssl.so.27.0.0

Calling `readelf -d` on the installed libgnutls-openssl.so will reveal

 0x0000000000000001 (NEEDED)             Shared library: [libgnutls.so.26]

This should not happen. This is in particular a problem if I set
DESTDIR, then removed the old version of gnutls and moved the contents
of DESTDIR to '/' as is commonly done. My installation of gnutls would
then be broken.


Best regards,

Elias Pipping






reply via email to

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