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

 
 

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

Submitted by:  Bartosz Brachaczek <beevvy>
Submitted on:  Tue 25 Sep 2012 01:16:48 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: Done
Privacy: PublicAssigned to: Nikos Mavrogiannopoulos <nmav>
Open/Closed: ClosedOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 06 Feb 2014 09:56:22 AM UTCnmavOpen/ClosedOpen=>Closed
    Tue 25 Sep 2012 03:13:37 PM UTCnmavStatusNone=>Done
      Assigned toNone=>nmav
    Tue 25 Sep 2012 01:16:48 AM UTCbeevvyAttached 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.1-cleanup