今天在虚拟机上想安装gcc4.9.3
但貌似有三个依赖,那就顺序装吧。
装到gmp的时候。怎么都configure不过去,各种查各种不行,但是我之前在别的机器装成功过。
刚开始一直以为是某个编译程序没有装,后来仔细对比了通过的和不通过的。发现问题所在了。

如下:
这个是错误的:
checking build system type... pentiumm-unknown-linux-gnu
checking host system type... pentiumm-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler gcc -O2 -pedantic -fomit-frame-pointer ... yes
checking compiler gcc -O2 -pedantic -fomit-frame-pointer has sizeof(long)==4... no
checking compiler icc -no-gcc ... no
checking whether cc is gcc... yes
checking compiler cc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler cc -O2 -pedantic -fomit-frame-pointer ... yes
checking compiler cc -O2 -pedantic -fomit-frame-pointer has sizeof(long)==4... no
configure: error: could not find a working compiler, see config.log for details

由于另一个机器无法拷贝。我就把这个机器之后编译好的拿过来吧。

这个是正确的:
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler gcc -O2 -pedantic -m64 ... yes
checking compiler gcc -O2 -pedantic -m64  -mtune=k8... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking build system compiler gcc -std=gnu99... yes
checking for build system preprocessor... gcc -std=gnu99 -E
checking for build system executable suffix... 
checking whether build system compiler is ANSI... yes
checking for build system compiler math library... -lm
checking for grep that handles long lines and -e... /bin/grep

就贴这么几行,大家注意找不同点。

其实就出在ABI=64和ABI=32上面了。

ABI是什么呢?
百度一下:
应用程序二进制接口
ABI:application binary interface
详细内容请自行百度

除了这个,大家请看前两行
pentiumm-unknown-linux-gnu
这个机器是奔腾M的处理器,所以编译器默认它是32位的处理器,而对ABI设置成了32位,编译的时候也使用的是32位。

所以config.log里就出现了icc command not found
因为貌似icc是32位编译用的。(我猜的,没有仔细考证)

那知道愿意了问题就好解决了。

./configure --prefix=/usr/local/gcc/gmp-4.3.2(替换真实目录) --build=x86_64-linux

加上--build=x86_64-linux
注意之后编译的log前两行
checking build system type... x86_64-pc-linux-gnu

这样就成功了。

gmp4.3.2 安装时 ./configure报错: error: could not find a working compiler相关推荐

  1. php7安装执行configure报错error: off_t undefined; check your library configuration

    vim /etc/ld.so.conf #添加如下几行 /usr/local/lib64 /usr/local/lib /usr/lib /usr/lib64 #保存退出 :wq ldconfig - ...

  2. 解决pip安装时出现报错TypeError: unsupported operand type(s) for -=: ‘Retry‘ and ‘int‘

    我在Linux下使用pip安装时出现报错: Exception: Traceback (most recent call last):File "/usr/lib/python2.7/dis ...

  3. pycharm中python调用百度aip所遇问题解决方案记录:pip安装时版本报错以及aip导入时报错no module named aip/requests)

    pycharm中python调用百度aip所遇问题解决方案记录:pip安装时版本报错以及aip导入时报错no module named aip/requests pip安装时版本报错 pip升级后安装 ...

  4. pip问题:windows环境pip安装时一直报错Could not fetch URL

    windows环境pip安装时一直报错Could not fetch URL 可能是url的来源的问题,换成了国内的pip源就可以正常安装了,我使用的是: pip install opencv-pyt ...

  5. QTP9.2安装时,报错:WinXPSP2_Rmt_Agent_Fix,缺少对象

    QTP9.2安装时,报错:WinXPSP2_Rmt_Agent_Fix,Run-time error '424':Object required. 中文的如下: 原因: 系统内没有注册scrrun.d ...

  6. QTP9.2安装时,报错:WinXPSP2_Rmt_Agent_Fix,缺少对象 1

    QTP9.2安装时,报错:WinXPSP2_Rmt_Agent_Fix,Run-time error '424':Object required. 中文的如下: 原因: 系统内没有注册scrrun.d ...

  7. 编译make px4_fmu-v2_default upload时,报错ERROR Board can accept larger flash images (2080768 bytes)

    编译make px4_fmu-v2_default upload时,报错ERROR: Board can accept larger flash images (2080768 bytes) than ...

  8. 编译PX4时,报错error ‘i‘ does not name a type __ULong i[2];解决方法

    编译PX4时,报错error: 'i' does not name a type __ULong i[2];解决方法 在编译PX4的时候,会遇到报错: /usr/include/newlib/math ...

  9. zabbix 安装时的报错mysql_connect(): Access denied for us

    zabbix在安装完成时的报错 出现提示:mysql_connect(): Access denied for user 'zabbix'@'localhost' (using password: Y ...

最新文章

  1. Rackspace进中国,坚决“不掉价”
  2. kaggle notebook中免密码进行push
  3. 浙江省计算机二级c理论题库,浙江省计算机级考试二级《C程序设计》上机考试题库.doc...
  4. centos nodejs yarn安装及升级
  5. Pytorch 版YOLOV5训练自己的数据集
  6. python3 random模块_Python3 中 random模块
  7. Token实现单点登陆
  8. 转载:javascript中定义兑现改的5种方式
  9. java盖章后原来印章模糊了_公章部分字迹盖不清楚怎么处理
  10. 数据结构导论 — (自考)
  11. JAVA实现对PDF文件加密、解密、暴力破解密码功能
  12. uploadify onSelect
  13. HDD Regenerator V2.0绿色中文注册版-(令硬盘起死回生)_-Chaz-_新浪博客
  14. 无障碍应用程序:无障碍访问和无障碍入门
  15. 企业微信 之 创建应用并添加至侧边栏
  16. 什么是变量,和变量的类型
  17. Python开发实例:TPYBoard开发板制作声光控开关
  18. 第七章-复用类-继承语法-1
  19. 201571030121 《小学生四则运算练习软件》结对项目
  20. 数据结构专题——虚树

热门文章

  1. win11右键菜单改回win10教程(亲测可用-全流程截图)
  2. 偷懒好久,再刷leetcode——稀疏相似度
  3. 6部有生之年必看的BBC “教材级” 地理纪录片,免费领取!
  4. android油耗,基于Android的汽车油耗信息管理系统的UML模型
  5. 常见的【内存泄漏】姿势
  6. django使用二——restful框架使用
  7. 数字科技与数字经济的数字大脑模型
  8. freebsd 运行linux,FreeBSD现在可运行更多Steam最新游戏了
  9. jsp隐藏table里的td边框
  10. winxp 如何重装ie6.0