LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 685|回复: 0

交叉编译glibc出现找不到__fork_handlers的错误

[复制链接]
发表于 2010-6-20 11:54:37 | 显示全部楼层 |阅读模式
在给一个ARM平台编译一个glibc2.6.1,出现如下错误:
mv -f /home/user/glibc-build/shlib.ldsT /home/user/glibc-build/shlib.lds
arm-poky-linux-gnueabi-gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux.so.3  -B/home/user/glibc-build/csu/  -Wl,--version-script=/home/user/glibc-build/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -nostdlib -nostartfiles -e __libc_main -L/home/user/glibc-build -L/home/user/glibc-build/math -L/home/user/glibc-build/elf -L/home/user/glibc-build/dlfcn -L/home/user/glibc-build/nss -L/home/user/glibc-build/nis -L/home/user/glibc-build/rt -L/home/user/glibc-build/resolv -L/home/user/glibc-build/crypt -L/home/user/glibc-build/nptl -Wl,-rpath-link=/home/user/glibc-build:/home/user/glibc-build/math:/home/user/glibc-build/elf:/home/user/glibc-build/dlfcn:/home/user/glibc-build/nss:/home/user/glibc-build/nis:/home/user/glibc-build/rt:/home/user/glibc-build/resolv:/home/user/glibc-build/crypt:/home/user/glibc-build/nptl -o /home/user/glibc-build/libc.so -T /home/user/glibc-build/shlib.lds /home/user/glibc-build/csu/abi-note.o /home/user/glibc-build/elf/soinit.os /home/user/glibc-build/libc_pic.os /home/user/glibc-build/elf/sofini.os /home/user/glibc-build/elf/interp.os /home/user/glibc-build/elf/ld.so -lgcc
/home/user/glibc-build/libc_pic.os: In function `fork_handler_alloc':
/home/user/glibc-2.6.1/nptl/../nptl/sysdeps/unix/sysv/linux/register-atfork.c:63: undefined reference to `__fork_handlers'
/home/user/glibc-build/libc_pic.os: In function `__unregister_atfork':
/home/user/glibc-2.6.1/nptl/../nptl/sysdeps/unix/sysv/linux/unregister-atfork.c:95: undefined reference to `__fork_handlers'
/home/user/glibc-build/libc_pic.os: In function `__libc_pthread_init':
/home/user/glibc-2.6.1/nptl/../nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c:78: undefined reference to `__fork_generation_pointer'
/home/user/glibc-build/libc_pic.os: In function `free_mem':
/home/user/glibc-2.6.1/nptl/../nptl/sysdeps/unix/sysv/linux/register-atfork.c:135: undefined reference to `__fork_handlers'
/usr/local/poky/eabi-glibc/arm/lib/gcc/arm-poky-linux-gnueabi/4.3.0/../../../../arm-poky-linux-gnueabi/bin/ld: /home/user/glibc-build/libc.so: hidden symbol `__fork_handlers' isn't defined
/usr/local/poky/eabi-glibc/arm/lib/gcc/arm-poky-linux-gnueabi/4.3.0/../../../../arm-poky-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [/home/user/glibc-build/libc.so] Error 1
make[1]: Leaving directory `/home/user/glibc-2.6.1'
make: *** [all] Error 2

在configure阶段,用的是如下配置:
../glibc-2.6.1/configure --host=arm-poky-linux-gnueabi --enable-add-ons --with-binutils=/usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/bin/ --with-include=/usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr/include/ -without-gd --build=i686-pc-linux-gnu --disable-sanity-checks --prefix=/usr

各位大侠有没有碰到过类似问题,请指点一下?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表