Code: Select all
sudo rm -rf build mkdir build cd build cmake ..
Yes, you are missing something. When you use sudo, sudo clears all the environment set up by your user including those things set by running the scl command. It removes the path set up to point to the newer gcc so it runs as root, with an incorrect environment for scl, and the only copy of gcc it finds is the system one.im not sure whether im missing something here but did you notice that i posted the running gcc underneath the fault this being gcc