glibc编译出错,请高手帮忙,万分感谢!
时间:2007-12-03
来源:互联网
不知道为何帖不上来,所以只能以附件形式上传,是libc.so出错,谢谢!!
glibc make err.png (113.8 KB, 57 次查看) |
作者: djstava 发布时间: 2007-12-03
作者: d00m3d 发布时间: 2007-12-04
作者: djstava 发布时间: 2007-12-04
作者: d00m3d 发布时间: 2007-12-05
作者: 不开花 发布时间: 2007-12-05
Core 2 Duo,
GCC 4.2,CFLAGS 添加 -march=nocona -mtune=generic。
如果是GCC 4.1,Core Solo/Duo使用-march=prescott;
Core 2 Duo/Solo则使用-march=nocona。
i686等类似设置,例如CFLAGS=”-O2 -march=i686″
-----------------
看到在build ncsd目录时也有错误
如果还有undefined reference to `__stack_chk_guard’ 这个错误的话,你需要手工编辑Makefile,找到这一行:
LDLIBS-nscd = $(selinux-LIBS)
添加 -lssp 即
LDLIBS-nscd = $(selinux-LIBS) -lssp
作者: 不开花 发布时间: 2007-12-05
作者: djstava 发布时间: 2007-12-05
作者: d00m3d 发布时间: 2007-12-05
作者: djstava 发布时间: 2007-12-05
mkdir -v ../glibc-build cd ../glibc-build echo "CFLAGS += -march=i486" > configparms
作者: LanEast 发布时间: 2007-12-05
configre 时指定,例如
CFLAGS="-O2 -march=i686" ../glibc-2.7/configure –enable-shared –prefix=/usr –enable-profile=no –enable-add-ons –enable-kernel=2.6.23
(具体参数根据你的具体情况而定)
作者: 不开花 发布时间: 2007-12-05
export CFLAGS="-O2 -march=i686"
作者: 不开花 发布时间: 2007-12-05
作者: djstava 发布时间: 2007-12-05
作者: djstava 发布时间: 2007-12-06
作者: d00m3d 发布时间: 2007-12-07
作者: djstava 发布时间: 2007-12-07
#cd glibc-2.7-build
#CFLAGS="-O2 -march=i686" ../glibc-2.7/configure --prefix=/opt/glibc-2.7 --disable-profile --enable-kernel=2.6.0 --with-headers=/usr/src/linux/include
无错后make,报如下错误:
gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl,-dynamic-linker=/opt/glibc-2.7/lib/ld-linux.so.2 -B/root/source/glibc-build/csu/ -Wl,--version-script=/root/source/glibc-build/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -nostdlib -nostartfiles -e __libc_main -L/root/source/glibc-build -L/root/source/glibc-build/math -L/root/source/glibc-build/elf -L/root/source/glibc-build/dlfcn -L/root/source/glibc-build/nss -L/root/source/glibc-build/nis -L/root/source/glibc-build/rt -L/root/source/glibc-build/resolv -L/root/source/glibc-build/crypt -L/root/source/glibc-build/nptl -Wl,-rpath-link=/root/source/glibc-build:/root/source/glibc-build/math:/root/source/glibc-build/elf:/root/source/glibc-build/dlfcn:/root/source/glibc-build/nss:/root/source/glibc-build/nis:/root/source/glibc-build/rt:/root/source/glibc-build/resolv:/root/source/glibc-build/crypt:/root/source/glibc-build/nptl -o /root/source/glibc-build/libc.so -T /root/source/glibc-build/shlib.lds /root/source/glibc-build/csu/abi-note.o /root/source/glibc-build/elf/soinit.os /root/source/glibc-build/libc_pic.os /root/source/glibc-build/elf/sofini.os /root/source/glibc-build/elf/interp.os /root/source/glibc-build/elf/ld.so -lgcc
/root/source/glibc-build/libc_pic.os: In function `__libc_fork':
../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:76: undefined reference to `__sync_bool_compare_and_swap_4'
/root/source/glibc-build/libc_pic.os: In function `nscd_getpw_r':
/root/source/glibc-2.7/nscd/nscd-client.h:320: undefined reference to `__sync_fetch_and_add_4'
/root/source/glibc-build/libc_pic.os: In function `nscd_getpw_r':
/root/source/glibc-2.7/nscd/nscd_getpw_r.c:232: undefined reference to `__sync_fetch_and_add_4'
/root/source/glibc-build/libc_pic.os: In function `nscd_getgr_r':
/root/source/glibc-2.7/nscd/nscd-client.h:320: undefined reference to `__sync_fetch_and_add_4'
/root/source/glibc-build/libc_pic.os: In function `nscd_getgr_r':
/root/source/glibc-2.7/nscd/nscd_getgr_r.c:321: undefined reference to `__sync_fetch_and_add_4'
/root/source/glibc-build/libc_pic.os: In function `nscd_gethst_r':
/root/source/glibc-2.7/nscd/nscd-client.h:320: undefined reference to `__sync_fetch_and_add_4'
/root/source/glibc-build/libc_pic.os:/root/source/glibc-2.7/nscd/nscd_gethst_r.c:400: more undefined references to `__sync_fetch_and_add_4' follow
/root/source/glibc-build/libc_pic.os: In function `__nscd_get_map_ref':
/root/source/glibc-2.7/nscd/nscd_helper.c:404: undefined reference to `__sync_val_compare_and_swap_4'
/root/source/glibc-build/libc_pic.os: In function `*__GI___libc_freeres':
/root/source/glibc-2.7/malloc/set-freeres.c:39: undefined reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status
make[1]: *** [/root/source/glibc-build/libc.so] Error 1
make[1]: Leaving directory `/root/source/glibc-2.7'
make: *** [all] Error 2
作者: tenvin 发布时间: 2007-12-12
作者: djstava 发布时间: 2007-12-13
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28