• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH


  • Subject: Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH
  • From: email@hidden
  • Date: Thu, 03 Aug 2006 15:16:36 +0200 (MEST)

On Thu, 3 Aug 2006, Peter O'Gorman wrote:

On Aug 3, 2006, at 7:26 PM, email@hidden wrote:

Hi all,

I try to figure out the link options for specifying RPATH/RUNPATH
under Darwin. I need this to overcome the need of setting
LD_LIBRARY_PATH with Grid Engine as described in

  http://gridengine.sunsource.net/issues/show_bug.cgi?id=2090

with other OSes there are link options that allow library pathes
be set *relative* to the executable path at the time when the executable is linked through


  Solaris: -R $ORIGIN/../lib
  Linux:   -rpath $ORIGIN/../lib

I believe there must be something related for Darwin, but I
found no such in ld(1) man page.

Anyone knowing this?

$ORIGIN on solaris and linux allow you to specify the library location relative to the application or library that needs it. For similar options on darwin see the man page for install_name_tool(1) and the dyld release note for information about @executable_path and @loader_path.

Ok. Then it seems to be necessary to run

   install_name_tool -change <libname> @executable_path/<relative_path>/<libname> <executable>

for each library dependency of an executable where a relative path shall be in effect.

Thanks, Peter!

Cheers,
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH
      • From: almisr <email@hidden>
References: 
 >Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH (From: email@hidden)
 >Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH (From: "Peter O'Gorman" <email@hidden>)

  • Prev by Date: Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH
  • Next by Date: Should getWorkLoop be thread-safe?
  • Previous by thread: Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH
  • Next by thread: Re: Relative setting of RPATH/RUNPATH to overcome need for LD_LIBRARY_PATH
  • Index(es):
    • Date
    • Thread