xmrig / xmrig-cuda

NVIDIA CUDA plugin for XMRig miner
GNU General Public License v3.0
365 stars 154 forks source link

Error when compiling Cuda plugin #66

Closed justinspony closed 4 years ago

justinspony commented 4 years ago

Hello,

I have come across the error while compiling. Any assistance is appreciated.

sudo cmake .. -DCUDA_LIB=/usr/lib/x86_64-linux-gnu/nvidia/current/libcuda.so.418.152.00 -DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/cuda -- Configuring done -- Generating done -- Build files have been written to: /home/j/xmrig-cuda/build

:~/xmrig-cuda/build$ sudo make -j$(nproc) [ 11%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o [ 11%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o [ 17%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o [ 23%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o [ 29%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o [ 35%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o [ 41%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/wownero/xmrig-cu_generated_randomx_wownero.cu.o [ 47%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o [ 52%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o [ 58%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/AstroBWT/dero/xmrig-cu_generated_AstroBWT.cu.o /usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined

/usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefined

/usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(1049): error: identifier "__is_assignable" is undefine

justinspony commented 4 years ago

found a similar reported issue here: https://github.com/xmrig/xmrig-cuda/issues/61

solution was said to use cmake .. -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8

i was able to make it work by changing 8 to 7.

justinspony commented 4 years ago

it completed with the following. is this ok?

[ 58%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o /home/j/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/j/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/j/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/j/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/j/xmrig-cuda/src/RandomX/randomx_cuda.hpp(319): warning: pointless comparison of unsigned integer with zero

/home/j/xmrig-cuda/src/cuda_extra.cu: In function ‘int cuda_get_deviceinfo(nvid_ctx*)’: /home/j/xmrig-cuda/src/cuda_extra.cu:565:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (ctx->device_blocks > max_blocks) {


At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-class-memaccess’
Scanning dependencies of target xmrig-cu
[ 64%] Building CXX object CMakeFiles/xmrig-cu.dir/src/KawPow/raven/CudaKawPow_gen.cpp.o
[ 70%] Linking CXX static library libxmrig-cu.a
[ 70%] Built target xmrig-cu
Scanning dependencies of target xmrig-cuda
[ 76%] Building CXX object CMakeFiles/xmrig-cuda.dir/src/CudaCryptonightR_gen.cpp.o
[ 82%] Building CXX object CMakeFiles/xmrig-cuda.dir/src/crypto/common/Algorithm.cpp.o
[ 94%] Building CXX object CMakeFiles/xmrig-cuda.dir/src/xmrig-cuda.cpp.o
[ 94%] Building C object CMakeFiles/xmrig-cuda.dir/src/crypto/cn/c_blake256.c.o
[100%] Linking CXX shared library libxmrig-cuda.so
[100%] Built target xmrig-cuda