LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 781|回复: 6

LFS6.4 gcc(2次)出错了,请了

[复制链接]
发表于 2009-4-25 02:35:49 | 显示全部楼层 |阅读模式
安装6.4的手册安装的, 前边都没有出错. 在第二次编译gcc时, make出错了.
gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros                                      -Wno-overlength-strings   -fomit-frame-pointer -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.3.2/gcc -I../../gcc-4.3.2/gcc/build -I../../gcc-4.3.2/gcc/../include -I../../gcc-4.3.2/gcc/../libcpp/include -I/mnt/lfs/sources/gcc-build/./gmp -I/mnt/lfs/sources/gcc-4.3.2/gmp -I/mnt/lfs/sources/gcc-build/./mpfr -I/mnt/lfs/sources/gcc-4.3.2/mpfr  -I../../gcc-4.3.2/gcc/../libdecnumber -I../../gcc-4.3.2/gcc/../libdecnumber/bid -I../libdecnumber    -o build/genconstants.o ../../gcc-4.3.2/gcc/genconstants.c
In file included from ./tm.h:14,
                 from ../../gcc-4.3.2/gcc/genconstants.c:31:
../../gcc-4.3.2/gcc/config/linux.h:135: [color="Red"]error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant
In file included from ../../gcc-4.3.2/gcc/machmode.h:25,
                 from ../../gcc-4.3.2/gcc/rtl.h:26,
                 from ../../gcc-4.3.2/gcc/genconstants.c:32:
./insn-modes.h:138: warning: ISO C does not allow extra ';' outside of a function
In file included from ../../gcc-4.3.2/gcc/rtl.h:26,
                 from ../../gcc-4.3.2/gcc/genconstants.c:32:
../../gcc-4.3.2/gcc/machmode.h:29: [color="red"]error: 'NUM_MACHINE_MODES' undeclared here (not in a function)
In file included from ../../gcc-4.3.2/gcc/rtl.h:26,
                 from ../../gcc-4.3.2/gcc/genconstants.c:32:
../../gcc-4.3.2/gcc/machmode.h:231: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:235: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:242: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:242: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:246: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:247: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:253: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:265: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:266: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/machmode.h:267: warning: ISO C forbids forward references to 'enum' types
In file included from ../../gcc-4.3.2/gcc/rtl.h:28,
                 from ../../gcc-4.3.2/gcc/genconstants.c:32:
../../gcc-4.3.2/gcc/real.h:169: [color="red"]error: 'MAX_MODE_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:169: [color="red"]error: 'MIN_MODE_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:170: [color="red"]error: 'MAX_MODE_DECIMAL_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:170: [color="red"]error: 'MIN_MODE_DECIMAL_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:212: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:216: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:225: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:240: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:243: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:248: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:253: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:257: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:259: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:261: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:344: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:359: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:361: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:411: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:414: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:420: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:424: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:428: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:430: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:432: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:434: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/real.h:449: warning: ISO C forbids forward references to 'enum' types
In file included from ../../gcc-4.3.2/gcc/rtl.h:30,
                 from ../../gcc-4.3.2/gcc/genconstants.c:32:
../../gcc-4.3.2/gcc/fixed-value.h:50: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/fixed-value.h:54: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/fixed-value.h:60: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/fixed-value.h:64: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/fixed-value.h:68: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/fixed-value.h:72: warning: ISO C forbids forward references to 'enum' types
In file included from ../../gcc-4.3.2/gcc/genconstants.c:32:
../../gcc-4.3.2/gcc/rtl.h:173: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:173: [color="red"]error: field 'rt_type' has incomplete type
../../gcc-4.3.2/gcc/rtl.h:247: warning: 'mode' is narrower than values of its type
../../gcc-4.3.2/gcc/rtl.h:247: [color="red"]error: field 'mode' has incomplete type
In file included from ../../gcc-4.3.2/gcc/genconstants.c:32:
../../gcc-4.3.2/gcc/rtl.h:1060: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1062: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1062: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1064: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1065: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1066: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1067: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1071: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1072: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1074: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1473: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1481: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1486: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1509: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1510: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1511: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1514: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1517: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1520: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1521: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1521: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1522: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1525: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1527: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1528: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1529: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1530: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1531: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1531: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1533: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1545: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1549: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1549: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1552: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1559: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1563: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1564: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1565: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1650: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1651: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1652: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1653: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1654: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1656: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1658: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1659: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1661: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1662: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1663: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1664: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1665: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1666: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1667: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1668: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1669: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1670: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1671: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1671: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1673: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1673: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1678: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1681: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1798: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1815: [color="red"]error: 'MAX_MACHINE_MODE' undeclared here (not in a function)
../../gcc-4.3.2/gcc/rtl.h:1916: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1917: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1918: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1919: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1920: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:1921: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2034: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2057: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2104: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2105: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2106: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2107: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2108: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2108: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2112: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2176: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2204: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2228: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2231: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2253: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2255: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2265: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2286: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2286: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2299: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2300: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2301: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2301: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2303: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2303: warning: ISO C forbids forward references to 'enum' types
../../gcc-4.3.2/gcc/rtl.h:2305: warning: ISO C forbids forward references to 'enum' types
make[2]: *** [build/genconstants.o] [color="red"]Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] [color="red"]Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] [color="red"]Error 2
 楼主| 发表于 2009-4-25 02:43:29 | 显示全部楼层
还有一个小问题,这里顺便问下
我在安装tcl时, 发现有一步和手册对不上
ln -sv tclsh8.5 /tools/bin/tclsh

在我的tcl8.5.5目录下没有tclsh8.5, 只有tclsh
而在/tools/bin/tclsh却有tclsh8.5

这个应该不是上面错误的原因吧,好像这个不装也可以的
回复 支持 反对

使用道具 举报

发表于 2009-4-25 08:17:48 | 显示全部楼层
TCL 是用来跑测试的时候用的,应该跟它无关

是否 configure 或者前面漏掉了什麽?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-25 18:32:43 | 显示全部楼层
../gcc-4.3.2/configure --prefix=/tools \
    --with-local-prefix=/tools --enable-clocale=gnu \
    --enable-shared --enable-threads=posix \
    --enable-__cxa_atexit --enable-languages=c,c++ \
    --disable-libstdcxx-pch --disable-bootstrap
这个是configure, 应该没有错
难道又要重头来??
虽然才刚开始,不过还是希望...
回复 支持 反对

使用道具 举报

发表于 2009-4-25 18:47:12 | 显示全部楼层
把现在编译的GCC 彻底删了 再解压 configure make 试试
还有一点是 在编译安装好一个包后 马上删除 不删除 可能会导致错误!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-25 19:10:31 | 显示全部楼层
每次安装完一个软件后都是马上rm 的
我再试试, 如果不行就打算明天重头来了
回复 支持 反对

使用道具 举报

发表于 2009-4-27 16:34:54 | 显示全部楼层
ln -sv tclsh8.5 /tools/bin/tclsh
这句的意思是把/tools/bin/tclsh8.5创建一个软链接/tools/bin/tclsh,你可以用ls -l /tools/bin/tclsh看看
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表