分页: 1 / 1

请教Ubuntu 6.10 编译 gcc 问题

发表于 : 2007-03-13 17:53
asdte
新手第一次装 光盘装的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.

请教高手们。

我的机器不一定能连上网络,所以最好能给个下载地址什么的。 :)

发表于 : 2007-03-14 12:43
oneleaf
apt-get install libc6-dev

谢谢

发表于 : 2007-03-14 13:00
asdte
谢谢啊 ,这条命令什么意思呢? 没明白。 :(

还是不行

发表于 : 2007-03-14 14:41
asdte
照版主说的输入命令后提示

root@ygh-desktop:/home/ygh# apt-get install libc6-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
Reading state information... 完成
现在没有可用的软件包 libc6-dev,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
E: 软件包 libc6-dev 还没有可供安装的候选者

发表于 : 2007-03-14 15:04
oneleaf
$ 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

检查你的源。按照快速设置指南中的源设置。

还是不行

发表于 : 2007-03-14 15:37
asdte
执行完这个命令后
$ apt-cache search libc6-dev

屏幕没有任何提示?

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

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

可现在这个装不上还是不行呀................

发表于 : 2007-03-14 16:18
oneleaf

看糊涂了

发表于 : 2007-03-14 16:27
asdte
我都看糊涂了,哪个适合我这个问题呀!版主!!!

终于前进了一步

发表于 : 2007-03-15 10:59
asdte
联上网络才安装上前面版主说的那些,可编译时提示如下错误。

./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

请教!!该怎么办?

发表于 : 2007-03-15 11:54
oneleaf
安装一个gcc的低版本来编译gcc-3.3

apt-get install gcc-3.3

ln -s /usr/bin/gcc-3.3 /usr/bin/gcc

终于gcc 编通了

发表于 : 2007-03-15 14:55
asdte
终于gcc 编通了 :D

谢谢!!!!