我正在 Devuan Chimaera GNU/Linux 系统上构建 GCC 8.5.0(使用 GCC 10)。我已经配置了./configure --disable-gnat
,然后运行make
。在某些时候,我得到:
echo timestamp > s-selftest-c
rm gcc.pod
make[3]: Leaving directory '/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc'
Checking multilib configuration for libgcc...
Configuring stage 1 in x86_64-pc-linux-gnu/libgcc
configure: loading cache ./config.cache
configure: error: `CC' has changed since the previous run:
configure: former value: `/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/xgcc -B/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/ -B/opt/gcc-8.5.0/x86_64-pc-linux-gnu/bin/ -B/opt/gcc-8.5.0/x86_64-pc-linux-gnu/lib/ -isystem /opt/gcc-8.5.0/x86_64-pc-linux-gnu/include -isystem /opt/gcc-8.5.0/x86_64-pc-linux-gnu/sys-include '
configure: current value: `/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/xgcc -B/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/ -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 '
configure: error: in `/usr/local/src/gcc-8.5.0/x86_64-pc-linux-gnu/libgcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [Makefile:18716: configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory '/usr/local/src/gcc-8.5.0'
make[1]: *** [Makefile:24352: stage1-bubble] Error 2
make[1]: Leaving directory '/usr/local/src/gcc-8.5.0'
make: *** [Makefile:945: all] Error 2
为什么会这样?我尝试make distclean
并重复该过程,但没有帮助。