[M3devel] $ORIGIN?
Jay K
jay.krell at cornell.edu
Fri Jul 16 14:58:42 CEST 2010
So I can build a distribution FreeBSD 4.11...
But it looks like FreeBSD didn't support $ORIGIN until very recently: 8.0.
This is evidenced from two places:
http://www.freebsd.org/releases/8.0R/relnotes-detailed.html
indicates it is new
and http://www.freebsd.org/cgi/man.cgi lets you specify version.
The ld-elf.so manpage doesn't mention it until 8.0.
This means, something like:
FreeBSD users using < 8.0 will need/want to set LD_LIBRARY_PATH.
I don't think the distributed binaries have any hardcoded paths in them, except for the $ORIGIN stuff,
which I think will just be ignored. "Normally" they do, but the distribution build specifically
tries to omit them.
This "puts pressure" on considering "this problem" more/again?
NetBSD < 5.0, FreeBSD < 8.0 ... enough to do something about?
I've been looking into autoconf and libtool some, but i haven't yet, like..
what I'd like to see very clearly is them do the "relink before install" behavior.
Once confirmed to be there.. maybe our "binary" packages are a bunch of .o files?
Interesting compromise?
Or, really, maybe we somewhat give up on "relocatability" and hardcode /usr/local/cm3?
I realize, official Debian packages need to be at /usr.
Anyone building from source, can put the files anywhere.
We can also only "give up" on FreeBSD and/or NetBSD -- where $ORIGIN is more recent introduction.
I also seem to recall OSF/1 supports arbitrary environment variables, but doesn't define anything for you like $ORIGIN.
Some system is that way.
For that can invent custom names and wrapper scripts perhaps.
I know, a likely question, it has been asked for, "what is common?" i.e. portable, works the same "everywhere"?
That would be hardcoded paths, no relocatability.
$ORIGIN is very common, but less so.
I'm the one who opened this can of worms here.
The previous -rpath was a mess with lots of directories. That could at least be changed to something short.
$ORIGIN is indeed very promising and fairly portable, but not perfectly portable nor perfectly "behaved".
I don't think any solution is perfectly "behaved", there are contradictory goals.
- Jay
More information about the M3devel
mailing list