Re: compile glibc + nptl fail

Andreas Jaeger <[email protected]>
Newsgroups gmane.comp.lib.phil
Message-ID <[email protected]>
chen liwen <[email protected]> writes:

> 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?

ls is using the dynamic linker /lib/ld-linux.so.2 and the glibc from
/usr/local/glibc2.  This will not work since the dynamic linker and
the glibc are build differently (different sources and/or configure
options).  Some options:

- execute ls directly with
/lib/ld-linux.so.2 /bin/ls

- do not set LD_LIBRARY_PATH

- install with --prefix=/usr making it a system lib

- explictily link your test programs against the new lib with adding
  the following to gcc:
  -Wl,-dynamic-linker=/usr/local/glibc2/lib/ld-linux.so.2 -Wl,-rpath=/usr/local/glibc2/lib/


Andreas

>    chen
>
> --- Stefan Jones <[email protected]>
> wrote:
>> Edit
>> /data1/kernel/linux-2.5.74/include/linux/sysctl.h
>> and add near the
>> top
>> 
>> #define __user /* nil */
>> 
>> or similar.
>> 
>> ( you may also need gcc from CVS head, try otherwise
>> first )
>> 
>> Stefan
>> 
>> On Sat, 2003-07-12 at 12:39, chen liwen wrote:
>> > Now:
>> >    gcc: gcc-3.3-12 ( installed from Rawhide rpm )
>> >    ../configure --prefix=/usr/local/glibc2
>> --with-tls
>> > --enable-add-ons=nptl --with-headers=/usr/include
>> >    there are "can't find __NR_..." errors.
>> >    if I use
>> > with-headers=/data2/kernel/linux-2.5.74/include.
>> the
>> > error message are:
>> > ..../libc-start.o -MD -MP -MF
>> >
>>
> /data2/temp/glibc-2.3.2+nptl0.52/glibc-2.3.2+nptl0.52/build/csu/libc-start.o.dt
>> > In file included from
>> > ../sysdeps/unix/sysv/linux/sys/sysctl.h:29,
>> >                  from ../include/sys/sysctl.h:2,
>> >                  from
>> > ../sysdeps/unix/sysv/linux/dl-osinfo.h:22,
>> >                  from
>> > ../sysdeps/generic/libc-start.c:33:
>> >
>>
> /data1/kernel/linux-2.5.74/include/linux/sysctl.h:39:
>> 
>> 
>> 
>> -- 
>> Phil-list mailing list
>> [email protected]
>> https://www.redhat.com/mailman/listinfo/phil-list
>
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com

Andreas
-- 
 Andreas Jaeger, [email protected], http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
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.