Weird grin-miner build error

I got no problem building and running the node. No problem as well building grin-miner.

But once I’m trying to build the miner with the CUDA plugin, I get this error :

(…)
running: “cmake” “/home/user/grin/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins” “-DBUILD_CUDA_PLUGINS=TRUE” “-DCMAKE_INSTALL_PREFIX=/home/user/grin/grin-miner/target/debug/build/cuckoo_miner-539b2b040e2e537f/out” “-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_C_COMPILER=/usr/bin/cc” “-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64” “-DCMAKE_CXX_COMPILER=/usr/bin/c++” “-DCMAKE_BUILD_TYPE=Debug”
– The C compiler identification is GNU 7.3.0
– The CXX compiler identification is GNU 7.3.0
(…)
Makefile:83: recipe for target ‘all’ failed

— stderr
In file included from /usr/include/host_config.h:50:0,
from /usr/include/cuda_runtime.h:78,
from :0:
/usr/include/crt/host_config.h:121:2: error: #error – unsupported GNU version! gcc versions later than 6 are not supported!
#error – unsupported GNU version! gcc versions later than 6 are not supported!

Kinda weird. I don’t get why a later version couldn’t be used. And I don’t see myself downgrading. Is it a matter of a flag somewhere ?

Ok if it can help anyone, install gcc-6 and g+±6. Then the commands are :

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g+±6 10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10

Looks like a CUDA 9.* behavior.