Glibc : NPTL Errors on Make (fork_handlers & fork_generation_pointer `undefined')

adm1n at imsa.edu adm1n at imsa.edu
Sat Apr 15 16:29:52 PDT 2006


Hello everyone! While trying to compile libc for hlfs, I came across a
problem of NPTL not linking properly (I'm getting some undefined
references).  I know this is probably something very silly/easy to fix,
but I just couldn't come to the answer by myself :( I haven't deviated
from the book other than using cvs/svn for all components (haha I know I'm
rather stupid ><) So here is the output from `make libgcc_eh=""
gnulib="-lgcc" static-gnulib="-lgcc"' with configuration done as
`../libc/configure --prefix=/tools --host=$target} --build=$(uname
-m)-linux --disable-profile --enable-add-ons=nptl
--with-binutils=/tools/bin --enable-kernel=2.6.0 --without-gd
--with-headers=/tools/include --cache-file=config.cache --enable-bind-now'

i686-tools-linux-gnu-gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs
-Wl,-dynamic-linker=/tools/lib/ld-linux.so.2
-B/home/hlfs/sources/glibc-build/csu/
-Wl,--version-script=/home/hlfs/sources/glibc-build/libc.map
-Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -nostdlib
-nostartfiles -e __libc_main -Wl,-z,now -L/home/hlfs/sources/glibc-build
-L/home/hlfs/sources/glibc-build/math -L/home/hlfs/sources/glibc-build/elf
-L/home/hlfs/sources/glibc-build/dlfcn
-L/home/hlfs/sources/glibc-build/nss -L/home/hlfs/sources/glibc-build/nis
-L/home/hlfs/sources/glibc-build/rt
-L/home/hlfs/sources/glibc-build/resolv
-L/home/hlfs/sources/glibc-build/crypt
-L/home/hlfs/sources/glibc-build/nptl
-Wl,-rpath-link=/home/hlfs/sources/glibc-build:/home/hlfs/sources/glibc-build/math:/home/hlfs/sources/glibc-build/elf:/home/hlfs/sources/glibc-build/dlfcn:/home/hlfs/sources/glibc-build/nss:/home/hlfs/sources/glibc-build/nis:/home/hlfs/sources/glibc-build/rt:/home/hlfs/sources/glibc-build/resolv:/home/hlfs/sources/glibc-build/crypt:/home/hlfs/sources/glibc-build/nptl
-o /home/hlfs/sources/glibc-build/libc.so -T
/home/hlfs/sources/glibc-build/shlib.lds
/home/hlfs/sources/glibc-build/csu/abi-note.o
/home/hlfs/sources/glibc-build/elf/soinit.os
/home/hlfs/sources/glibc-build/libc_pic.os
/home/hlfs/sources/glibc-build/elf/sofini.os
/home/hlfs/sources/glibc-build/elf/interp.os
/home/hlfs/sources/glibc-build/elf/ld.so
/home/hlfs/sources/glibc-build/libc_pic.os: In function
`*__GI___register_atfork':
../nptl/sysdeps/unix/sysv/linux/register-atfork.c:100: undefined reference
to `__fork_handlers'
/home/hlfs/sources/glibc-build/libc_pic.os: In function
`__unregister_atfork':
../nptl/sysdeps/unix/sysv/linux/unregister-atfork.c:37: undefined
reference to `__fork_handlers'
../nptl/sysdeps/unix/sysv/linux/unregister-atfork.c:64: undefined
reference to `__fork_handlers'
/home/hlfs/sources/glibc-build/libc_pic.os: In function
`__libc_pthread_init':
../nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c:43: undefined
reference to `__fork_generation_pointer'
/home/hlfs/sources/glibc-build/libc_pic.os: In function `free_mem':
../nptl/sysdeps/unix/sysv/linux/register-atfork.c:118: undefined reference
to `__fork_handlers'
collect2: ld returned 1 exit status
make[1]: *** [/home/hlfs/sources/glibc-build/libc.so] Error 1
make[1]: Leaving directory `/home/hlfs/sources/libc'
make: *** [all] Error 2


If you need any more information, let me know! I wanted to keep this as
short as possible as I know this is just some stupid linker flag I set
wrong or something most likely... Thank you for your help!



More information about the hlfs-dev mailing list