xmrig / xmrig-cuda

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

error -- unsupported GNU version! gcc versions later than 7 are not supported! #69

Open minzak opened 4 years ago

minzak commented 4 years ago

I have Debian 10, with nvidia driver and libs.

nvidia-smi 
Fri Sep 18 12:21:25 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.152.00   Driver Version: 418.152.00   CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  On   | 00000000:01:00.0  On |                  N/A |
| 45%   31C    P8    N/A /  75W |    769MiB /  4039MiB |     20%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       617      G   /usr/lib/xorg/Xorg                           389MiB |
|    0       818      G   /usr/bin/kwin_x11                             90MiB |
|    0       827      G   /usr/bin/krunner                               1MiB |
|    0       829      G   /usr/bin/plasmashell                         118MiB |
|    0      2905      G   ...4-linux-gnu/libexec/kscreenlocker_greet   167MiB |
+-----------------------------------------------------------------------------+

And typical gcc 7 & 8

gcc-8 -v
Using built-in specs.
COLLECT_GCC=gcc-8
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.3.0-6' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.3.0 (Debian 8.3.0-6)

gcc-7 -v
Using built-in specs.
COLLECT_GCC=gcc-7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 7.4.0-6' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Debian 7.4.0-6) 

I build with:

cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON\
-DCUDA_VERBOSE_BUILD=ON\
-DCUDA_LIB=/usr/lib/x86_64-linux-gnu/nvidia/current/libcuda.so\
-DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/x86_64-linux-gnu/nvidia/current\
-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
make -j$(nproc)

And result is:


-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/gcc-8
-- Check for working C compiler: /usr/bin/gcc-8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++-8
-- Check for working CXX compiler: /usr/bin/g++-8 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for __builtin___clear_cache
-- Looking for __builtin___clear_cache - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/lib/x86_64-linux-gnu/nvidia/current (found suitable version "9.2", minimum required is "8.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/xmrig-cuda/build
/usr/bin/cmake -S/usr/local/src/xmrig-cuda -B/usr/local/src/xmrig-cuda/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /usr/local/src/xmrig-cuda/build/CMakeFiles /usr/local/src/xmrig-cuda/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/usr/local/src/xmrig-cuda/build'
make -f CMakeFiles/xmrig-cu.dir/build.make CMakeFiles/xmrig-cu.dir/depend
make[2]: Entering directory '/usr/local/src/xmrig-cuda/build'
[ 35%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o
[ 35%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.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/monero/xmrig-cu_generated_randomx_monero.cu.o
[ 35%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o
[ 47%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o
[ 41%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o
[ 41%] Building NVCC (Device) object CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX && /usr/bin/cmake -E make_directory /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/.
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/./xmrig-cu_generated_randomx_arqma.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/./xmrig-cu_generated_randomx_arqma.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/./xmrig-cu_generated_randomx_monero.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/./xmrig-cu_generated_randomx_monero.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_core.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_core.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/./xmrig-cu_generated_randomx_keva.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/./xmrig-cu_generated_randomx_keva.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/./xmrig-cu_generated_randomx_loki.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/./xmrig-cu_generated_randomx_loki.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_extra.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_extra.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/./xmrig-cu_generated_KawPow.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/./xmrig-cu_generated_KawPow.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o.Release.cmake
cd /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX && /usr/bin/cmake -D verbose:BOOL=ON -D build_configuration:STRING=Release -D generated_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/./xmrig-cu_generated_randomx.cu.o -D generated_cubin_file:STRING=/usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/./xmrig-cu_generated_randomx.cu.o.cubin.txt -P /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o.Release.cmake
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_core.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/./xmrig-cu_generated_randomx_monero.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/./xmrig-cu_generated_randomx_arqma.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_extra.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/./xmrig-cu_generated_randomx_keva.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/./xmrig-cu_generated_KawPow.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/./xmrig-cu_generated_randomx_loki.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_core.cu.o
-- Removing /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/./xmrig-cu_generated_randomx.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/./xmrig-cu_generated_randomx_arqma.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/./xmrig-cu_generated_randomx_monero.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/./xmrig-cu_generated_randomx_keva.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_extra.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/./xmrig-cu_generated_randomx_loki.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/./xmrig-cu_generated_KawPow.cu.o
/usr/bin/cmake -E remove /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/./xmrig-cu_generated_randomx.cu.o
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o.NVCC-depend
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o.NVCC-depend
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o.NVCC-depend
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o.NVCC-depend
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o.NVCC-depend
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o.NVCC-depend
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o.NVCC-depend
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/RandomX/monero/randomx_monero.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/RandomX/arqma/randomx_arqma.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
-- Generating dependency file: /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o.NVCC-depend
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/cuda_extra.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/cuda_core.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/RandomX/keva/randomx_keva.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/RandomX/loki/randomx_loki.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/KawPow/raven/KawPow.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
/usr/bin/nvcc -M -D__CUDACC__ /usr/local/src/xmrig-cuda/src/RandomX/randomx.cu -o /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o.NVCC-depend -ccbin /usr/bin/gcc-8 -m64 --std c++11 -DXMRIG_ALGO_CN_LITE -DXMRIG_ALGO_CN_HEAVY -DXMRIG_ALGO_CN_PICO -DRAPIDJSON_SSE2 -DNDEBUG -DHAVE_ROTR -D_GNU_SOURCE -DHAVE_BUILTIN_CLEAR_CACHE -DCUB_IGNORE_DEPRECATED_CPP_DIALECT -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT -DXMRIG_LARGEGRID=ON -Xcompiler ,\"-Wall\",\"-fexceptions\",\"-fno-rtti\",\"-Wno-strict-aliasing\",\"-Wno-class-memaccess\",\"-fPIC\",\"-maes\",\"-O3\",\"-DNDEBUG\",\"-O2\",\"-s\" -Wno-deprecated-gpu-targets --generate-code arch=compute_30,code=sm_30 --generate-code arch=compute_30,code=compute_30 --generate-code arch=compute_50,code=sm_50 --generate-code arch=compute_50,code=compute_50 --generate-code arch=compute_60,code=sm_60 --generate-code arch=compute_60,code=compute_60 --generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --default-stream per-thread -DNVCC -I/usr/include -I/usr/local/src/xmrig-cuda/src
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
In file included from /usr/include/host_config.h:50,
                 from /usr/include/cuda_runtime.h:78,
                 from <command-line>:
/usr/include/crt/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
 #error -- unsupported GNU version! gcc versions later than 7 are not supported!
  ^~~~~
CMake Error at xmrig-cu_generated_randomx_monero.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/monero/./xmrig-cu_generated_randomx_monero.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:103: CMakeFiles/xmrig-cu.dir/src/RandomX/monero/xmrig-cu_generated_randomx_monero.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMake Error at xmrig-cu_generated_randomx_arqma.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/./xmrig-cu_generated_randomx_arqma.cu.o

CMake Error at xmrig-cu_generated_KawPow.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/KawPow/raven/./xmrig-cu_generated_KawPow.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:82: CMakeFiles/xmrig-cu.dir/src/RandomX/arqma/xmrig-cu_generated_randomx_arqma.cu.o] Error 1
make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:131: CMakeFiles/xmrig-cu.dir/src/KawPow/raven/xmrig-cu_generated_KawPow.cu.o] Error 1
CMake Error at xmrig-cu_generated_randomx_keva.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/keva/./xmrig-cu_generated_randomx_keva.cu.o

CMake Error at xmrig-cu_generated_cuda_core.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_core.cu.o

CMake Error at xmrig-cu_generated_randomx.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/./xmrig-cu_generated_randomx.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:89: CMakeFiles/xmrig-cu.dir/src/RandomX/keva/xmrig-cu_generated_randomx_keva.cu.o] Error 1
make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:110: CMakeFiles/xmrig-cu.dir/src/RandomX/xmrig-cu_generated_randomx.cu.o] Error 1
make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:68: CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_core.cu.o] Error 1
CMake Error at xmrig-cu_generated_randomx_loki.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/RandomX/loki/./xmrig-cu_generated_randomx_loki.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:96: CMakeFiles/xmrig-cu.dir/src/RandomX/loki/xmrig-cu_generated_randomx_loki.cu.o] Error 1
CMake Error at xmrig-cu_generated_cuda_extra.cu.o.Release.cmake:219 (message):
  Error generating
  /usr/local/src/xmrig-cuda/build/CMakeFiles/xmrig-cu.dir/src/./xmrig-cu_generated_cuda_extra.cu.o

make[2]: *** [CMakeFiles/xmrig-cu.dir/build.make:75: CMakeFiles/xmrig-cu.dir/src/xmrig-cu_generated_cuda_extra.cu.o] Error 1
make[2]: Leaving directory '/usr/local/src/xmrig-cuda/build'
make[1]: *** [CMakeFiles/Makefile2:75: CMakeFiles/xmrig-cu.dir/all] Error 2
make[1]: Leaving directory '/usr/local/src/xmrig-cuda/build'
make: *** [Makefile:87: all] Error 2

What is wrong?

Spudz76 commented 4 years ago

You have told it to use the gcc-8 as host compiler where CUDA 9.2 only supports gcc-7 maximum image

Try:

cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON\
-DCUDA_VERBOSE_BUILD=ON\
-DCUDA_LIB=/usr/lib/x86_64-linux-gnu/nvidia/current/libcuda.so\
-DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/x86_64-linux-gnu/nvidia/current\
-DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7
make -j$(nproc)

Or much more simply:

CC=/usr/bin/gcc-7 CXX=/usr/bin/g++-7 cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON\
-DCUDA_VERBOSE_BUILD=ON\
-DCUDA_TOOLKIT_ROOT_DIR=/usr/lib/x86_64-linux-gnu/nvidia/current
make -j$(nproc)
bdytx5 commented 3 years ago

this will help you change versions of gcc and g++ easily https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa