xmrig / xmrig-nvidia

Monero (XMR) NVIDIA miner
GNU General Public License v3.0
706 stars 262 forks source link

unsupported GNU version! gcc versions later than 6 are not supported! #134

Open wilo17 opened 6 years ago

wilo17 commented 6 years ago

I'm using gcc (GCC) 7.3.1, but failing to compile the xmrig-nvidia:

###################### In file included from /usr/local/cuda/include/host_config.h:50:0, from /usr/local/cuda/include/cuda_runtime.h:78, from :0: /usr/local/cuda/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!

^~~~~ CMake Error at xmrig-cuda_generated_cuda_extra.cu.o.Release.cmake:219 (message): Error generating /home/wilo/Téléchargements/CRYPTO/xmrig-nvidia-2.5.0/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_extra.cu.o

make[2]: [CMakeFiles/xmrig-cuda.dir/build.make:72: CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o] Error 1 make[1]: [CMakeFiles/Makefile2:67: CMakeFiles/xmrig-cuda.dir/all] Error 2 make: *** [Makefile:84: all] Error 2

##########################################

ghost commented 6 years ago

A good idea might be to use gcc 6 instead of 7.3 :)

wilo17 commented 6 years ago

Yeah, I know but it's boring to downgrade on Fedora ;)

ghost commented 6 years ago

You can't have both installed at the same time on Linux? :O

wilo17 commented 6 years ago

I didn't find both version on Fedora, I have no other choice than to compile myself gcc 6.

udexon commented 6 years ago

https://github.com/Xtra-Computing/thundersvm/issues/54#issuecomment-406567072 cmake -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6 ..

urbaez22 commented 2 years ago

Xtra-Computing/thundersvm#54 (comment) cmake -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6 ..

Excellent!! I compiled on Ubuntu 20.04, for a GTX 1060 Mobile, with the following commands: $ cmake . -DCUDA_ARCH=60 -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 $ make And voilá, after a few minutes, it completed the task and now I have my libxmrig-cuda.so.. As an additional info, anyone can find all cmake parameter here.