Re: compile glibc + nptl fail

Dan Kegel <[email protected]>
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
chen liwen wrote:
> Yes, I have corrected the problem, and install glibc
> under directory /usr/local/glibc2.  In order to use
> the new glibc, I do the following:
>  (1) export LD_LIBRARY_PATH=/usr/local/glibc2/lib
>  (2) when I execute ls , there are errors occurred:
>   ls: error while loading shared libraries: libc.so.6:
> cannot handle TLS data
>   then what should I do for this?

I've been setting up chroot jails to test with alternate glibc's
etc.  Haven't tried it with NPTL yet, but maybe my procedure will
help there.   It's basically:

first, grab a copy of the new glibc's shared libraries and the system passwd file:

   mkjail.sh /usr/local/glibc2 /etc/passwd

then create the jail:

$ su
# cat jail.tar.gz | sh initjail.sh myjail

then test the jail:

# /usr/sbin/chroot `pwd`/myjail /bin/sh

The scripts are documented at

http://www.kegel.com/crosstool/crosstool-0.11/doc/chroot-login-howto.html

All you need there is step 1; the rest is to allow remote login into
the chroot jail.  You may need to adjust the scripts I wrote a bit,
if nptl adds any shared libraries, you need to add them to the list
in mkjail.sh.  And you'll need to either install /bin/ash, which is the shell my
script copies instead of /bin/sh, or edit the script.
- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.