我正在尝试在我的系统上安装最新版本的 GCC 13.2:
Linux minty-virtual-machine 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
引导:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --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 --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
在单独的构建目录中生成 Makefile 并运行后make -j 4
,出现以下错误:
make[6]: Entering directory '/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++98'
/bin/bash ../../libtool --tag CXX --tag disable-shared --mode=compile /home/minty/gcc13.2/objdir/./gcc/xgcc -shared-libgcc -B/home/minty/gcc13.2/objdir/./gcc -nostdinc++ -L/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include -fno-checking -I/home/minty/gcc13.2/libstdc++-v3/../libgcc -I/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/minty/gcc13.2/libstdc++-v3/libsupc++ -std=gnu++98 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=c++locale.lo -g -O2 -D_GNU_SOURCE -fcf-protection -mshstk -fimplicit-templates -c c++locale.cc
libtool: compile: /home/minty/gcc13.2/objdir/./gcc/xgcc -shared-libgcc -B/home/minty/gcc13.2/objdir/./gcc -nostdinc++ -L/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src -L/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include -fno-checking -I/home/minty/gcc13.2/libstdc++-v3/../libgcc -I/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include -I/home/minty/gcc13.2/libstdc++-v3/libsupc++ -std=gnu++98 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=c++locale.lo -g -O2 -D_GNU_SOURCE -fcf-protection -mshstk -fimplicit-templates -c c++locale.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o c++locale.o
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: invalid suffix "F32" on floating constant
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: invalid suffix "F32" on floating constant
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: invalid suffix "F32" on floating constant
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: invalid suffix "F32" on floating constant
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
In file included from c++locale.cc:33:
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: invalid suffix "F32" on floating constant
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: invalid suffix "F32" on floating constant
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: invalid suffix "F64" on floating constant
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: invalid suffix "F64" on floating constant
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: invalid suffix "F64" on floating constant
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: invalid suffix "F64" on floating constant
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: invalid suffix "F64" on floating constant
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: invalid suffix "F64" on floating constant
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: error: invalid suffix "F128" on floating constant
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: error: invalid suffix "F128" on floating constant
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: error: invalid suffix "F128" on floating constant
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: error: invalid suffix "F128" on floating constant
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: error: invalid suffix "F128" on floating constant
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: error: invalid suffix "F128" on floating constant
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1989:1: error: redefinition of ‘struct std::numeric_limits<float>’
1989 | __glibcxx_float_n(32)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1670:12: note: previous definition of ‘struct std::numeric_limits<float>’
1670 | struct numeric_limits<float>
| ^~~~~~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1992:1: error: redefinition of ‘struct std::numeric_limits<double>’
1992 | __glibcxx_float_n(64)
| ^~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1745:12: note: previous definition of ‘struct std::numeric_limits<double>’
1745 | struct numeric_limits<double>
| ^~~~~~~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:2089:12: error: redefinition of ‘struct std::numeric_limits<__float128>’
2089 | struct numeric_limits<__float128>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/limits:1995:1: note: previous definition of ‘struct std::numeric_limits<__float128>’
1995 | __glibcxx_float_n(128)
| ^~~~~~~~~~~~~~~~~
make[6]: *** [Makefile:876: c++locale.lo] Error 1
make[6]: Leaving directory '/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++98'
make[5]: *** [Makefile:797: all-recursive] Error 1
make[5]: Leaving directory '/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src'
make[4]: *** [Makefile:577: all-recursive] Error 1
make[4]: Leaving directory '/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3'
make[3]: *** [Makefile:502: all] Error 2
make[3]: Leaving directory '/home/minty/gcc13.2/objdir/x86_64-pc-linux-gnu/libstdc++-v3'
make[2]: *** [Makefile:17689: all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory '/home/minty/gcc13.2/objdir'
make[1]: *** [Makefile:26356: stage1-bubble] Error 2
make[1]: Leaving directory '/home/minty/gcc13.2/objdir'
make: *** [Makefile:1100: all] Error 2
我在网上找不到任何解决方案或解释。这里到底有什么问题呢?