bug-glibc
[Top][All Lists]
Advanced

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

probs building TLS-enabled glibc-2.3.2 on RH 9 -- _errno undef


From: Gary Funck
Subject: probs building TLS-enabled glibc-2.3.2 on RH 9 -- _errno undef
Date: Sat, 14 Aug 2004 14:54:41 -0700


I'm trying to build glibc 2.3.2 to track down a possible interaction between
an application (which makes use of the TLS capability and pthreads) and
glibc.
My goal is to build glibc-2.3.2 in as similar manner as possible as the
installed version of libc.so on my RH 9 system.

Before diving into the particulars,
I was uncertain as to whether the linuxthreads add-on was required, in
order to match up with the way libc.so is built on RH 9 Liuux, but I assumed
so.
I notice that in some messages relating to glibc 2.3.3 they talk about
installing
the nptl add-on. Is that what I should've done, instead of installing the
'linusthreads' add-on?


The build fails with undefined references to _errno in this step (lines are
wrapped):

gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/upc/g
libc-2.3.2/lib/ld-linux.so.2 -B/upc/glibc-2.3.2/wrk/linuxthreads/ -B/upc/gli
bc-2.3.2/wrk/csu/ -B/upc/glibc-2.3.2/wrk/linuxthreads/ -Wl,--version-script=
/upc/glibc-2.3.2/wrk/libpthread.map -Wl,-soname=libpthread.so.0 -Wl,-z,combr
eloc -Wl,--enable-new-dtags,-z,nodelete -Wl,--enable-new-dtags,-z,initfirst
-L/upc/glibc-2.3.2/wrk -L/upc/glibc-2.3.2/wrk/math -L/upc/glibc-2.3.2/wrk/el
f -L/upc/glibc-2.3.2/wrk/dlfcn -L/upc/glibc-2.3.2/wrk/nss -L/upc/glibc-2.3.2
/wrk/nis -L/upc/glibc-2.3.2/wrk/rt -L/upc/glibc-2.3.2/wrk/resolv -L/upc/glib
c-2.3.2/wrk/crypt -L/upc/glibc-2.3.2/wrk/linuxthreads -Wl,-rpath-link=/upc/g
libc-2.3.2/wrk:/upc/glibc-2.3.2/wrk/math:/upc/glibc-2.3.2/wrk/elf:/upc/glibc
-2.3.2/wrk/dlfcn:/upc/glibc-2.3.2/wrk/nss:/upc/glibc-2.3.2/wrk/nis:/upc/glib
c-2.3.2/wrk/rt:/upc/glibc-2.3.2/wrk/resolv:/upc/glibc-2.3.2/wrk/crypt:/upc/g
libc-2.3.2/wrk/linuxthreads -o /upc/glibc-2.3.2/wrk/linuxthreads/libpthread.
so -T /upc/glibc-2.3.2/wrk/linuxthreads/libpthread.so.lds /upc/glibc-2.3.2/w
rk/csu/abi-note.o -Wl,--whole-archive /upc/glibc-2.3.2/wrk/linuxthreads/libp
thread_pic.a -Wl,--no-whole-archive /upc/glibc-2.3.2/wrk/elf/interp.os /upc/
glibc-2.3.2/wrk/libc.so /upc/glibc-2.3.2/wrk/libc_nonshared.a /upc/glibc-2.3
.2/wrk/elf/ld.so
/upc/glibc-2.3.2/wrk/linuxthreads/libpthread_pic.a(pthread.os)(.text+0xb65):
 In function `__pthread_reset_main_thread':
/upc/glibc-2.3.2/src/linuxthreads/pthread.c:1070: undefined reference to `_e
rrno'
/upc/glibc-2.3.2/wrk/linuxthreads/libpthread_pic.a(pthread.os)(.text+0xb71):
/upc/glibc-2.3.2/src/linuxthreads/pthread.c:1071: undefined reference to `_h
_errno'
[...]



----

This build is on a Redhat 9 installation, running
"gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)". I tried building glibc
by downwloading both glibc-2.3.2.tar.gz and glibc-linuxthreads-2.3.2.tar.gz,
unpacking, and the running configure as follows:


/upc/glibc-2.3.2/src/configure --with-tls --enable-add-ons --prefix=/upc/gli
bc-2.3.2

The platform info is as follows:

## --------- ##
## Platform. ##
## --------- ##

hostname = upc
uname -m = i686
uname -r = 2.4.20-18.9smp
uname -s = Linux
uname -v = #1 SMP Thu May 29 06:55:05 EDT 2003

And the configuration definitions are:

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define ASM_GLOBAL_DIRECTIVE .globl
#define ASM_TYPE_DIRECTIVE_PREFIX @
#define DO_VERSIONING 1
#define EXPORT_UNWIND_FIND_FDE 1
#define HAVE_ASM_PREVIOUS_DIRECTIVE 1
#define HAVE_ASM_SET_DIRECTIVE 1
#define HAVE_ASM_WEAK_DIRECTIVE 1
#define HAVE_BUILTIN_EXPECT 1
#define HAVE_ELF 1
#define HAVE_GNU_AS 1
#define HAVE_GNU_LD 1
#define HAVE_HIDDEN 1
#define HAVE_INITFINI_ARRAY 1
#define HAVE_INTTYPES_H 1
#define HAVE_MEMORY_H 1
#define HAVE_PROTECTED 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRINGS_H 1
#define HAVE_STRING_H 1
#define HAVE_SUBTRACT_LOCAL_LABELS 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_TLS_MODEL_ATTRIBUTE 1
#define HAVE_TLS_SUPPORT 1
#define HAVE_UNISTD_H 1
#define HAVE_VISIBILITY_ATTRIBUTE 1
#define HAVE_Z_COMBRELOC 1
#define HAVE___THREAD 1
#define NO_UNDERSCORES 1
#define PACKAGE_BUGREPORT "glibc"
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_TARNAME "c-library"
#define PACKAGE_VERSION "(see version.h)"
#define PI_STATIC_AND_HIDDEN 1
#define SIZEOF_LONG_DOUBLE 12
#define STDC_HEADERS 1
#define USE_IN_LIBIO 1
#define USE_REGPARMS 1

---------------------------------------------------------


Any suggestions on the possible cause of this build failure and how
to correct it?  Thanks.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]