[lsb-discuss] Binary relocatability
dank at kegel.com
Thu Mar 6 13:14:48 PST 2003
Mike Hearn wrote:
> The problem exists because, in the absence of a generally accepted way
> to actually find out where you've been installed to, it was easier to
> rely on auto* magic to sort things out. The fact that it's relatively
> easy to compile from source just meant the problem never really got the
> attention it really needs.
The problem predates auto* magic. gcc and friends have this
property, and they weren't built with autoconf, I think.
> For those who may not be aware, it's a quirk of UNIX that there's no API
> to locate the absolute path of the binary at runtime. Windows has one,
> and presumably so does MacOS. There is one on Linux, you can stat
> /proc/$pid/exe which is a symlink to the binary. I don't know how
> portable that is. Obviously that doesn't work for scripts, the symlink
> just points to the location of the interpreter, not the script.
> I don't really know if this is a job for the LSB or is just a case of
The LSB, like many good standards bodies, has tended to codify
existing practice, not invent stuff. IMHO the thing to do is
just get out there and get people to fix apps to be relocatable
at install time. (Montavista has been doing this to the gnu
tools, I think.) Once there's some momentum, then the LSB can
consider requiring all packages to be relocatable, or something like that.
BTW, there has been some talk about relocation on the RPM list
lately. It seems rpm's package relocation stuff was broken
until recently. Since the rpm crowd is starting to get
relocation religion, maybe that's a place to start.
You could e.g. get rpmfind.net to list the relocatability
of each package in their list and/or start a Hall of Shame
for nonrelocatable packages :-)
More information about the lsb-discuss