免费注册 查看新帖 |

Chinaunix

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

用icc编译安装gcc的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-14 10:19 |只看该作者 |倒序浏览
由于使用了Yoper 3.1 beta,遇到了很多问题,主要是yoper提供的gcc 4.2.1的rpm包由于依赖libgcj.so.8而无法安装(只找到了fedora和suse的,都不能用),后来想尝试编译gcc,遂安装了intel的icc,都设置好了,开始执行configure却出现这样的问题:

loading cache ./config.cache
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
checking build system type... i686-pc-linux-gnuoldld
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... icc
checking whether the C compiler (icc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

且没有提示看config.log,我看了下里面没有报错:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:630: checking host system type
configure:651: checking target system type
configure:669: checking build system type
configure:724: checking for a BSD compatible install
configure:777: checking whether ln works
configure:801: checking whether ln -s works
configure:1866: checking for gcc
configure:1896: checking for cc

这是怎么回事?请诸位不吝赐教!

论坛徽章:
0
2 [报告]
发表于 2008-11-14 10:34 |只看该作者
checking whether the C compiler (icc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

论坛徽章:
0
3 [报告]
发表于 2008-11-14 15:04 |只看该作者
上面的问题有所进展了。尝试了一下操作别的源码安装包(scim)。

首先发现缺少g++,本来很奇怪为什么icc会需要g++,但在Intel的网站上说一定要有这个。可我目前就是缺少gcc,哪会有g++。后来发现Yoper version2的gcc可以不需要libgcj来安装,但会导致RPM命令出问题,提示缺少libstdc++什么的,于是我又装了Yoper 3.1提供的libstdc++,问题解决。但经尝试,不可以再用那个版本的gcc覆盖安装,否则问题会再次处现。

然后,在scim试验中又发现/lib/cpp会有问题,应该是缺少什么header,fedora的人说可以装glibc-headers。虽然Yoper是没有这个东西的,却可以用fedora的包替代,仅需要相应的glibc和kernel-headers,后者可以用Yoper自己的,而前者虽然Yoper有提供却不匹配,于是我强行安装了glibc-headers的rpm包。

然后configure就成功了。但目前make还有问题,报错如下:
Links are now set up to build a native compiler for i686-pc-linux-gnu.
icc: command line warning #10006: ignoring unknown option '-fkeep-inline-functions'
icc: command line remark #10148: option '-W' not supported
icc: command line remark #10148: option '-pedantic' not supported
icc: command line warning #10156: ignoring option '-W'; no argument required
/usr/include/linux/errno.h(4): catastrophic error: could not open source file "asm/errno.h"
  #include <asm/errno.h>
                        ^

compilation aborted for ../../gcc-4.2.1/libiberty/fnmatch.c (code 4)
make[3]: *** [fnmatch.o] 閿欒? 4
make[2]: *** [all-stage1-libiberty] 閿欒? 2
make[1]: *** [stage1-bubble] 閿欒? 2
make: *** [all] 閿欒? 2

。。。这个过程中我把language设成中文了,所以这样...

PS:真不知道Yoper那帮人怎么生存的...

论坛徽章:
0
4 [报告]
发表于 2008-11-14 15:15 |只看该作者
用那个残废的gcc来make那个scim也出现了问题:
In file included from /usr/include/signal.h:333,
                 from /usr/include/sys/wait.h:31,
                 from scim_helper_manager.cpp:37:
/usr/include/bits/sigcontext.h:28:29: asm/sigcontext.h: No such file or directory
make[2]: *** [scim_helper_manager.lo] 错误 1
make[1]: *** [all-recursive] 错误 1
make: *** [all] 错误 2

论坛徽章:
0
5 [报告]
发表于 2008-11-14 15:16 |只看该作者
看上去asm什么的仍然有问题。

特谢2楼帮顶。

问题似乎是:/usr/include/asm这个目录哪里来的?

理论上讲as应该是binutil里的,但我已经装了啊...

[ 本帖最后由 cswords 于 2008-11-14 15:21 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2008-11-14 16:07 |只看该作者
ft。我可不是顶楼的。这两个错误提示很明显嘛...相信lz的英语没问题。
checking whether the C compiler (icc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

论坛徽章:
0
7 [报告]
发表于 2008-11-14 16:13 |只看该作者
找到了asm目录,做了
ln -s /usr/src/linux-2.6.23_yos-57/usr/include/asm ./asm

后类似地又做了
ln -s /usr/src/linux-2.6.23_yos-57/usr/include/asm-generic ./asm-generic

后scim报错变为
ltdl.cpp: In function `int scim::argzize_path(const char*, char**, size_t*)':
ltdl.cpp:2542: error: `argz_create_sep' undeclared (first use this function)
ltdl.cpp:2542: error: (Each undeclared identifier is reported only once for each function it appears in.)
ltdl.cpp:2546: error: `ENOMEM' undeclared (first use this function)
ltdl.cpp: In function `int scim::foreach_dirinpath(const char*, const char*, int (*)(char*, void*, void*), void*, void*)':
ltdl.cpp:2596: error: `argz_next' undeclared (first use this function)
ltdl.cpp: In function `int scim::lt_argz_insert(char**, size_t*, char*, const char*)':
ltdl.cpp:3453: error: `argz_insert' undeclared (first use this function)
ltdl.cpp:3457: error: `ENOMEM' undeclared (first use this function)
ltdl.cpp: In function `int scim::lt_argz_insertinorder(char**, size_t*, const char*)':
ltdl.cpp:3483: error: `argz_next' undeclared (first use this function)
ltdl.cpp: In function `int scim::foreachfile_callback(char*, void*, void*)':
ltdl.cpp:3618: error: `argz_next' undeclared (first use this function)
ltdl.cpp: In function `int scim::lt_dlpath_insertdir(char**, char*, const char*)':
ltdl.cpp:3916: error: `argz_stringify' undeclared (first use this function)
make[2]: *** [ltdl.lo] 错误 1
make[1]: *** [all-recursive] 错误 1
make: *** [all] 错误 2

用残废gcc和icc的结果是一样的。

没有办法,又去试make了一下gcc,结果是残废gcc已经不能用了。

而icc报出了很多ipo: warning #11020
和类似/tmp/ipo_iccIp1bL9.c.text+0x8: undefined reference to `xrealloc'
的问题。

暂时不知所措了,跪求诸位的帮助...

论坛徽章:
0
8 [报告]
发表于 2008-11-14 16:17 |只看该作者

回复 #6 prolj 的帖子

谢谢...eee,这两条根本就没有定位啊,只是表象而已...因为我保证icc安装、设置没有问题,而强行安装的gcc才是有问题的...主要是icc不能独立完成工作,而g++没有安装gcc自然就没有...然后就有以下那些东西了。再次谢顶...

这些,这些都是表象...问题还是在gcc的安装上...但怎么才能装上哪...

论坛徽章:
0
9 [报告]
发表于 2008-11-14 16:57 |只看该作者
intel cc有C++编译器的,不过没用过,太贵了。不知道是否完全兼容g++

论坛徽章:
0
10 [报告]
发表于 2008-11-14 17:09 |只看该作者

回复 #9 prolj 的帖子

Intel的编译器no commercial的话是白送license的,所以我就直接装了...但Yoper3.1beta的gcc始终悲剧...
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP