[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NPTL and TLS



James A. Morrison wrote:
 You need to give more details on what you have actually tried.

Right.
I've downloaded the glibc and tried ti compile.
The output of configure was:

HAL9000:~/glibc-2.3.2.ds1# ./glibc-2.3.2/configure --prefix=/tools
--enable-add-ons=nptl --with-tls --with-__thread --enable-kernel=2.6.10
checking build system type... sparc64-unknown-linux-gnu
checking host system type... sparc64-unknown-linux-gnu
checking sysdep dirs... sysdeps/sparc/sparc64/elf
nptl/sysdeps/unix/sysv/linux/sparc/sparc64
nptl/sysdeps/unix/sysv/linux/sparc nptl/sysdeps/unix/sysv/linux
nptl/sysdeps/pthread sysdeps/pthread nptl/sysdeps/unix/sysv
nptl/sysdeps/unix nptl/sysdeps/sparc/sparc64 nptl/sysdeps/sparc
sysdeps/unix/sysv/linux/sparc/sparc64 sysdeps/unix/sysv/linux/sparc
sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common
sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/sparc
sysdeps/unix sysdeps/posix sysdeps/sparc/sparc64/fpu
sysdeps/sparc/sparc64 sysdeps/wordsize-64 sysdeps/ieee754/ldbl-128
sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32
sysdeps/sparc/sparc64/soft-fp sysdeps/sparc/fpu sysdeps/sparc
sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking for gcc... gcc
checking version of gcc... 3.4.4, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.80, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 4.7, ok
checking for sed... sed
checking version of sed... 4.1.2, ok
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking whether as is GNU as... yes
checking whether ld is GNU ld... yes
checking for as... as
checking version of as... 2.15, ok
checking for ld... ld
checking version of ld... 2.15, ok
configure: WARNING:
*** These auxiliary programs are missing or incompatible versions: msgfmt
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/sh
checking for gawk... no
checking for mawk... mawk
checking for perl... /usr/bin/perl
checking for install-info... /usr/sbin/install-info
checking for old Debian install-info... no
checking for bison... /usr/bin/bison
checking for signed size_t type... no
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for .set assembler directive... yes
checking for assembler .type directive prefix... @
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... yes
checking for -z nodelete option... yes
checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -Bgroup option... yes
checking for -z combreloc... yes
checking whether cc puts quotes around section names... yes
checking for assembler .weak directive... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking for DWARF2 unwind info support... no_registry_needed
checking for __builtin_expect... yes
checking for __builtin_memset... no
checking for local label subtraction... yes
checking for __thread... yes
checking for tls_model attribute... yes
checking for libgd... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long double... yes
checking size of long double... 8
running configure fragment for ./glibc-2.3.2/sysdeps/sparc/sparc64/elf
checking for sparc64 TLS support... no
checking for sparc64 ld WDISP22 handling... ok
running configure fragment for ./glibc-2.3.2/nptl/sysdeps/unix/sysv/linux
running configure fragment for ./glibc-2.3.2/nptl/sysdeps/pthread
checking for forced unwind support... yes
checking for C cleanup handling... yes
running configure fragment for ./glibc-2.3.2/sysdeps/pthread
running configure fragment for ./glibc-2.3.2/sysdeps/unix/sysv/linux
checking for egrep... (cached) grep -E
checking installed Linux kernel header files... 2.0.10 or later
checking for kernel header at least 2.6.10... ok
checking for symlinks in /tools/include... ok
running configure fragment for ./glibc-2.3.2/sysdeps/unix/common
running configure fragment for ./glibc-2.3.2/sysdeps/unix
running configure fragment for ./glibc-2.3.2/sysdeps/generic
checking for old glibc 2.0.x headers... no
checking whether -fPIC is default... no
configure: creating ./config.status
config.status: creating config.make
config.status: creating glibcbug
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
configure: configuring in nptl
configure: running /bin/sh '.././glibc-2.3.2/nptl/configure'
--prefix=/tools  '--prefix=/tools' '--enable-add-ons=nptl' '--with-tls'
'--with-__thread' '--enable-kernel=2.6.10' --cache-file=/dev/null
--srcdir=.././glibc-2.3.2/nptl


The make command give some error:

HAL9000:~/glibc-2.3.2.ds1# make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ./glibc-2.3.2 objdir=`pwd` all
make[1]: Entering directory `/root/glibc-2.3.2.ds1/glibc-2.3.2'
echo '#include "posix/bits/posix1_lim.h"' |             \
SUNPRO_DEPENDENCIES='/root/glibc-2.3.2.ds1/bits/stdio_lim.dT
/root/glibc-2.3.2.ds1/bits/stdio_lim.st'                      \gcc
-Iinclude -I. -I/root/glibc-2.3.2.ds1  -Ilibio -Inptl
-I/root/glibc-2.3.2.ds1 -Isysdeps/sparc/sparc64/elf
-Inptl/sysdeps/unix/sysv/linux/sparc/sparc64
-Inptl/sysdeps/unix/sysv/linux/sparc -Inptl/sysdeps/unix/sysv/linux
-Inptl/sysdeps/pthread -Isysdeps/pthread -Inptl/sysdeps/unix/sysv
-Inptl/sysdeps/unix -Inptl/sysdeps/sparc/sparc64 -Inptl/sysdeps/sparc
-Isysdeps/unix/sysv/linux/sparc/sparc64 -Isysdeps/unix/sysv/linux/sparc
-Isysdeps/unix/sysv/linux -Isysdeps/gnu -Isysdeps/unix/common
-Isysdeps/unix/mman -Isysdeps/unix/inet -Isysdeps/unix/sysv
-Isysdeps/unix/sparc -Isysdeps/unix -Isysdeps/posix
-Isysdeps/sparc/sparc64/fpu -Isysdeps/sparc/sparc64
-Isysdeps/wordsize-64 -Isysdeps/ieee754/ldbl-128
-Isysdeps/ieee754/dbl-64 -Isysdeps/ieee754/flt-32
-Isysdeps/sparc/sparc64/soft-fp -Isysdeps/sparc/fpu -Isysdeps/sparc
-Isysdeps/ieee754 -Isysdeps/generic/elf -Isysdeps/generic  -I
/lib/modules/2.6.10-AZZ/build/include -E -dM -xc - -o
/root/glibc-2.3.2.ds1/bits/stdio_lim.hT
echo '#include "misc/sys/uio.h"' |                              \
SUNPRO_DEPENDENCIES='/root/glibc-2.3.2.ds1/bits/stdio_lim.dT
/root/glibc-2.3.2.ds1/bits/stdio_lim.st'                      \gcc
-D_LIBC=1 -Iinclude -I. -I/root/glibc-2.3.2.ds1  -Ilibio -Inptl
-I/root/glibc-2.3.2.ds1 -Isysdeps/sparc/sparc64/elf
-Inptl/sysdeps/unix/sysv/linux/sparc/sparc64
-Inptl/sysdeps/unix/sysv/linux/sparc -Inptl/sysdeps/unix/sysv/linux
-Inptl/sysdeps/pthread -Isysdeps/pthread -Inptl/sysdeps/unix/sysv
-Inptl/sysdeps/unix -Inptl/sysdeps/sparc/sparc64 -Inptl/sysdeps/sparc
-Isysdeps/unix/sysv/linux/sparc/sparc64 -Isysdeps/unix/sysv/linux/sparc
-Isysdeps/unix/sysv/linux -Isysdeps/gnu -Isysdeps/unix/common
-Isysdeps/unix/mman -Isysdeps/unix/inet -Isysdeps/unix/sysv
-Isysdeps/unix/sparc -Isysdeps/unix -Isysdeps/posix
-Isysdeps/sparc/sparc64/fpu -Isysdeps/sparc/sparc64
-Isysdeps/wordsize-64 -Isysdeps/ieee754/ldbl-128
-Isysdeps/ieee754/dbl-64 -Isysdeps/ieee754/flt-32
-Isysdeps/sparc/sparc64/soft-fp -Isysdeps/sparc/fpu -Isysdeps/sparc
-Isysdeps/ieee754 -Isysdeps/generic/elf -Isysdeps/generic  -I
/lib/modules/2.6.10-AZZ/build/include -E -dM -xc - | cat - >>
/root/glibc-2.3.2.ds1/bits/stdio_lim.hT
sed -e 's@ /root/glibc-2\.3\.2\.ds1/@ $(common-objpfx)@g' -e
's@^/root/glibc-2\.3\.2\.ds1/@$(common-objpfx)@g'
/root/glibc-2.3.2.ds1/bits/stdio_lim.dT >
/root/glibc-2.3.2.ds1/bits/stdio_lim.dt
cat /root/glibc-2.3.2.ds1/bits/stdio_lim.dt >>
/root/glibc-2.3.2.ds1/bits/stdio_lim.d
fopen_max=`sed -n 's/^#define OPEN_MAX //1p'
/root/glibc-2.3.2.ds1/bits/stdio_lim.hT`;  \
filename_max=`sed -n 's/^#define PATH_MAX //1p'
/root/glibc-2.3.2.ds1/bits/stdio_lim.hT`;       \
iov_max=`sed -n 's/^#define UIO_MAXIOV //p'
/root/glibc-2.3.2.ds1/bits/stdio_lim.hT`;   \
fopen_max=${fopen_max:-16};                                     \
filename_max=${filename_max:-1024};                             \
if [ -z $iov_max ]; then                                        \
  define_iov_max="# undef IOV_MAX";                             \
else                                                            \
  define_iov_max="# define IOV_MAX $iov_max";                   \
fi;                                                             \
sed -e "s/@FOPEN_MAX@/$fopen_max/"                              \
    -e "s/@FILENAME_MAX@/$filename_max/"                        \
    -e "s/@L_tmpnam@/20/"                               \
    -e "s/@TMP_MAX@/238328/"                            \
    -e "s/@L_ctermid@/9/"                               \
    -e "s/@L_cuserid@/9/"                               \
    -e "s/@define_IOV_MAX@/$define_iov_max/"                    \
    stdio-common/stdio_lim.h.in >
/root/glibc-2.3.2.ds1/bits/stdio_lim.h.new
/bin/sh scripts/move-if-change
/root/glibc-2.3.2.ds1/bits/stdio_lim.h.new
/root/glibc-2.3.2.ds1/bits/stdio_lim.h
/root/glibc-2.3.2.ds1/bits/stdio_lim.h is unchanged
rm -f /root/glibc-2.3.2.ds1/bits/stdio_lim.hT
/root/glibc-2.3.2.ds1/bits/stdio_lim.dT
/root/glibc-2.3.2.ds1/bits/stdio_lim.dt
touch /root/glibc-2.3.2.ds1/bits/stdio_lim.st
rm -f /root/glibc-2.3.2.ds1/tls.makeT /root/glibc-2.3.2.ds1/tls.make.dT
(echo '# Generated from tls.make.c by Makerules.'; \
 SUNPRO_DEPENDENCIES='/root/glibc-2.3.2.ds1/tls.make.dT
$(common-objpfx)tls.make' \
 gcc -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings
-g -fcall-used-g6     -Iinclude -I. -I/root/glibc-2.3.2.ds1  -Ilibio
-Inptl -I/root/glibc-2.3.2.ds1 -Isysdeps/sparc/sparc64/elf
-Inptl/sysdeps/unix/sysv/linux/sparc/sparc64
-Inptl/sysdeps/unix/sysv/linux/sparc -Inptl/sysdeps/unix/sysv/linux
-Inptl/sysdeps/pthread -Isysdeps/pthread -Inptl/sysdeps/unix/sysv
-Inptl/sysdeps/unix -Inptl/sysdeps/sparc/sparc64 -Inptl/sysdeps/sparc
-Isysdeps/unix/sysv/linux/sparc/sparc64 -Isysdeps/unix/sysv/linux/sparc
-Isysdeps/unix/sysv/linux -Isysdeps/gnu -Isysdeps/unix/common
-Isysdeps/unix/mman -Isysdeps/unix/inet -Isysdeps/unix/sysv
-Isysdeps/unix/sparc -Isysdeps/unix -Isysdeps/posix
-Isysdeps/sparc/sparc64/fpu -Isysdeps/sparc/sparc64
-Isysdeps/wordsize-64 -Isysdeps/ieee754/ldbl-128
-Isysdeps/ieee754/dbl-64 -Isysdeps/ieee754/flt-32
-Isysdeps/sparc/sparc64/soft-fp -Isysdeps/sparc/fpu -Isysdeps/sparc
-Isysdeps/ieee754 -Isysdeps/generic/elf -Isysdeps/generic  -I
/lib/modules/2.6.10-AZZ/build/include -D_LIBC_REENTRANT
-D_LIBC_REENTRANT -include include/libc-symbols.h       -E tls.make.c \
 | sed -n '/@@@/{s/@@@[  ]*\(.*\)@@@/\1/;s/[     ]*$//p;}'; \
 echo 'common-generated += tls.make'; \
 sed -e 's@ /root/glibc-2\.3\.2\.ds1/@ $(common-objpfx)@g' -e
's@^/root/glibc-2\.3\.2\.ds1/@$(common-objpfx)@g' -e 's@  *\([^
\/$][^  \]*\)@ $(..)\1@g' /root/glibc-2.3.2.ds1/tls.make.dT; \
 rm -f /root/glibc-2.3.2.ds1/tls.make.dT) > /root/glibc-2.3.2.ds1/tls.makeT
In file included from include/tls.h:3,
                 from tls.make.c:3:
nptl/sysdeps/sparc/tls.h:52:3: #error "TLS support is required."
In file included from ./nptl/descr.h:30,
                 from nptl/sysdeps/sparc/tls.h:63,
                 from include/tls.h:3,
                 from tls.make.c:3:
nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h:26:20: atomic.h: No
such file or directory
mv -f /root/glibc-2.3.2.ds1/tls.makeT /root/glibc-2.3.2.ds1/tls.make
sed '/^[        ]*#/d;s/^[      ]*%/#/' csu/Versions assert/Versions
ctype/Versions locale/Versions intl/Versions catgets/Versions
math/Versions setjmp/Versions signal/Versions stdlib/Versions
stdio-common/Versions libio/Versions malloc/Versions string/Versions
wcsmbs/Versions time/Versions dirent/Versions grp/Versions pwd/Versions
posix/Versions io/Versions termios/Versions resource/Versions
misc/Versions socket/Versions sysvipc/Versions gmon/Versions
iconv/Versions wctype/Versions shadow/Versions argp/Versions
crypt/Versions nptl/Versions nss/Versions rt/Versions debug/Versions
nptl_db/Versions inet/Versions resolv/Versions hesiod/Versions
sunrpc/Versions nis/Versions streams/Versions login/Versions
dlfcn/Versions elf/Versions
nptl/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
nptl/sysdeps/unix/sysv/linux/sparc/Versions
nptl/sysdeps/unix/sysv/linux/Versions
sysdeps/unix/sysv/linux/sparc/sparc64/Versions
sysdeps/unix/sysv/linux/sparc/Versions sysdeps/unix/sysv/linux/Versions
sysdeps/unix/sysv/Versions sysdeps/sparc/sparc64/Versions
sysdeps/sparc/sparc64/soft-fp/Versions \
| gcc -E -undef  -Iinclude -I. -I/root/glibc-2.3.2.ds1  -Ilibio -Inptl
-I/root/glibc-2.3.2.ds1 -Isysdeps/sparc/sparc64/elf
-Inptl/sysdeps/unix/sysv/linux/sparc/sparc64
-Inptl/sysdeps/unix/sysv/linux/sparc -Inptl/sysdeps/unix/sysv/linux
-Inptl/sysdeps/pthread -Isysdeps/pthread -Inptl/sysdeps/unix/sysv
-Inptl/sysdeps/unix -Inptl/sysdeps/sparc/sparc64 -Inptl/sysdeps/sparc
-Isysdeps/unix/sysv/linux/sparc/sparc64 -Isysdeps/unix/sysv/linux/sparc
-Isysdeps/unix/sysv/linux -Isysdeps/gnu -Isysdeps/unix/common
-Isysdeps/unix/mman -Isysdeps/unix/inet -Isysdeps/unix/sysv
-Isysdeps/unix/sparc -Isysdeps/unix -Isysdeps/posix
-Isysdeps/sparc/sparc64/fpu -Isysdeps/sparc/sparc64
-Isysdeps/wordsize-64 -Isysdeps/ieee754/ldbl-128
-Isysdeps/ieee754/dbl-64 -Isysdeps/ieee754/flt-32
-Isysdeps/sparc/sparc64/soft-fp -Isysdeps/sparc/fpu -Isysdeps/sparc
-Isysdeps/ieee754 -Isysdeps/generic/elf -Isysdeps/generic  -I
/lib/modules/2.6.10-AZZ/build/include -D_LIBC_REENTRANT
-D_LIBC_REENTRANT -include include/libc-symbols.h       \
           -DASSEMBLER -x assembler-with-cpp - \
           > /root/glibc-2.3.2.ds1/Versions.v.iT
In file included from include/tls.h:3,
                 from <stdin>:1:
nptl/sysdeps/sparc/tls.h:52:3: #error "TLS support is required."
make[1]: *** [/root/glibc-2.3.2.ds1/Versions.v.i] Error 1
make[1]: Leaving directory `/root/glibc-2.3.2.ds1/glibc-2.3.2'
make: *** [all] Error 2


So, I dont' know what to do :-(



Reply to: