bugGNUstep - Bugs: bug #43381, Sourcing GNUstep.sh can cause...


You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Alastair Pharo <asppsa>
Submitted on:  Wed 08 Oct 2014 01:18:08 PM UTC  
Category:  Makefiles Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Wed 08 Oct 2014 01:18:08 PM UTC, original submission:

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.



Alastair Pharo <asppsa>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by asppsa (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.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.3