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

 
 

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

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

Submitted by:  Alastair Pharo <asppsa>
Submitted on:  Wed Oct 8 13:18:08 2014  
 
Category: MakefilesSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Wed Oct 8 13:18:08 2014, 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.

Cheers,

Alastair

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
  • -unavailable- added by asppsa (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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1