This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: librt and libpthread in alternate prefix
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.
>
>> Wouldn't embedded RPATH/RUNPATH entries be an
>> alternative?
>
> no, as has been explained multiple times in this list. you cannot mix and
> match ldso's and C libs.
> -mike
Thank you for continuing to try to help me out, but you seem to be missing what
I keep saying: I am trying exactly to get the new loader to _stop_ mixing
ldso's and c libs. The embedded RPATH/RUNPATH helps the new loader find its
own matching libpthread. Without the RPATH/RUNPATH setting, the new loader was
finding an old libpthread in /lib/tls. I didn't want to use RPATH/RUNPATH
because it seemed like there should be some way to configure the new loader to
find its own libpthread, rather than some older version in /lib/tls. So far,
however, setting RPATH/RUNPATH on the glibc libraries themselves is the only
way I have been able to accomplish this.
In any case, I am now following the Linux from Scratch guide, with some
modifications, to try to produce a working glibc and alternate loader. It
would still be helpful to know:
. Is there some way, short of embedding RPATH/RUNPATH in glibc libraries,
to get the new loader to find its own, e.g., libpthread?
. Is there a better way to embed RPATH/RUNPATH in libc libraries, when
necessary?
--
Yorick