This is the mail archive of the 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: Using Multiple versions of glibc using LD_LIBRARY_PATH env variable.

On Mon, Dec 29, 2008 at 2:06 PM, Kangkook Jee <> wrote:
>  $ export LD_LIBRARY_PATH=/tmp/lib-2.9/lib:$LD_LIBRARY_PATH
>  $ echo $LD_LIBRARY_PATH
>  /tmp/lib-2.9/lib
>  $ /bin/ls
>  Segmentation fault (core dumped)

This doesn't work because /bin/ls has a INTERP program header that
requests /lib/ and this dynamic loader does correctly
match the C library in /tmp/lib-2.9/lib/.

It would be nicer if it didn't SIGSEGV and printed an error.

> What I did next was using '' loader and it could exeute the
> command.
>  $/tmp/lib-2.9/lib/ --library-path /tmp/lib-2.9/lib /bin/ls

This is the correct way to load the application with an alternate libc.

> But I still want to find cleaner solution to have multiple versions of glic
> in a single machine. Can anyone help me with this?

Replace /lib/ with an application that checks an
environment variable and execs the right dynamic loader with the
correct options.


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