免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9501 | 回复: 12
打印 上一主题 下一主题

GCC编译的问题,不知道能不能解决 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-12-07 17:32 |只看该作者 |倒序浏览
小弟在redhat 4上编译LZO

运行
./configure --build=x86_64-redhat-linux-gnu --enable-shared --disable-asm

报错log里面说

configure:2990: checking whether the C compiler works
configure:3012: /usr/bin/gcc    conftest.c  >&5
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status


仿佛是说libc.so不兼容
目前libc.so指向的是 /lib/libc-2.3.4.so
gcc版本是3.4.6_11 64位

请问如何是好啊。。。

论坛徽章:
0
2 [报告]
发表于 2010-12-08 11:00 |只看该作者
哪位大哥给点提示

论坛徽章:
0
3 [报告]
发表于 2010-12-08 14:09 |只看该作者
回复 2# process


    # file /to/path/lc.so -L


看看输出。

论坛徽章:
0
4 [报告]
发表于 2010-12-08 15:32 |只看该作者
只说没找到,没看到不兼容的信息啊?

论坛徽章:
0
5 [报告]
发表于 2010-12-09 11:38 |只看该作者
回复 3# linyunxian


    这命令啥意思

/to/path/lc.so: cannot open (/to/path/lc.so)

论坛徽章:
0
6 [报告]
发表于 2010-12-09 11:39 |只看该作者
回复 4# duanjigang


    skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../libc.so when searching for -lc

这个应该是说先略过了不兼容的libc.so吧

论坛徽章:
0
7 [报告]
发表于 2010-12-09 15:30 |只看该作者
这个意思就是说 /usr/lib/libc.so 与你的工具链不兼容。

你的工具链是自己下载的?

# file -L /usr/lib/libc.so

论坛徽章:
0
8 [报告]
发表于 2010-12-09 16:28 |只看该作者
回复 7# linyunxian


    file -L /usr/lib/libc.so
/usr/lib/libc.so: ASCII C program text

论坛徽章:
0
9 [报告]
发表于 2010-12-09 16:30 |只看该作者
回复 7# linyunxian


    我曾经安装了错误版本的GCC ,机器是x86_64的,我装了i386的,后来又装了 x86_64的


包括 cpp gcc glibc都装了,估计搞乱了。。。

论坛徽章:
0
10 [报告]
发表于 2010-12-09 17:41 |只看该作者
# cat /usr/lib/libc.so
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP