[M3devel] $ORIGIN?
Olaf Wagner
wagner at elegosoft.com
Fri Jul 16 15:10:02 CEST 2010
Quoting Jay K <jay.krell at cornell.edu>:
> 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.
That's correct.
Alas, there's no common standard shared by all the systems we support.
> This means, something like:
> FreeBSD users using < 8.0 will need/want to set LD_LIBRARY_PATH.
We should document that as a workaround.
> 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.
We should keep that for the time being.
> 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.
/usr/local/cm3 was the original one standard location when we first
published the sources from Critical Mass. But lots of people complained
and wanted more flexibility, or rather their platform-specific different
standard setups.
We haven't got the ressources to fulfill all wishes currently.
I'd vote to keep the status quo until someone either has a great idea
or implements something better, or we'll keep changing solutions back
and forth.
Olaf
--
Olaf Wagner -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
More information about the M3devel
mailing list