+ -
当前位置:首页 → 问答吧 → LFS6.4 gcc(2次)出错了,请了

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

时间:2009-04-25

来源:互联网

安装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: 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: 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: error: 'MAX_MODE_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:169: error: 'MIN_MODE_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:170: error: 'MAX_MODE_DECIMAL_FLOAT' undeclared here (not in a function)
../../gcc-4.3.2/gcc/real.h:170: 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: 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: 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: 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] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

作者: sealiu   发布时间: 2009-04-25

还有一个小问题,这里顺便问下
我在安装tcl时, 发现有一步和手册对不上
ln -sv tclsh8.5 /tools/bin/tclsh

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

这个应该不是上面错误的原因吧,好像这个不装也可以的

作者: sealiu   发布时间: 2009-04-25

TCL 是用来跑测试的时候用的,应该跟它无关

是否 configure 或者前面漏掉了什麽?

作者: d00m3d   发布时间: 2009-04-25

引用:
../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, 应该没有错
难道又要重头来??
虽然才刚开始,不过还是希望...

作者: sealiu   发布时间: 2009-04-25

把现在编译的GCC 彻底删了 再解压 configure make 试试
还有一点是 在编译安装好一个包后 马上删除 不删除 可能会导致错误!

作者: wellxlx   发布时间: 2009-04-25

每次安装完一个软件后都是马上rm 的
我再试试, 如果不行就打算明天重头来了

作者: sealiu   发布时间: 2009-04-25

ln -sv tclsh8.5 /tools/bin/tclsh
这句的意思是把/tools/bin/tclsh8.5创建一个软链接/tools/bin/tclsh,你可以用ls -l /tools/bin/tclsh看看

作者: hougollen   发布时间: 2009-04-27

热门下载

更多