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:  Wont Fix
Privacy:  Public Assigned to:  Gregory John Casamento <gcasa>
Open/Closed:  Declined

Sat 20 Apr 2019 03:06:56 PM UTC, comment #1: 

I believe this to clearly be a problem with Nix... why on earth would they be using a custom libc?

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
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.

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
  • -email is unavailable- added by gcasa (Posted a comment)
  • -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.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-20 gcasa StatusNone => Wont Fix
        Assigned toNone => gcasa
        Open/ClosedOpen => Declined

    Back to the top


    Powered by Savane 3.5