Important stuff:
Hello users of Ubuntu. Recently I have decided to step into the Ethereum mining world and compile ethminer
myself. After installing cuda
however, I ran into a small problem. While doing sudo cmake --build .
after cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF
, the console outputted this:
[ 0%] Built target BuildInfo.h
[ 29%] Built target devcore
[ 41%] Built target ethash
[ 45%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
In file included from /usr/local/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
/usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported!
^~~~~
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:222 (message):
Error generating
/home/diamond/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Additional info:
I installed CUDA using sudo apt install cuda
. It installed nvidia-275
and cuda
itself (along with a lot other stuff)
-D CUDA_NVCC_FLAGS="-ccbin gcc-4.9"
(assuming you have gcc-4.9 installed) – steeldriver Jul 19 '17 at 13:39sudo apt install gcc-4.9 g++-4.9
then from here, dols -la /usr/bin/ | grep -oP "[\S]*(gcc|g\+\+)(-[a-z]+)*[\s]" | xargs bash -c 'for link in ${@:1}; do sudo ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 4.9
– diamondburned Jul 20 '17 at 06:36