为什么我不能构建较低版本的编译器 [英] Why can I not build a lower version compiler

查看:87
本文介绍了为什么我不能构建较低版本的编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试在新近更新的ubuntu 11.10上构建gcc 4.4。但是,尝试引导时,编译器的构建始终会因某些问题而失败。

I am currently trying to build a gcc 4.4 on a newly updated ubuntu 11.10. However building the compiler always fails with some problems, when trying to bootstrap.

首先 crti.o 和<$找不到c $ c> crtn.o 。我将它们符号链接到搜索路径中的另一个目录中,因此可以得到一个引导编译器。但是现在它失败并显示以下消息:

First crti.o and crtn.o could not be found. I symlinked them into another directory within the search path, and so I could get a bootstrap compiler. However now it fails with the message:

配置:错误:C编译器无法创建可执行文件

我尝试在一个简单的测试程序上使用中间编译器,并且收到消息:

I tried out to use the intermediate compiler on a simple test program, and I get the message:

$ ./host-x86_64-unknown-linux-gnu/prev-gcc/xgcc test.c
xgcc: error trying to exec 'cc1': execvp: File or directory not found

看来我的中间编译器的路径有些混乱。当我在ubuntu 11.04上执行相同的操作时,一切正常。

So something is seriously messed up with the paths of my intermediate compiler it seems. When I did the same thing on ubuntu 11.04 everything just worked fine.

我使用以下命令行进行配置:

I used the following command line to configure:

./configure --prefix=/opt --program-suffix=44

我也尝试了VPATH构建的和源构建的,但是两者都有相同的问题。在更新之前,我仍然有gcc44,位于 / opt 之内,但是自更新以来,它已经无法使用。

I also tried both a VPATH-built, as well as an in source build, but both have the same problem. I still have the gcc44 from before the update lying around within /opt, but it has become unusable since the update.

有什么简单的方法可以让gcc 4.4在Ubuntu 11.10下工作?我不必是一个自我构建的编译器,如果我可以下载一个软件包并安装它,也可以。

Is there any easy way to get gcc 4.4 working under Ubuntu 11.10? I does not have to be a self build compiler, if I can just download a package and install that, it would be fine as well.

推荐答案

这是由Ubuntu切换到多体系结构引起的。基本上所有标准路径都已更改,因此您可以在同一台计算机上安装多个体系结构的库,而不会发生任何冲突。

This is caused by Ubuntu's switch to multi-arch. Basically all the "standard" paths have been changed so you can install libraries for multiple architectures on the same machine without any clashes.

Ubuntu GCC已得到修补,可以解决此问题。 ,当然,但是上次我检查时上游编译器仍然没有固定。

Ubuntu GCC has been patched to fix the problem, of course, but the upstream compiler still wasn't fixed last time I checked.

请参见此处:https://askubuntu.com/questions/69365/cant-build-gcc-anymore-since-upgrade-to-11- 10

这篇关于为什么我不能构建较低版本的编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆