[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Question about: -R '$ORIGIN/../lib'

From: Boehne, Robert
Subject: RE: Question about: -R '$ORIGIN/../lib'
Date: Wed, 21 Aug 2002 10:37:24 -0400

The "relative hardcoded runpaths" aren't supported by all
systems, so adding support for it to Libtool wouldn't be
useful to those of us who use such systems.  It has been
requested 1000 times, but it would lead to confusion
and portability problems for most of us.

Can you "cheat" and use somthing like "-Wl,-R'$ORIGIN/../lib'" ?



-----Original Message-----
From: Simon Ney [mailto:address@hidden]
Sent: Friday, August 16, 2002 10:14 AM
To: address@hidden
Subject: Question about: -R '$ORIGIN/../lib'


will libtool support in the future "relative hardcoded runpaths" ?
This allow us to move installed "bin/*" and "lib/*" without
Or assume you install binary packages and are ask just before
for the prefix directory to install into (e.g. /opt or /usr/opt ...
that may be BASEDIR in pkgadd of solaris).
All checksums of installed package files remain the same independent of
the installation directory.

Relative hardcoded runpaths are supported by solaris and possible
all ELF systems (?).

example how it works:

# mkdir OBJ
# mkdir OBJ/lib
# cc -G -h -o OBJ/lib/ support.o
# ln -s OBJ/lib/
# ln -s OBJ/lib/
# mkdir OBJ/bin
# cc -o OBJ/bin/main main.o -LOBJ/lib -R'$ORIGIN/../lib' -lsupp

in action:

# ldd OBJ/bin/main      =>  /tmp/libtool-question/OBJ/lib/

# mv OBJ /tmp/moved

# ldd /tmp/moved/bin/main =>  /tmp/moved/lib/

# dump -Lv /tmp/moved/bin/main

[INDEX] Tag         Value
[1]     NEEDED
[2]     NEEDED
[5]     RUNPATH         $ORIGIN/../lib
[6]     RPATH           $ORIGIN/../lib

All what have to be done is replace the absolute part with '$ORIGIN'.
Careful observe the usage of $ORIGIN in Makefiles ( quotedstring and
is required ... e.g.: '$$ORIGIN' )

NOTE: this also works with:
        - Libraries hardcored to other libraries
        - Other ABI or ISA
          example for 64bit (installed in OBJ/bin/sparcv9/main and


| Simon Ney, Bischofsweg 46 60598 Frankfurt/M Tel: ++49 69 68600055 |
| Email address@hidden Fax: ++49 69 68600052 |

Libtool mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]