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

今天在虚拟机上想安装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

这样就成功了。
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
根据提供的引用内容,可以看出PATH的值是"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/arm/4.3.2/bin"。 这个路径包含了一些系统命令和应用程序的路径,可以让系统找到并执行它们。比如/usr/bin路径下存放了很多常用的命令,比如ls、mv、cp等。同样,/usr/local/bin路径下也包含了一些用户自行安装的命令和应用程序。其他的路径也类似。 所以,这个PATH的值告诉系统在哪些路径下去查找可执行文件。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [hive报错no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:Exception in thread “main“ ...](https://blog.csdn.net/m0_59483606/article/details/127395718)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [在配置SSH免密登录报错:/usr/bin/ssh-copy-id: ERROR: failed to open ID file ‘/root/.pub’: 没有...](https://download.csdn.net/download/weixin_38518885/14039030)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [no javac in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)](https://blog.csdn.net/m0_55155505/article/details/123103074)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值