fireice-uk / xmr-stak-nvidia

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

Build fails on Ubuntu 17.10: 'cannot find libdevice for sm_30' #180

Closed aensley closed 6 years ago

aensley commented 7 years ago

I'm trying to build this miner for my Nvidia GeForce GTX 650 Ti. I'm running Ubuntu 17.10.

I'm getting these errors during the build:

clang: error: cannot find libdevice for sm_30. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
clang: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.

CUDA version:

aensley@desktop:~/xmr-stak-nvidia$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

Clang version:

aensley@desktop:~/xmr-stak-nvidia$ clang -v
clang version 4.0.1-6 (tags/RELEASE_401/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
aensley@desktop:~/xmr-stak-nvidia$ export CC=/usr/bin/clang
aensley@desktop:~/xmr-stak-nvidia$ export CXX=/usr/bin/clang++

Configuration:

aensley@desktop:~/xmr-stak-nvidia$ cmake . -DCUDA_ARCH=30 -DCUDA_COMPILER=clang
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- 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/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 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") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0g") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aensley/xmr-stak-nvidia

Build:

aensley@desktop:~/xmr-stak-nvidia$ make install
Scanning dependencies of target xmr-stak-nvidiaCrypto
[  4%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_blake256.c.o
[  9%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_groestl.c.o
[ 14%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_jh.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_keccak.c.o
[ 23%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_skein.c.o
[ 28%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/soft_aes.c.o
[ 33%] Linking C static library libxmr-stak-nvidiaCrypto.a
[ 33%] Built target xmr-stak-nvidiaCrypto
Scanning dependencies of target xmr-stak-nvidiaCuda
[ 38%] Building CXX object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o
clang: error: cannot find libdevice for sm_30. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
clang: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make:62: recipe for target 'CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o' failed
make[2]: *** [CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/xmr-stak-nvidiaCuda.dir/all' failed
make[1]: *** [CMakeFiles/xmr-stak-nvidiaCuda.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Output of make VERBOSE=1:

aensley@desktop:~/xmr-stak-nvidia$ make VERBOSE=1
/usr/bin/cmake -H/home/aensley/xmr-stak-nvidia -B/home/aensley/xmr-stak-nvidia --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/aensley/xmr-stak-nvidia/CMakeFiles /home/aensley/xmr-stak-nvidia/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/aensley/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidiaCrypto.dir/build.make CMakeFiles/xmr-stak-nvidiaCrypto.dir/depend
make[2]: Entering directory '/home/aensley/xmr-stak-nvidia'
cd /home/aensley/xmr-stak-nvidia && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia/CMakeFiles/xmr-stak-nvidiaCrypto.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/aensley/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidiaCrypto.dir/build.make CMakeFiles/xmr-stak-nvidiaCrypto.dir/build
make[2]: Entering directory '/home/aensley/xmr-stak-nvidia'
make[2]: Nothing to be done for 'CMakeFiles/xmr-stak-nvidiaCrypto.dir/build'.
make[2]: Leaving directory '/home/aensley/xmr-stak-nvidia'
[ 33%] Built target xmr-stak-nvidiaCrypto
make -f CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make CMakeFiles/xmr-stak-nvidiaCuda.dir/depend
make[2]: Entering directory '/home/aensley/xmr-stak-nvidia'
cd /home/aensley/xmr-stak-nvidia && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia /home/aensley/xmr-stak-nvidia/CMakeFiles/xmr-stak-nvidiaCuda.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/aensley/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make CMakeFiles/xmr-stak-nvidiaCuda.dir/build
make[2]: Entering directory '/home/aensley/xmr-stak-nvidia'
[ 38%] Building CXX object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o
/usr/bin/clang++  -DXMR_STAK_LARGEGRID=ON -I/home/aensley/xmr-stak-nvidia/.  -msse2 -maes -O3 -DNDEBUG   -O3 -x cuda --cuda-path=/usr -ffp-contract=fast --cuda-gpu-arch=sm_30 -std=c++11 -o CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o -c /home/aensley/xmr-stak-nvidia/nvcc_code/cuda_core.cu
clang: error: cannot find libdevice for sm_30. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
clang: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make:62: recipe for target 'CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o' failed
make[2]: *** [CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/cuda_core.cu.o] Error 1
make[2]: Leaving directory '/home/aensley/xmr-stak-nvidia'
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/xmr-stak-nvidiaCuda.dir/all' failed
make[1]: *** [CMakeFiles/xmr-stak-nvidiaCuda.dir/all] Error 2
make[1]: Leaving directory '/home/aensley/xmr-stak-nvidia'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Installed nvidia- packages:

aensley@desktop:~/xmr-stak-nvidia$ apt search nvidia- | grep "installed"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

nvidia-384/artful-updates,now 384.90-0ubuntu3.17.10.1 amd64 [installed]
nvidia-cuda-dev/artful,now 8.0.61-1 amd64 [installed]
nvidia-cuda-doc/artful,artful,now 8.0.61-1 all [installed,automatic]
nvidia-cuda-gdb/artful,now 8.0.61-1 amd64 [installed,automatic]
nvidia-cuda-toolkit/artful,now 8.0.61-1 amd64 [installed]
nvidia-opencl-dev/artful,now 8.0.61-1 amd64 [installed,automatic]
nvidia-opencl-icd-384/artful-updates,now 384.90-0ubuntu3.17.10.1 amd64 [installed,automatic]
nvidia-prime/artful,now 0.8.5 amd64 [installed,automatic]
nvidia-profiler/artful,now 8.0.61-1 amd64 [installed,automatic]
nvidia-settings/artful,now 384.69-0ubuntu1 amd64 [installed,automatic]
nvidia-visual-profiler/artful,now 8.0.61-1 amd64 [installed,automatic]
aensley commented 7 years ago

I tried again using GCC 5. Still no joy. I'm only a little familiar with make and C++. Not sure how to solve this problem.

Cleanup:

aensley@desktop:~/xmr-stak-nvidia$ git clean -fdx
Removing CMakeCache.txt
Removing CMakeFiles/
Removing Makefile
Removing bin/
Removing cmake_install.cmake

Configuration:

aensley@desktop:~/xmr-stak-nvidia$ export CC=/usr/bin/gcc-5
aensley@desktop:~/xmr-stak-nvidia$ export CXX=/usr/bin/g++-5
aensley@desktop:~/xmr-stak-nvidia$ cmake . -DCUDA_ARCH=30
-- The C compiler identification is GNU 5.4.1
-- The CXX compiler identification is GNU 5.4.1
-- Check for working C compiler: /usr/bin/gcc-5
-- Check for working C compiler: /usr/bin/gcc-5 -- 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++-5
-- Check for working CXX compiler: /usr/bin/g++-5 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 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") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0g") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aensley/xmr-stak-nvidia

Build:

aensley@desktop:~/xmr-stak-nvidia$ make install
Scanning dependencies of target xmr-stak-nvidiaCrypto
[  4%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_blake256.c.o
[  9%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_groestl.c.o
[ 14%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_jh.c.o
[ 19%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_keccak.c.o
[ 23%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/c_skein.c.o
[ 28%] Building C object CMakeFiles/xmr-stak-nvidiaCrypto.dir/crypto/soft_aes.c.o
[ 33%] Linking C static library libxmr-stak-nvidiaCrypto.a
[ 33%] Built target xmr-stak-nvidiaCrypto
[ 38%] Building NVCC (Device) object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/xmr-stak-nvidiaCuda_generated_cuda_extra.cu.o
[ 42%] Building NVCC (Device) object CMakeFiles/xmr-stak-nvidiaCuda.dir/nvcc_code/xmr-stak-nvidiaCuda_generated_cuda_core.cu.o
Scanning dependencies of target xmr-stak-nvidiaCuda
[ 47%] Linking CXX static library libxmr-stak-nvidiaCuda.a
[ 47%] Built target xmr-stak-nvidiaCuda
Scanning dependencies of target xmr-stak-nvidia
[ 52%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/cli-miner.cpp.o
In file included from /home/aensley/xmr-stak-nvidia/cli-miner.cpp:24:0:
/home/aensley/xmr-stak-nvidia/autoAdjust.hpp: In constructor ‘autoAdjust::autoAdjust()’:
/home/aensley/xmr-stak-nvidia/autoAdjust.hpp:22:13: error: ‘exit’ is not a member of ‘std’
             std::exit(0);
             ^
/home/aensley/xmr-stak-nvidia/autoAdjust.hpp:22:13: note: suggested alternative:
In file included from /home/aensley/xmr-stak-nvidia/jconf.h:2:0,
                 from /home/aensley/xmr-stak-nvidia/autoAdjust.hpp:7,
                 from /home/aensley/xmr-stak-nvidia/cli-miner.cpp:24:
/usr/include/stdlib.h:499:13: note:   ‘exit’
 extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
             ^
In file included from /home/aensley/xmr-stak-nvidia/cli-miner.cpp:24:0:
/home/aensley/xmr-stak-nvidia/autoAdjust.hpp: In member function ‘void autoAdjust::printConfig()’:
/home/aensley/xmr-stak-nvidia/autoAdjust.hpp:68:17: error: ‘exit’ is not a member of ‘std’
                 std::exit(0);
                 ^
/home/aensley/xmr-stak-nvidia/autoAdjust.hpp:68:17: note: suggested alternative:
In file included from /home/aensley/xmr-stak-nvidia/jconf.h:2:0,
                 from /home/aensley/xmr-stak-nvidia/autoAdjust.hpp:7,
                 from /home/aensley/xmr-stak-nvidia/cli-miner.cpp:24:
/usr/include/stdlib.h:499:13: note:   ‘exit’
 extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
             ^
CMakeFiles/xmr-stak-nvidia.dir/build.make:62: recipe for target 'CMakeFiles/xmr-stak-nvidia.dir/cli-miner.cpp.o' failed
make[2]: *** [CMakeFiles/xmr-stak-nvidia.dir/cli-miner.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/xmr-stak-nvidia.dir/all' failed
make[1]: *** [CMakeFiles/xmr-stak-nvidia.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
chrisbrickhouse commented 7 years ago

I encountered the same issue on the same operating system, Ubuntu 17.10 and was able to fix the issue by editing ./autoAdjust.hpp by adding the following line: #include <cstdlib> which allowed the make process to proceed.

However now it throws new errors:

/usr/bin/cmake -H/home/cj/Desktop/xmr-stak-nvidia -B/home/cj/Desktop/xmr-stak-nvidia --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/cj/Desktop/xmr-stak-nvidia/CMakeFiles /home/cj/Desktop/xmr-stak-nvidia/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidiaCrypto.dir/build.make CMakeFiles/xmr-stak-nvidiaCrypto.dir/depend
make[2]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
cd /home/cj/Desktop/xmr-stak-nvidia && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia/CMakeFiles/xmr-stak-nvidiaCrypto.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidiaCrypto.dir/build.make CMakeFiles/xmr-stak-nvidiaCrypto.dir/build
make[2]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
make[2]: Nothing to be done for 'CMakeFiles/xmr-stak-nvidiaCrypto.dir/build'.
make[2]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
[ 33%] Built target xmr-stak-nvidiaCrypto
make -f CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make CMakeFiles/xmr-stak-nvidiaCuda.dir/depend
make[2]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
cd /home/cj/Desktop/xmr-stak-nvidia && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia/CMakeFiles/xmr-stak-nvidiaCuda.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidiaCuda.dir/build.make CMakeFiles/xmr-stak-nvidiaCuda.dir/build
make[2]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
make[2]: Nothing to be done for 'CMakeFiles/xmr-stak-nvidiaCuda.dir/build'.
make[2]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
[ 47%] Built target xmr-stak-nvidiaCuda
make -f CMakeFiles/xmr-stak-nvidia.dir/build.make CMakeFiles/xmr-stak-nvidia.dir/depend
make[2]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
cd /home/cj/Desktop/xmr-stak-nvidia && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia /home/cj/Desktop/xmr-stak-nvidia/CMakeFiles/xmr-stak-nvidia.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
make -f CMakeFiles/xmr-stak-nvidia.dir/build.make CMakeFiles/xmr-stak-nvidia.dir/build
make[2]: Entering directory '/home/cj/Desktop/xmr-stak-nvidia'
[ 52%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o
/usr/bin/g++-5  -DXMR_STAK_LARGEGRID=ON -I/home/cj/Desktop/xmr-stak-nvidia/.  -msse2 -maes -O3 -DNDEBUG   -std=c++11 -o CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o -c /home/cj/Desktop/xmr-stak-nvidia/executor.cpp
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::ex_main()’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:459:9: error: ‘__builtin_isnormal’ is not a member of ‘std’
      if(std::isnormal(fTelem))
         ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:459:9: note: suggested alternative:
<built-in>: note:   ‘__builtin_isnormal’
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In function ‘const char* hps_format(double, char*, size_t)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:502:5: error: ‘__builtin_isnormal’ is not a member of ‘std’
  if(std::isnormal(h) || h == 0.0)
     ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:502:5: note: suggested alternative:
<built-in>: note:   ‘__builtin_isnormal’
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:504:32: error: ‘snprintf’ was not declared in this scope
   snprintf(buf, l, " %03.1f", h);
                                ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::hashrate_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:536:56: error: ‘snprintf’ was not declared in this scope
   snprintf(num, sizeof(num), "| %2u |", (unsigned int)i);
                                                        ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::result_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:614:73: error: ‘snprintf’ was not declared in this scope
  snprintf(num, sizeof(num), " (%.1f %%)\n", 100.0 * iGoodRes / iTotalRes);
                                                                         ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:616:43: error: ‘to_string’ is not a member of ‘std’
  out.append("Difficulty       : ").append(std::to_string(iPoolDiff)).append(1, 
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:617:43: error: ‘to_string’ is not a member of ‘std’
  out.append("Good results     : ").append(std::to_string(iGoodRes)).append(" / 
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:618:10: error: ‘to_string’ is not a member of ‘std’
   append(std::to_string(iTotalRes)).append(num);
          ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:626:43: error: ‘to_string’ is not a member of ‘std’
  out.append("Pool-side hashes : ").append(std::to_string(iPoolHashes)).append(2
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::connection_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:672:43: error: ‘to_string’ is not a member of ‘std’
   out.append("Pool ping time  : ").append(std::to_string(iPoolCallTimes[n_calls
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:685:83: error: ‘snprintf’ was not declared in this scope
 ime_format(date, sizeof(date), vSocketLog[i].time), vSocketLog[i].msg.c_str());
                                                                              ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::http_hashrate_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:725:90: error: ‘snprintf’ was not declared in this scope
 ffer, sizeof(buffer), sHtmlCommonHeader, "Hashrate Report", "Hashrate Report");
                                                                              ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::http_result_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:770:86: error: ‘snprintf’ was not declared in this scope
 f(buffer, sizeof(buffer), sHtmlCommonHeader, "Result Report", "Result Report");
                                                                              ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::http_connection_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:816:94: error: ‘snprintf’ was not declared in this scope
 , sizeof(buffer), sHtmlCommonHeader, "Connection Report", "Connection Report");
                                                                              ^
CMakeFiles/xmr-stak-nvidia.dir/build.make:110: recipe for target 'CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o' failed
make[2]: *** [CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o] Error 1
make[2]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/xmr-stak-nvidia.dir/all' failed
make[1]: *** [CMakeFiles/xmr-stak-nvidia.dir/all] Error 2
make[1]: Leaving directory '/home/cj/Desktop/xmr-stak-nvidia'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
chrisbrickhouse commented 7 years ago

The first two errors, error: ‘__builtin_isnormal’ is not a member of ‘std’ are resolved by editing ./executor.cpp to remove std:: from the line.

The next three errors, error: ‘snprintf’ was not declared in this scope, are because <cstdio> was not included in ./executor.cpp and is resolved by adding #include <cstdio> in the beginning of the file.

These resolve all errors except the error of error: ‘to_string’ is not a member of ‘std’. This may be a bug in g++ according to this StackOverflow question. The following is the output of make install:

[ 33%] Built target xmr-stak-nvidiaCrypto
[ 47%] Built target xmr-stak-nvidiaCuda
[ 52%] Building CXX object CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::result_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:616:43: error: ‘to_string’ is not a member of ‘std’
  out.append("Difficulty       : ").append(std::to_string(iPoolDiff)).append(1, 
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:617:43: error: ‘to_string’ is not a member of ‘std’
  out.append("Good results     : ").append(std::to_string(iGoodRes)).append(" / 
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:618:10: error: ‘to_string’ is not a member of ‘std’
   append(std::to_string(iTotalRes)).append(num);
          ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:626:43: error: ‘to_string’ is not a member of ‘std’
  out.append("Pool-side hashes : ").append(std::to_string(iPoolHashes)).append(2
                                           ^
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp: In member function ‘void executor::connection_report(std::__cxx11::string&)’:
/home/cj/Desktop/xmr-stak-nvidia/executor.cpp:672:43: error: ‘to_string’ is not a member of ‘std’
   out.append("Pool ping time  : ").append(std::to_string(iPoolCallTimes[n_calls
                                           ^
CMakeFiles/xmr-stak-nvidia.dir/build.make:110: recipe for target 'CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o' failed
make[2]: *** [CMakeFiles/xmr-stak-nvidia.dir/executor.cpp.o] Error 1
CMakeFiles/Makefile2:142: recipe for target 'CMakeFiles/xmr-stak-nvidia.dir/all' failed
make[1]: *** [CMakeFiles/xmr-stak-nvidia.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
aensley commented 7 years ago

Replying to https://github.com/fireice-uk/xmr-stak-nvidia/issues/180#issuecomment-344792521 by @chrisbrickhouse:

You're on to something. xmrig-nvidia is having similar problems on Ubuntu 17.10: xmrig/xmrig-nvidia#36

Looks like something changed with the std class. Maybe a GCC version incompatibility?

psychocrypt commented 6 years ago

Sry for the late response we was busy with the new release https://github.com/fireice-uk/xmr-stak Please check if the issue still exists with the new version. If the problem is not fixed so far please open a new issue in the issue section of the new reposetory

aensley commented 6 years ago

Replying to https://github.com/fireice-uk/xmr-stak-nvidia/issues/180#issuecomment-345547731 by @psychocrypt:

Thanks for the update. I'll try out fireice-uk/xmr-stak and open a new issue there if I still have problems. :+1: