This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: librt and libpthread in alternate prefix


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 .....
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]