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


sr #108140: is linked to system in certain conditions

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

Add a New Comment(Rich 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 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 installed, and when installing, 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 is picked up, instead of the new one, that is, instead of We need to rebuild gnutls to get a working

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:

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)

    Do you think this task is very important?
    If so, you can 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 UTC nmav Open/ClosedOpen => Closed
    Tue 25 Sep 2012 03:13:37 PM UTC nmav StatusNone => Done
        Assigned toNone => nmav
    Tue 25 Sep 2012 01:16:48 AM UTC 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.3