[sr #108140] libgnutls-openssl.so is linked to system libgnutls.so in certain conditions
Bartosz Brachaczek
INVALID.NOREPLY at gnu.org
Tue Sep 25 03:16:49 CEST 2012
URL:
<http://savannah.gnu.org/support/?108140>
Summary: libgnutls-openssl.so is linked to system
libgnutls.so in certain conditions
Project: GnuTLS
Submitted by: beevvy
Submitted on: Tue 25 Sep 2012 01:16:48 AM GMT
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
Suppose we have a Gentoo Linux amd64 system. We have gnutls-2.12.20 installed.
We are now upgrading it to gnutls-3.1.1. It is ./configure'd with
--prefix=/usr --libdir=/usr/lib64 parameters, that is, system paths are
specified. When build, it's make install'ed with DESTDIR=/var/tmp/directory.
First is libgnutls.so.28 installed, and when installing libgnutls-openssl.so,
libtool relinks to, as usual. And because -L/usr/lib64 -ltasn1 is specified in
lib_LDFLAGS instead of lib_LIBADD, it is placed before
-L/var/tmp/directory/usr/lib64 -lgnutls in the command line. So for -lgnutls
system installation of libgnutls.so is picked up, instead of the new one, that
is, libgnutls.so.26 instead of libgnutls.so.28. We need to rebuild gnutls to
get a working libgnutls-openssl.so.
So external libraries (libtasn1 here) need to be placed in lib_LIBADD to
maintain correct order. Furthermore, within lib_LIBADD libtool objects need to
be specified before external libraries (specifically, before any -L/some/path
options).
I'm attaching two patches:
1) gnutls-3.1.1-libadd-minimal.patch -- this patch fixes only this specific
bug.
2) gnutls-3.1.1-libadd-complete.patch -- this patch contains the above patch,
and moves all external libraries that were in LDFLAGS into LIBADD/LDADD, and
fixes order within LIBADD/LDADD so that libtool objects go first. It looks
invasive, and although it's pretty simple, it _might_ break something,
especially on win32. I tested it (only) on Linux.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 25 Sep 2012 01:16:48 AM GMT Name: gnutls-3.1.1-libadd-minimal.patch
Size: 458B By: beevvy
<http://savannah.gnu.org/support/download.php?file_id=26627>
-------------------------------------------------------
Date: Tue 25 Sep 2012 01:16:48 AM GMT Name:
gnutls-3.1.1-libadd-complete.patch Size: 7kB By: beevvy
<http://savannah.gnu.org/support/download.php?file_id=26628>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/support/?108140>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
More information about the Gnutls-devel
mailing list