fireice-uk / xmr-stak-nvidia

Monero NVIDIA miner
GNU General Public License v3.0
248 stars 98 forks source link

Arch Linux compiling issue #87

Closed itsmontoya closed 7 years ago

itsmontoya commented 7 years ago

I've been having trouble getting this to compile on Linux. Any suggestions?

[ 38%] Building CXX object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o
c++: error: unrecognized command line option ‘--cuda-path=/opt/cuda’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_20’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_30’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_35’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_37’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_50’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_52’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_60’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_61’
c++: error: unrecognized command line option ‘--cuda-gpu-arch=sm_62’
make[2]: *** [CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make:63: CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:105: CMakeFiles/xmr-stak-nvidiaCuda.dir/all] Error 2
psychocrypt commented 7 years ago

Your clang compiler is to old. Please use clang 3.9+

a-benny commented 7 years ago

I had issues too with clang, i got clang version 4001 unsupported. Using gcc5 worked for me. On arch linux you should still have gcc-5 installed along with the newest version of gcc, if not check the repos.

export CC=/usr/bin/gcc5 export CXX=/usr/bin/g++5

and then using gcc to compile got it to install for me. I keep getting gpu 0: out of memory, but I think that is due to my config file and not because of the compiler

psychocrypt commented 7 years ago

I had issues too with clang, i got clang version 4001 unsupported

NVIDIA Cuda 8 not supports clang 4 as host compiler, you could compile the device side with clang cmake -DCUDA_COMPILER=clang

and then using gcc to compile got it to install for me. I keep getting gpu 0: out of memory, but I think that is due to my config file and not because of the compiler

Please reduce the thread or block count in the file config.txt