<strong>第六章 第二次调整工具链出错</strong>
时间:2010-01-27
来源:互联网
cc dummy.c -Wl,--verbose &> dummy.log
然后
readelf -l a.out | grep ': /lib'
提示没有文件a.out
我直接运行cc dummy.c,有出错信息:
/tools/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found (try using -rpath or -rpath-link)
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_stack_end@GLIBC_2.1'
/lib/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `___tls_get_addr@GLIBC_2.3'
/lib/libc.so.6: undefined reference to `_r_debug@GLIBC_2.0'
/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
继续运行下面的测试程序:
grep -o '/usr/lib.*/crt[1in].* .*' dummy.log
我的是正常的
然后grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
我的就是:
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("lib");
最后一个lib路径错误了,我怀疑就是这里出错了导致cc失败,
宿主是LiveCD,前面一直都是正确的,可能是哪里输入/lib的时候输入错了,应该怎么修正这个错误?
然后
readelf -l a.out | grep ': /lib'
提示没有文件a.out
我直接运行cc dummy.c,有出错信息:
/tools/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found (try using -rpath or -rpath-link)
/lib/libc.so.6: undefined reference to `_rtld_global@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_enable_secure@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `__libc_stack_end@GLIBC_2.1'
/lib/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `_dl_out_of_memory@GLIBC_PRIVATE'
/lib/libc.so.6: undefined reference to `___tls_get_addr@GLIBC_2.3'
/lib/libc.so.6: undefined reference to `_r_debug@GLIBC_2.0'
/lib/libc.so.6: undefined reference to `_dl_argv@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
继续运行下面的测试程序:
grep -o '/usr/lib.*/crt[1in].* .*' dummy.log
我的是正常的
然后grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
我的就是:
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("lib");
最后一个lib路径错误了,我怀疑就是这里出错了导致cc失败,
宿主是LiveCD,前面一直都是正确的,可能是哪里输入/lib的时候输入错了,应该怎么修正这个错误?
作者: javer 发布时间: 2010-01-27
惭愧,我解决不了,但是我建议楼主第一遍搞的时候先 复制粘贴。
启动 ssh服务。
然后在windows下远程登录 ssh secure shell 远程登录。编译LFS系统。具体方法请google
启动 ssh服务。
然后在windows下远程登录 ssh secure shell 远程登录。编译LFS系统。具体方法请google
作者: Prife 发布时间: 2010-01-27
额,我大部分命令是复制粘贴的……小部分是自己输入的
作者: javer 发布时间: 2010-01-27
解决了,在/etc/ld.so.conf 后面添加一个额外的/lib,可能是编译ld的时候输入错误了,或者是老版本数的一个bug??
作者: javer 发布时间: 2010-01-28
LZ能讲的更详细一点吗?我也碰到这个问题了。
/etc/ld.so.conf实在glibc编译的时候创建的,在哪个地方在添加一个额外的/lib呢?
另外执行grep -B1 '^ /usr/include' dummy.log,没有输出,不知到兄弟碰到没?
/etc/ld.so.conf实在glibc编译的时候创建的,在哪个地方在添加一个额外的/lib呢?
另外执行grep -B1 '^ /usr/include' dummy.log,没有输出,不知到兄弟碰到没?
作者: tzfox 发布时间: 2010-06-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28