Torch on GCC 6.2 (Fedora 24)
It is possible, you just have to set some environmental variables.
export CFLAGS="-std=gnu99" export CXXFLAGS="-std=gnu++98" export CMAKE_C_FLAGS=$CFLAGS export CMAKE_CXX_FLAGS=$CXXFLAGS
And then we can install…
git clone https://github.com/torch/distro.git ~/.torch --recursive export MAKEFLAGS="-j8" ./install-deps ./install.sh
I ended up putting these in .bashrc so they would be used for anything I was compiling. It is more likely that something needing a newer spec will pass -std=c++14 to GCC than something old passing -std=c++98. I am not a big fan of GCC's decision to switch to the newer spec by default, especially since they must know this would break stuff.
Also, if you run into an error from a CUDA header saying you're using an unsupported compiler, just go to that header's line and delete the line that is throwing the error. It will work fine. NVIDIA is just being pedantic for the sake of support.