bug-gnustep
[Top][All Lists]
Advanced

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

[bug #43381] Sourcing GNUstep.sh can cause problems with LD_LIBRARY_PATH


From: Alastair Pharo
Subject: [bug #43381] Sourcing GNUstep.sh can cause problems with LD_LIBRARY_PATH
Date: Wed, 08 Oct 2014 13:18:09 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20100101 Firefox/32.0

URL:
  <http://savannah.gnu.org/bugs/?43381>

                 Summary: Sourcing GNUstep.sh can cause problems with
LD_LIBRARY_PATH
                 Project: GNUstep
            Submitted by: asppsa
            Submitted on: Wed 08 Oct 2014 01:18:08 PM GMT
                Category: Makefiles
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hi there,

I have encountered a problem with GNUstep on Arch Linux, although I think the
issue would affect other Linux systems too.

On Arch, GNUSTEP_SYSTEM_LIBRARIES is set to /usr/lib.  As you will know,
sourcing GNUstep.sh creates or adds to the LD_LIBRARY_PATH environment
variable so that it includes the various locations that GNUstep uses.  This
will include /usr/lib if that is what GNUSTEP_SYSTEM_LIBRARIES is set to.

As I understand it, the problem is then that when dynamically linking an ELF
binary, ld.so will look in directories listed in LD_LIBRARY_PATH before it
looks in the directories specified by the binary's DT_RUNPATH section. 
Therefore, if for instance a binary depends on a non-standard version of libc,
the location of which is specified via its DT_RUNPATH section, this will be
clobbered by GNUstep's LD_LIBRARY_PATH setting and the wrong libc will be
linked when attempting to run.  The Nix package manager (nixos.org) apparently
uses DT_RUNPATH extensively to handle dependencies, and sourcing GNUstep.sh
(on Arch at least) currently causes Nix to stop working.

I think the solution to this would be to add extra filtering to GNUstep.sh to
prevent it from adding paths that will be included by default anyway (at least
/lib and /usr/lib) to LD_LIBRARY_PATH.

If you think this something for Arch Linux to sort out with their package, I
am happy to take it up with them instead.

Cheers,

Alastair




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43381>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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