mainGnuTLS - Support: sr #108140, libgnutls-openssl.so is linked to...

 
 

sr #108140: libgnutls-openssl.so is linked to system libgnutls.so in certain conditions

Submitter:  Bartosz Brachaczek <beevvy>
Submitted:  Tue 25 Sep 2012 01:16:48 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  nmav
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 25 Sep 2012 03:13:37 PM UTC, comment #1: 

The patch looks reasonable. I'll apply it and be included in the 3.1.2 release.

Thank you,
Nikos

Nikos Mavrogiannopoulos <nmav>
Group administrator
Tue 25 Sep 2012 01:16:48 AM UTC, original submission:  

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.

Bartosz Brachaczek <beevvy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nmav (Posted a comment)
  • -email is unavailable- added by beevvy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-06 nmav Open/ClosedOpen Closed
    2012-09-25 nmav StatusNone Done
        Assigned toNone nmav
    2012-09-25 beevvy Attached File- Added gnutls-3.1.1-libadd-minimal.patch, #26627
        Attached File- Added gnutls-3.1.1-libadd-complete.patch, #26628

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code