0

If I want to try some new features of GCC (tip from the GCC git repo, and also Release 12.2) on my Ubuntu (22.10) machine I often use:

unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE LD_LIBRARY_PATH
../configure --disable-multilib --enable-languages=c,c++ --prefix=$PWD/../install
make -j 4 && make install

Recently I have been using a Debian-based (Crostini) Chromebook, and while building GCC there, I forgot to include the unset line from above. After 6 minutes this led to an error at the make stage:

...
g++: fatal error: unknown spec function 'dumps'
compilation terminated
make[3]: ***[Makefile:1143: insn-attrtab.o] Error 1
...

As I came towards realising that unset could be important, I checked to see the existing contents of the environment vars involved. All were empty. Can someone explain how it is then that using unset here allows the error to be avoided?

user2023370
  • 10,488
  • 6
  • 50
  • 83

0 Answers0