'CXXFLAGS has changed since the previous run when building gdb
In my situation, I build gdb with ./configure --prefix=/home/vv/Desktop/gdb --enable-static=yes.
but it doesn't support python, so I try to recompile gdb with ./configure --prefix=/home/vv/Desktop/gdb --enable-static=yes --with-python
However, I get this error:
configure: loading cache ./config.cache
configure: error: `CXXFLAGS' has changed since the previous run:
configure: former value: ` '
configure: current value: `-g -O2 '
configure: error: in `/home/vv/Desktop/gdb-12.1/gdbsupport':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-gdbsupport] Error 1
make[1]: Leaving directory `/home/vv/Desktop/gdb-12.1'
make: *** [all] Error 2
I had tried make distclean or rm ./config.cache. And configure and make again. It doesn't work.
Solution 1:[1]
I delete the whole folder. And extract gdb source files again. And configure and make, this time, it works well.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | VictorV |
