作者:洪佳蓉名羽明德 | 来源:互联网 | 2023-09-07 16:39
我想从源代码安装gcc,然后从subversion签出r236947 gcc。
但是当我使用“ make -j8”编译gcc时遇到此错误
我的Linux信息
Linux ubuntu 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
我使用的gcc信息
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
g ++的信息
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
配置
../src/gcc-r-236947/trunk/configure --prefix=/usr/local/bin/gcc-r-236947/ --enable-languages=c,c++ --disable-multilib
我已经签出了两次,所以不是因为net不起作用(这可能会影响下载并导致错误的源代码)。
我已经执行了“ ./contrib/download_prerequisites”命令,所以它不是依赖关系问题。
没有权限问题。
这是错误信息:
In file included from ../../../src/gcc-r-236947/trunk/libgcc/../gcc/tsystem.h:101:0,from ../../../src/gcc-r-236947/trunk/libgcc/libgcc2.c:27:
/usr/include/stdlib.h:140:8: error: unknown type name ‘_Float32’
extern _Float32 strtof32 (const char *__restrict __nptr,^~~~~~~~
/usr/include/stdlib.h:146:8: error: unknown type name ‘_Float64’
extern _Float64 strtof64 (const char *__restrict __nptr,^~~~~~~~
/usr/include/stdlib.h:152:8: error: unknown type name ‘_Float128’
extern _Float128 strtof128 (const char *__restrict __nptr,^~~~~~~~~
/usr/include/stdlib.h:158:8: error: unknown type name ‘_Float32x’
extern _Float32x strtof32x (const char *__restrict __nptr,^~~~~~~~~
/usr/include/stdlib.h:164:8: error: unknown type name ‘_Float64x’
extern _Float64x strtof64x (const char *__restrict __nptr,^~~~~~~~~
/usr/include/stdlib.h:233:10: error: unknown type name ‘_Float32’
_Float32 __f)
^~~~~~~~
/usr/include/stdlib.h:239:10: error: unknown type name ‘_Float64’
_Float64 __f)
^~~~~~~~
/usr/include/stdlib.h:245:4: error: unknown type name ‘_Float128’
_Float128 __f)
^~~~~~~~~
/usr/include/stdlib.h:251:4: error: unknown type name ‘_Float32x’
_Float32x __f)
^~~~~~~~~
/usr/include/stdlib.h:257:4: error: unknown type name ‘_Float64x’
_Float64x __f)
^~~~~~~~~
/usr/include/stdlib.h:316:8: error: unknown type name ‘_Float32’
extern _Float32 strtof32_l (const char *__restrict __nptr,^~~~~~~~
/usr/include/stdlib.h:323:8: error: unknown type name ‘_Float64’
extern _Float64 strtof64_l (const char *__restrict __nptr,^~~~~~~~
/usr/include/stdlib.h:330:8: error: unknown type name ‘_Float128’
extern _Float128 strtof128_l (const char *__restrict __nptr,^~~~~~~~~
/usr/include/stdlib.h:337:8: error: unknown type name ‘_Float32x’
extern _Float32x strtof32x_l (const char *__restrict __nptr,^~~~~~~~~
/usr/include/stdlib.h:344:8: error: unknown type name ‘_Float64x’
extern _Float64x strtof64x_l (const char *__restrict __nptr,^~~~~~~~~
In file included from ../../../src/gcc-r-236947/trunk/libgcc/../gcc/tsystem.h:101:0,^~~~~~~~
In file included from ../../../src/gcc-r-236947/trunk/libgcc/../gcc/tsystem.h:101:0,^~~~~~~~~
/usr/include/stdlib.h:152:8: error: unknown type name ‘_Float128’
extern _Float128 strtof128 (const char *__restrict __nptr,^~~~~~~~~
Makefile:467: recipe for target '_negdi2.o' failed
make[3]: *** [_negdi2.o] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:467: recipe for target '_muldi3.o' failed
make[3]: *** [_muldi3.o] Error 1
Makefile:467: recipe for target '_cmpdi2.o' failed
make[3]: *** [_cmpdi2.o] Error 1
Makefile:467: recipe for target '_ashrdi3.o' failed
make[3]: *** [_ashrdi3.o] Error 1
Makefile:467: recipe for target '_clear_cache.o' failed
make[3]: *** [_clear_cache.o] Error 1
Makefile:467: recipe for target '_ucmpdi2.o' failed
make[3]: *** [_ucmpdi2.o] Error 1
Makefile:467: recipe for target '_lshrdi3.o' failed
make[3]: *** [_lshrdi3.o] Error 1
Makefile:467: recipe for target '_ashldi3.o' failed
make[3]: *** [_ashldi3.o] Error 1
make[3]: Leaving directory '/usr/local/etc/x86_64-pc-linux-gnu/libgcc'
Makefile:20101: recipe for target 'all-stage1-target-libgcc' failed
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/usr/local/etc'
Makefile:23999: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/usr/local/etc'
Makefile:921: recipe for target 'all' failed
make: *** [all] Error 2