从源代码构建gcc 5.4.0时出错

时间:2017-09-24 15:53:26

标签: gcc g++

I have to build gcc 5.4.0 from source on a server because I don't have root permission. The server is running on CentOS 6.5.

I try the following commands:

tar xzf gcc-5.4.0.tar.gz
cd gcc-5.4.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-5.4.0/configure --prefix=/ghome/mypath/software/try_gcc/installed/ --enable-languages=c,c++,fortran,go --disable-multilib
make
make install

在我运行make之前,一切都是正确的。我遇到了数百行错误消息,我无法弄清楚会发生什么。一些错误消息如下:

/path_to_gcc/gcc/hwint.h:74: error: ‘HOST_WIDE_INT’ does not name a type
/path_to_gcc/gcc/hwint.h:157: error: expected ‘,’ or ‘...’ before ‘x’
/path_to_gcc/gcc/hwint.h: In function ‘int clz_hwi(unsigned int)’:
/path_to_gcc/gcc/hwint.h:159: error: ‘x’ was not declared in this scope
/path_to_gcc/gcc/hwint.h: At global scope:
/path_to_gcc/gcc/hwint.h:171: error: expected ‘,’ or ‘...’ before ‘x’
/path_to_gcc/gcc/hwint.h: In function ‘int ctz_hwi(unsigned int)’:
/path_to_gcc/gcc/hwint.h:232: error: ‘HOST_WIDE_INT’ does not name a type
/path_to_gcc/gcc/hwint.h:233: error: ‘HOST_WIDE_INT’ does not name a type
/path_to_gcc/gcc/hwint.h:234: error: ‘HOST_WIDE_INT’ does not name a type
/path_to_gcc/gcc/vec.h:305: error: ‘GATHER_STATISTICS’ was not declared in this scope
/path_to_gcc/gcc/vec.h: In static member function ‘static void va_heap::release(vec<T, va_heap, vl_embed>*&)’:
/path_to_gcc/gcc/tree.h:4723: error: expected ‘)’ before ‘;’ token
/path_to_gcc/gcc/wide-int.h:1930: error: ‘class generic_wide_int<wide_int_ref_storage<true> >’ has no member named ‘val’
/path_to_gcc/gcc/wide-int.h:1930: error: ‘class generic_wide_int<wide_int_ref_storage<true> >’ has no member named ‘val’
/path_to_gcc/gcc/wide-int.h: In function ‘bool wi::neg_p(const T&, signop) [with T = generic_wide_int<wide_int_ref_storage<true> >]’:
/path_to_gcc/gcc/wide-int.h:1759:   instantiated from ‘bool wi::lts_p(const T1&, const T2&) [with T1 = generic_wide_int<wi::extended_tree<192> >, T2 = generic_wide_int<wi::extended_tree<192> >]’
/path_to_gcc/gcc/tree.h:5013:   instantiated from here
/path_to_gcc/gcc/wide-int.h:1687: error: ‘class generic_wide_int<wide_int_ref_storage<true> >’ has no member named ‘sign_mask’
make[3]: *** [c/c-lang.o] Error 1
make[3]: Leaving directory `/d2/mypath/software/try_gcc/objdir/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/d2/mypath/software/try_gcc/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/d2/mypath/software/try_gcc/objdir'
make: *** [all] Error 2

0 个答案:

没有答案