fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.06k stars 1.79k forks source link

Debian 9 compile issue: gcc versions later than 5 are not supported #1036

Closed HydraGene closed 6 years ago

HydraGene commented 6 years ago

Please provide as much as possible information to reproduce the issue.

I am on a laptop, Debian 9. I have installed the bumblebee-nvidia and nvidia-cuda-toolkit packages. Seems like gcc version is the problem. Debian 9 has version 6, but compiling requires version 5.. Version 5 is not available in the Debian repository, so I can't downgrade.

Basic information

Compile issues

CMakeFiles/xmrstak_cuda_backend.dir/build.make:70: recipe for target 'CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_extra.cu.o' failed make[2]: [CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_extra.cu.o] Error 1 CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/xmrstak_cuda_backend.dir/all' failed make[1]: [CMakeFiles/xmrstak_cuda_backend.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 user@domain:~/Downloads/xmr-stak/build$

user@domain:~/Downloads/xmr-stak/build$ cmake -LA CMake Error: The source directory "/home/user0/Downloads/xmr-stak/build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. -- Cache values CMAKE_AR:FILEPATH=/usr/bin/ar CMAKE_BUILD_TYPE:STRING=Release CMAKE_COLOR_MAKEFILE:BOOL=ON CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ CMAKE_CXX_FLAGS:STRING= CMAKE_CXX_FLAGS_DEBUG:STRING=-g CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc CMAKE_C_FLAGS:STRING= CMAKE_C_FLAGS_DEBUG:STRING=-g CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG CMAKE_EXE_LINKER_FLAGS:STRING= CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF CMAKE_INSTALL_PREFIX:PATH=/home/user0/Downloads/xmr-stak/build CMAKE_LINKER:FILEPATH=/usr/bin/ld CMAKE_LINK_STATIC:BOOL=OFF CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make CMAKE_MODULE_LINKER_FLAGS:STRING= CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= CMAKE_NM:FILEPATH=/usr/bin/nm CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib CMAKE_SHARED_LINKER_FLAGS:STRING= CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= CMAKE_SKIP_INSTALL_RPATH:BOOL=NO CMAKE_SKIP_RPATH:BOOL=NO CMAKE_STATIC_LINKER_FLAGS:STRING= CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= CMAKE_STRIP:FILEPATH=/usr/bin/strip CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE CPU_ENABLE:BOOL=ON CUDA_64_BIT_DEVICE_CODE:BOOL=ON CUDA_ARCH:STRING=30;35;37;50;52;20;60;61;62 CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON CUDA_BUILD_CUBIN:BOOL=OFF CUDA_BUILD_EMULATION:BOOL=OFF CUDA_COMPILER:STRING=nvcc CUDA_CUDART_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudart.so CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcuda.so CUDA_ENABLE:BOOL=ON CUDA_GENERATED_OUTPUT_DIR:PATH= CUDA_HOST_COMPILATION_CPP:BOOL=ON CUDA_HOST_COMPILER:FILEPATH=/usr/bin/cc CUDA_KEEP_FILES:BOOL=OFF CUDA_NVCC_EXECUTABLE:FILEPATH=/usr/bin/nvcc CUDA_NVCC_FLAGS:STRING= CUDA_NVCC_FLAGS_DEBUG:STRING= CUDA_NVCC_FLAGS_MINSIZEREL:STRING= CUDA_NVCC_FLAGS_RELEASE:STRING= CUDA_NVCC_FLAGS_RELWITHDEBINFO:STRING= CUDA_PROPAGATE_HOST_FLAGS:BOOL=ON CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND CUDA_SEPARABLE_COMPILATION:BOOL=OFF CUDA_SHOW_CODELINES:BOOL=OFF CUDA_SHOW_REGISTER:BOOL=OFF CUDA_TOOLKIT_INCLUDE:PATH=/usr/include CUDA_TOOLKIT_ROOT_DIR:PATH=/usr CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON CUDA_VERBOSE_BUILD:BOOL=OFF CUDA_VERSION:STRING=8.0 CUDA_cublas_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcublas.so CUDA_cublas_device_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcublas_device.a CUDA_cudadevrt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudadevrt.a CUDA_cudart_static_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudart_static.a CUDA_cufft_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcufft.so CUDA_cupti_LIBRARY:FILEPATH=CUDA_cupti_LIBRARY-NOTFOUND CUDA_curand_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcurand.so CUDA_cusolver_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcusolver.so CUDA_cusparse_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcusparse.so CUDA_nppc_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppc.so CUDA_nppi_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppi.so CUDA_npps_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnpps.so CUDA_rt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so HWLOC:FILEPATH=/usr/lib/x86_64-linux-gnu/libhwloc.so HWLOC_ENABLE:BOOL=ON HWLOC_INCLUDE_DIR:PATH=/usr/include MHTD:FILEPATH=/usr/lib/x86_64-linux-gnu/libmicrohttpd.so MICROHTTPD_ENABLE:BOOL=ON MTHD_INCLUDE_DIR:PATH=/usr/include OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcrypto.so OPENSSL_INCLUDE_DIR:PATH=/usr/include OPENSSL_SSL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libssl.so OpenCL_ENABLE:BOOL=ON OpenCL_INCLUDE_DIR:PATH=/usr/include OpenCL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libOpenCL.so OpenSSL_ENABLE:BOOL=ON PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config XMR-STAK_COMPILE:STRING=native XMR-STAK_CURRENCY:STRING=all XMR-STAK_LARGEGRID:BOOL=ON XMR-STAK_THREADS:STRING=0 user@domain:~/Downloads/xmr-stak/build$

psychocrypt commented 6 years ago

GCC 6.X is not supported by CUDA8. Please use GCC 5.X or CUDA 9.X. Please emty the build folder before you try to compile with new settings.

HydraGene commented 6 years ago

Okay, thanks.

I have just read and tried "To do a generic and static build for a system without gcc 5.1+" since I have a system without gcc 5.1+. I suppose it should work, but it didn't. Output below.

Just a general question: If I would build this inside a virtual machine with Debian Testing which has CUDA Toolkit 9.0, would I be able to run the binary inside Debian Stretch (Stable) without any big issues?

user@domain:~/Downloads/xmr-stak/build$ cmake -DCMAKE_LINK_STATIC=ON -DXMR-STAK_COMPILE=generic ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Set miner currency to 'monero' and 'aeon'
-- 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 (found suitable version "8.0", minimum required is "7.5") 
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.0") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0f") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user0/Downloads/xmr-stak/build
user@domain:~/Downloads/xmr-stak/build$ make 
Scanning dependencies of target xmr-stak-c
[  2%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_blake256.c.o
[  5%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_groestl.c.o
[  8%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_jh.c.o
[ 11%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_keccak.c.o
[ 14%] Building C object CMakeFiles/xmr-stak-c.dir/xmrstak/backend/cpu/crypto/c_skein.c.o
[ 17%] Linking C static library bin/libxmr-stak-c.a
[ 17%] Built target xmr-stak-c
Scanning dependencies of target xmr-stak-backend
[ 20%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 23%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 26%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 29%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 32%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 35%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 38%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 41%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 44%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 47%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 50%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 52%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 55%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 58%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 61%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 64%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 67%] Linking CXX static library bin/libxmr-stak-backend.a
[ 67%] Built target xmr-stak-backend
[ 70%] Building NVCC (Device) object CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_extra.cu.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from /usr/include/cuda_runtime.h:78:0,
                 from <command-line>:0:
/usr/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 xmrstak_cuda_backend_generated_cuda_extra.cu.o.Release.cmake:222 (message):
  Error generating
  /home/user0/Downloads/xmr-stak/build/CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/./xmrstak_cuda_backend_generated_cuda_extra.cu.o

CMakeFiles/xmrstak_cuda_backend.dir/build.make:70: recipe for target 'CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_extra.cu.o' failed
make[2]: *** [CMakeFiles/xmrstak_cuda_backend.dir/xmrstak/backend/nvidia/nvcc_code/xmrstak_cuda_backend_generated_cuda_extra.cu.o] Error 1
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/xmrstak_cuda_backend.dir/all' failed
make[1]: *** [CMakeFiles/xmrstak_cuda_backend.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
user@domain:~/Downloads/xmr-stak/build$ cmake -LA
CMake Error: The source directory "/home/user0/Downloads/xmr-stak/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
-- Cache values
CMAKE_AR:FILEPATH=/usr/bin/ar
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_CXX_FLAGS:STRING=
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
CMAKE_C_FLAGS:STRING=
CMAKE_C_FLAGS_DEBUG:STRING=-g
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
CMAKE_EXE_LINKER_FLAGS:STRING=
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
CMAKE_INSTALL_PREFIX:PATH=/home/user0/Downloads/xmr-stak/build
CMAKE_LINKER:FILEPATH=/usr/bin/ld
CMAKE_LINK_STATIC:BOOL=ON
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
CMAKE_MODULE_LINKER_FLAGS:STRING=
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_NM:FILEPATH=/usr/bin/nm
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
CMAKE_SHARED_LINKER_FLAGS:STRING=
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_STRIP:FILEPATH=/usr/bin/strip
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
CPU_ENABLE:BOOL=ON
CUDA_64_BIT_DEVICE_CODE:BOOL=ON
CUDA_ARCH:STRING=30;35;37;50;52;20;60;61;62
CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON
CUDA_BUILD_CUBIN:BOOL=OFF
CUDA_BUILD_EMULATION:BOOL=OFF
CUDA_COMPILER:STRING=nvcc
CUDA_CUDART_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudart.so
CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcuda.so
CUDA_ENABLE:BOOL=ON
CUDA_GENERATED_OUTPUT_DIR:PATH=
CUDA_HOST_COMPILATION_CPP:BOOL=ON
CUDA_HOST_COMPILER:FILEPATH=/usr/bin/cc
CUDA_KEEP_FILES:BOOL=OFF
CUDA_NVCC_EXECUTABLE:FILEPATH=/usr/bin/nvcc
CUDA_NVCC_FLAGS:STRING=
CUDA_NVCC_FLAGS_DEBUG:STRING=
CUDA_NVCC_FLAGS_MINSIZEREL:STRING=
CUDA_NVCC_FLAGS_RELEASE:STRING=
CUDA_NVCC_FLAGS_RELWITHDEBINFO:STRING=
CUDA_PROPAGATE_HOST_FLAGS:BOOL=ON
CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND
CUDA_SEPARABLE_COMPILATION:BOOL=OFF
CUDA_SHOW_CODELINES:BOOL=OFF
CUDA_SHOW_REGISTER:BOOL=OFF
CUDA_TOOLKIT_INCLUDE:PATH=/usr/include
CUDA_TOOLKIT_ROOT_DIR:PATH=/usr
CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON
CUDA_VERBOSE_BUILD:BOOL=OFF
CUDA_VERSION:STRING=8.0
CUDA_cublas_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcublas.so
CUDA_cublas_device_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcublas_device.a
CUDA_cudadevrt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudadevrt.a
CUDA_cudart_static_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcudart_static.a
CUDA_cufft_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcufft.so
CUDA_cupti_LIBRARY:FILEPATH=CUDA_cupti_LIBRARY-NOTFOUND
CUDA_curand_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcurand.so
CUDA_cusolver_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcusolver.so
CUDA_cusparse_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcusparse.so
CUDA_nppc_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppc.so
CUDA_nppi_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnppi.so
CUDA_npps_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libnpps.so
CUDA_rt_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so
HWLOC:FILEPATH=/usr/lib/x86_64-linux-gnu/libhwloc.so
HWLOC_ENABLE:BOOL=ON
HWLOC_INCLUDE_DIR:PATH=/usr/include
MHTD:FILEPATH=/usr/lib/x86_64-linux-gnu/libmicrohttpd.so
MICROHTTPD_ENABLE:BOOL=ON
MTHD_INCLUDE_DIR:PATH=/usr/include
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libcrypto.so
OPENSSL_INCLUDE_DIR:PATH=/usr/include
OPENSSL_SSL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libssl.so
OpenCL_ENABLE:BOOL=ON
OpenCL_INCLUDE_DIR:PATH=/usr/include
OpenCL_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libOpenCL.so
OpenSSL_ENABLE:BOOL=ON
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
XMR-STAK_COMPILE:STRING=generic
XMR-STAK_CURRENCY:STRING=all
XMR-STAK_LARGEGRID:BOOL=ON
XMR-STAK_THREADS:STRING=0
Uplink03 commented 6 years ago

I'm on Ubuntu 17.10 and this is how I build xmr-stak after trying and failing with all kinds of combinations.

mkdir build
cd build
cmake ..
vim CMakeCache.txt # I haven't found a way to pass this parameter to cmake
# find CUDA_NVCC_FLAGS:STRING=
# change it to CUDA_NVCC_FLAGS:STRING=-ccbin gcc-5
# save, exit
make

I have CUDA 8 from the Ubuntu repositories (nothing installed that isn't in Ubuntu already).

You'll need to install gcc-5. The build will use the system's default gcc for the regular code (avoids error: ‘to_string’ is not a member of ‘std’), but gcc-5 for the CUDA stuff.

ways commented 6 years ago

In addition to what Uplink03 said, I had to install g++-5.