请教Ubuntu 6.10 编译 gcc 问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

请教Ubuntu 6.10 编译 gcc 问题

#1

帖子 asdte » 2007-03-13 17:53

新手第一次装 光盘装的ubuntu 顺利装上了(感谢版内的前辈的帖子)

不过我的问题是需要在上面编译gcc 3.3.2 不能编译更新的,现在有如下问题

root@gh-desktop:/usr/local/src/gcc-3.3.2# ./configure --prefix=/usr/local/gcc332
Configuring for a i686-pc-linux-gnulibc1 host.
*** This configuration is not supported in the following subdirectories:
target-libffi target-boehm-gc target-zlib target-libjava
(Any other directories should still work fine.)
Created "Makefile" in /usr/local/src/gcc-3.3.2 using "mt-frag"
/usr/bin/ld:crt1.o:没有这个文件:No such file or directory
collect2: ld returned 1 exit status
*** The command 'gcc -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

请教高手们。

我的机器不一定能连上网络,所以最好能给个下载地址什么的。 :)
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#2

帖子 oneleaf » 2007-03-14 12:43

apt-get install libc6-dev
asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

谢谢

#3

帖子 asdte » 2007-03-14 13:00

谢谢啊 ,这条命令什么意思呢? 没明白。 :(
asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

还是不行

#4

帖子 asdte » 2007-03-14 14:41

照版主说的输入命令后提示

root@ygh-desktop:/home/ygh# apt-get install libc6-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
现在没有可用的软件包 libc6-dev,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
E: 软件包 libc6-dev 还没有可供安装的候选者
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#5

帖子 oneleaf » 2007-03-14 15:04

$ apt-cache search libc6-dev
libc6-dev - GNU C Library: Development Libraries and Header Files
libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64

检查你的源。按照快速设置指南中的源设置。
asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

还是不行

#6

帖子 asdte » 2007-03-14 15:37

执行完这个命令后
$ apt-cache search libc6-dev

屏幕没有任何提示?

我装的是
ubuntu-6.10-desktop-i386.iso

我的计算机的配置是酷2E63 ,装Red Hat Enterprise Linux AS 4 找不到 cdrom 人家推荐装 ubuntu

可现在这个装不上还是不行呀................
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#7

帖子 oneleaf » 2007-03-14 16:18

asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

看糊涂了

#8

帖子 asdte » 2007-03-14 16:27

我都看糊涂了,哪个适合我这个问题呀!版主!!!
asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

终于前进了一步

#9

帖子 asdte » 2007-03-15 10:59

联上网络才安装上前面版主说的那些,可编译时提示如下错误。

./read-rtl.c: In function ‘fatal_with_file_and_line’:
./read-rtl.c:53: warning: traditional C rejects ISO C style function definitions
./read-rtl.c: In function ‘read_rtx’:
./read-rtl.c:653: error: invalid lvalue in increment
make[1]: *** [read-rtl.o] 错误 1
make[1]: Leaving directory `/usr/local/src/gcc-3.3.2/gcc'
make: *** [all-gcc] 错误 2

请教!!该怎么办?
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#10

帖子 oneleaf » 2007-03-15 11:54

安装一个gcc的低版本来编译gcc-3.3

apt-get install gcc-3.3

ln -s /usr/bin/gcc-3.3 /usr/bin/gcc
asdte
帖子: 17
注册时间: 2007-03-13 9:47
来自: 天津

终于gcc 编通了

#11

帖子 asdte » 2007-03-15 14:55

终于gcc 编通了 :D

谢谢!!!!
回复