This is the mail archive of the libc-alpha@sources.redhat.com 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]

build failure in linuxthreads


While compiling glibc CVS as of 2005-03-22 on Linux/x86 (SuSE 9.0 but
gcc-3.4, no TLS), I got this error:

# ../glibc-20050322/configure --enable-all-warnings --prefix=/usr --with-headers=/usr/include --enable-add-ons=linuxthreads
# make
gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux.so.2 -B/packages/glibc-20050322-build/linuxthreads/ -B/packages/glibc-20050322-build/csu/ -B/packages/glibc-20050322-build/linuxthreads/ -Wl,--version-script=/packages/glibc-20050322-build/libpthread.map -Wl,-soname=libpthread.so.0 -Wl,-z,combreloc -Wl,--enable-new-dtags,-z,nodelete -Wl,--enable-new-dtags,-z,initfirst -L/packages/glibc-20050322-build -L/packages/glibc-20050322-build/math -L/packages/glibc-20050322-build/elf -L/packages/glibc-20050322-build/dlfcn -L/packages/glibc-20050322-build/nss -L/packages/glibc-20050322-build/nis -L/packages/glibc-20050322-build/rt -L/packages/glibc-20050322-build/resolv -L/packages/glibc-20050322-build/crypt -L/packages/glibc-20050322-build/linuxthreads -Wl,-rpath-link=/packages/glibc-20050322-build:/packages/glibc-20050322-build/math:/packages/glibc-20050322-build/elf:/packages/glibc-20050322-build/dlfcn:/packages/glibc-20050322-build/nss:/packages/glibc-20050322-build/nis:/packages/glibc-20050322-build/rt:/packages/glibc-20050322-build/resolv:/packages/glibc-20050322-build/crypt:/packages/glibc-20050322-build/linuxthreads -o /packages/glibc-20050322-build/linuxthreads/libpthread.so -T /packages/glibc-20050322-build/shlib.lds /packages/glibc-20050322-build/csu/abi-note.o -Wl,--whole-archive /packages/glibc-20050322-build/linuxthreads/libpthread_pic.a -Wl,--no-whole-archive /packages/glibc-20050322-build/elf/interp.os /packages/glibc-20050322-build/libc.so /packages/glibc-20050322-build/libc_nonshared.a /packages/glibc-20050322-build/elf/ld.so 
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.text+0x228): In function `pthread_initialize':
/packages/glibc-20050322/linuxthreads/pthread.c:550: référence indéfinie vers « _res »
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.text+0xc11): In function `__pthread_reset_main_thread':
/packages/glibc-20050322/linuxthreads/pthread.c:1146: référence indéfinie vers « _errno »
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.text+0xc23):/packages/glibc-20050322/linuxthreads/pthread.c:1147: référence indéfinie vers « _h_errno »
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.text+0xc2f):/packages/glibc-20050322/linuxthreads/pthread.c:1148: référence indéfinie vers « _res »
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.data.rel+0x6b8): In function `__pthread_setschedparam':
/packages/glibc-20050322/linuxthreads/internals.h:180: référence indéfinie vers « _errno »
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.data.rel+0x6c0):/packages/glibc-20050322/linuxthreads/internals.h:180: référence indéfinie vers « _h_errno »
/packages/glibc-20050322-build/linuxthreads/libpthread_pic.a(pthread.os)(.data.rel+0x6c8): In function `__pthread_setschedparam':
/packages/glibc-20050322/linuxthreads/pthread.c:954: référence indéfinie vers « _res »
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [/packages/glibc-20050322-build/linuxthreads/libpthread.so] Fehler 1
make[2]: Leaving directory `/packages/glibc-20050322/linuxthreads'
make[1]: *** [linuxthreads/others] Fehler 2
make[1]: Leaving directory `/packages/glibc-20050322'
make: *** [all] Fehler 2

Indeed, there is no variable _errno variable neither in elf/ld.so nor in
libc.so nor in linuxthreads/libpthread_pic.a.

"nm inet/herrno.os" shows that USE___THREAD was true, therefore
USE_TLS && HAVE___THREAD was true as well.

"nm linuxthreads/pthread.os" shows that USE_TLS was false.

How come?

HAVE___THREAD is defined in config.h.
HAVE_TLS_SUPPORT is defined in config.h.
__LINUX_KERNEL_VERSION is not defined in config.h.
__ASSUME_LDT_WORKS is not defined by sysdeps/unix/sysv/linux/kernel-features.h
FLOATING_STACKS is not defined by linuxthreads/sysdeps/i386/useldt.h

linuxthreads/sysdeps/i386/tls.h has this:
#if defined HAVE_TLS_SUPPORT && (defined FLOATING_STACKS || !defined IS_IN_libpthread)
# define USE_TLS        1

Here I'm lost. If USE_TLS is not defined if IS_IN_libpthread, then what do the
#if USE_TLS tests in linuxthreads/pthread.c mean?

Any idea?

                   Bruno

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