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

Group
 
 

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

Submitter:  Alastair Pharo <asppsa>
Submitted:  Wed 08 Oct 2014 01:18:08 PM UTC
   
 
Category:  Makefiles Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  gcasa
Open/Closed:  Declined
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.13-cf05.
    Corresponding source code