librt and libpthread in alternate prefix

Mike Frysinger vapier@gentoo.org
Fri May 15 02:28:00 GMT 2009


On Thursday 14 May 2009 22:25:49 Poor Yorick wrote:
> Mike Frysinger wrote:
>  > On Thursday 14 May 2009 21:06:49 Poor Yorick wrote:
>  >> Mike Frysinger wrote:
>  >>  > On Thursday 14 May 2009 20:00:36 Poor Yorick wrote:
>  >>  >> Mike Frysinger wrote:
>  >>  >>  > On Tuesday 12 May 2009 10:15:16 Poor Yorick wrote:
>  >>  >>  >> Mike Frysinger wrote:
>  >>  >>  >>  > On Monday 11 May 2009 23:34:16 Poor Yorick wrote:
>  >>  >>  >>  >> Because my goal is to build a software collection in an
>  >>  >>  >>  >> alternate library path which uses its own glibc, I'm trying
>  >>  >>  >>  >> to get the new loader to work from the alternate location
>  >>  >>  >>  >> without setting --library-path.
>  >>  >>  >>  >
>  >>  >>  >>  > so use a wrapper script that builds paths using $0
>  >>  >>  >>
>  >>  >>  >> That's a kludge that doesn't work well, since wrapper scripts
>  >>  >>  >> aren't suitable for the #! line.
>  >>  >>  >
>  >>  >>  > i dont really know what you're talking about here.  #!/bin/sh
>  >>  >>  > works just fine.
>  >>  >>
>  >>  >> I mean that I can't wrap binaries compiled against the alternate
>  >>  >> glibc in a script that calls the real binary using the new loader. 
>  >>  >> For example, if I wrap awk in a script called awk_new, I can't do
>  >>  >> this:
>  >>  >>
>  >>  >> 	!# /path/to/alternate/awk_new
>  >>  >>
>  >>  >> because the !# mechanism requires a binary, not a script.
>  >>  >
>  >>  > your wrapper is a script that executes the right ldso with the right
>  >>  > paths. use #!/bin/sh like normal.
>  >>
>  >> If this is what you had in mind (awk being a wrapper for the real awk):
>  >>
>  >>      #! /bin/sh /path/to/alternate/bin/awk
>  >
>  > i dont know why you keeping going down this line of logic.  you said
>  > you're concerned with running different libs and that's it.
>  > #!/bin/sh
>  > ${0%/*}/ld.so .....
>
> This is not acceptable, because if this script is called "awk", users will
> expect to be able to do this:
>
>      #! /path/to/alternate/bin/awk
>
> and they will get a "permission denied" error, because now awk is just a
> script (wrapping the real awk) instead of an executable.  On the #! line,
> the second item must be binary executable, not a script.

i really havent a clue wahat you're talking about.  whatever.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20090515/7494660a/attachment.sig>


More information about the Libc-help mailing list