Sources Bugzilla – Bug 328
CVS 20040815 make check fails to build rt/librt.so
Last modified: 2004-08-18 19:42:24 UTC
Running "make check" on CVS 20040815, get:- gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux.so.2 -B/build/glibc-2.3.3/csu/ -Wl,--version-script=/build/glibc-2.3.3/librt.map -Wl,-soname=librt.so.1 -Wl,-z,combreloc -L/build/glibc-2.3.3 -L/build/glibc-2.3.3/math -L/build/glibc-2.3.3/elf -L/build/glibc-2.3.3/dlfcn -L/build/glibc-2.3.3/nss -L/build/glibc-2.3.3/nis -L/build/glibc-2.3.3/rt -L/build/glibc-2.3.3/resolv -L/build/glibc-2.3.3/crypt -L/build/glibc-2.3.3/nptl -Wl,-rpath-link=/build/glibc-2.3.3:/build/glibc-2.3.3/math:/build/glibc-2.3.3/elf:/build/glibc-2.3.3/dlfcn:/build/glibc-2.3.3/nss:/build/glibc-2.3.3/nis:/build/glibc-2.3.3/rt:/build/glibc-2.3.3/resolv:/build/glibc-2.3.3/crypt:/build/glibc-2.3.3/nptl -o /build/glibc-2.3.3/rt/librt.so -T /build/glibc-2.3.3/shlib.lds /build/glibc-2.3.3/csu/abi-note.o -Wl,--whole-archive /build/glibc-2.3.3/rt/librt_pic.a -Wl,--no-whole-archive /build/glibc-2.3.3/elf/interp.os /build/glibc-2.3.3/rt/librt_pic.a(aio_misc.os)(.text+0x73b): In function `__aio_enqueue_request': ../nptl/sysdeps/unix/sysv/linux/aio_misc.h:48: undefined reference to `pthread_attr_setstacksize' /build/glibc-2.3.3/rt/librt_pic.a(aio_misc.os)(.text+0x799):../nptl/sysdeps/unix/sysv/linux/aio_misc.h:58: undefined reference to `pthread_create' /build/glibc-2.3.3/rt/librt_pic.a(aio_misc.os)(.text+0xd4f): In function `handle_fildes_io': ../sysdeps/pthread/aio_misc.c:667: undefined reference to `pthread_create' /build/glibc-2.3.3/rt/librt_pic.a(aio_notify.os)(.text+0x125): In function `__aio_notify_only': ../sysdeps/pthread/aio_notify.c:90: undefined reference to `pthread_create' /build/glibc-2.3.3/rt/librt_pic.a(timer_create.os)(.text+0x19a): In function `timer_create': ../nptl/sysdeps/unix/sysv/linux/timer_create.c:147: undefined reference to `pthread_once' /build/glibc-2.3.3/rt/librt_pic.a(timer_create.os)(.text+0x2ab): In function `timer_create': ../nptl/sysdeps/pthread/timer_create.c:61: undefined reference to `pthread_once' /build/glibc-2.3.3/rt/librt_pic.a(timer_delete.os)(.text+0x119): In function `compat_timer_delete': (Lots more errors like these) WORKAROUND Able to build it by hand by appending to the above gcc command:- -lpthread /build/glibc-2.3.3/nptl/libpthread.a /build/glibc-2.3.3/libc.a SOFTWARE REVISIONS gcc (GCC) 3.4.1 linux 2.6.7 /usr/src/glibc-2.3.3/configure \ --prefix=/usr \ --enable-add-ons=nptl \ --build=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu \ --with-tls \ CFLAGS="-g -O2 -march=opteron" \ --without-cvs glibc-2.3.3 is actually CVS 20040815
It works fine if you have the right tools and environment. We do not encourage people to compile glibc themselves for just this reason: it is not easy to get the correct environment up and running. Use a distribution's package if you fail to compile it yourself. We do not provide support to anybody who has problems.
Hi Ulrich, As a software developer, I have in the past found it most advantageous to have a compiled-from-source library. If for instance a program failed in libc somewhere (because it had called a function with bad arguments), a backtrace would show the offending arguments immediately. I have held this to be one of the great strengths of Open Source and have advocated the superiority of a Linux / GNU debug environment on that basis. The Linux folks publish a checklist of build tool minimum revisions including in some cases the reccomended ones: I think it would be very helpful if you could do something similar. For instance, I have (copyright notices ommitted):- 00:25:20$ gcc --version gcc (GCC) 3.4.1 00:26:01$ make --version GNU Make 3.80 00:26:08$ ld -v GNU ld version 2.15 00:26:25$ sed --version GNU sed version 3.02 00:27:26$ runtest --version WARNING: Couldn't find the global config file. Expect version is 5.38.0 Tcl version is 8.4 Framework version is 1.4.4 00:31:32$ autoconf --version autoconf (GNU Autoconf) 2.59 00:33:21$ automake --version automake (GNU automake) 1.9 I compiled my way through the transitions from a.out to elf, and from glibc5 to glibc6, but 2.2.x to 2.3.x has proved more awkward than either of those. Clearly I am missing "the right tools and environment" and I would dearly like to know what they are. Rgds ... Duncan.
*** This bug has been marked as a duplicate of 333 ***