the trouble with $ORIGIN

Carlos O'Donell carlos@systemhalted.org
Tue Oct 19 23:11:00 GMT 2010


On Mon, Oct 18, 2010 at 8:21 PM,  <com.redhat.glibc@pooryorick.com> wrote:
> For the past couple of years, I've been working on building a software
> collection which is install-path-agnostic.  It relies on the use of $ORIGIN in
> every shared object.  The dollar sign in "$ORIGIN", though, has proven
> hazardous. It must be escaped so that it doesn't get eaten by autoconf
> (configure).  Then it must be escaped some more so it doesn't get eaten by
> Make.  But if Makefile calls make recursively, passing LDFLAGS on the command
> line, it must be escaped further.  Then, it must be escaped even more depending
> on the whims of the shell scripts that may run as part of a software build.
> Finally, it can easily get lost as programs try to communicate their
> configuration settings to other builds.  For example, the gtk+ "configure"
> script calls "cups-config --libs", the output of which is then interpolated by
> autoconf into gtk+/Makefile between double quotes.  If the output contains
> "$ORIGIN", or rather, due to Make escaping, "\$$ORIGIN", $$ ends up being
> interpreted as the pid of the current shell.

Can you use a compiler spec file to do this without having to pass
around $ORIGIN?

Cheers,
Carlos.



More information about the Libc-help mailing list