Skip to content

Instantly share code, notes, and snippets.

@bsodmike
Last active June 25, 2017 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsodmike/00ad26930eaee1444e93c0852986ff6b to your computer and use it in GitHub Desktop.
Save bsodmike/00ad26930eaee1444e93c0852986ff6b to your computer and use it in GitHub Desktop.
Error Compiling Ethermine on Ubuntu 16.04 LTS with CUDA 8

https://github.com/ethereum-mining/ethminer

Attempt to compile the above from source. 375.66 NVIDIA driver installed.
CUDA 8 has been installed properly as per the instructions on the NVIDIA site

Experienced exact same error when attemping to compile Genoil's version as well.

skylake:~# 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

skylake:~# lspci | grep NV
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1b81 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10f0 (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation Device 1b81 (rev a1)
02:00.1 Audio device: NVIDIA Corporation Device 10f0 (rev a1)

skylake:~# nvidia-settings -c :0 -q gpus

2 GPUs on skylake:0

    [0] skylake:0[gpu:0] (GeForce GTX 1070)

      Has the following names:
        GPU-0
        GPU-08ba492c-xxxx

    [1] skylake:0[gpu:1] (GeForce GTX 1070)

      Has the following names:
        GPU-1
        GPU-16e218e7-xxxx

I've tried updating libethash-cuda/CMakeLists.txt to change set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--std=c++11;--disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo) by adding --std=c++11. No luck

# make clean && cmake -DETHASHCUDA=ON -DETHSTRATUM=ON -DCOMPUTE=61 ..

-- [hunter] Calculating Config-SHA1
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] HUNTER_ROOT: /home/mdesilva/.hunter
-- [hunter] [ Hunter-ID: 435b09a | Config-ID: cd01ff3 | Toolchain-ID: 0452b62 ]
-- [hunter] BOOST_ROOT: /home/mdesilva/.hunter/_Base/435b09a/cd01ff3/0452b62/Install (ver.: 1.64.0)
-- [hunter] BOOST_ROOT: /home/mdesilva/.hunter/_Base/435b09a/cd01ff3/0452b62/Install (ver.: 1.64.0)
-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   system
-- [hunter] JSONCPP_ROOT: /home/mdesilva/.hunter/_Base/435b09a/cd01ff3/0452b62/Install (ver.: 1.8.0)
-- [hunter] LIBJSON-RPC-CPP_ROOT: /home/mdesilva/.hunter/_Base/435b09a/cd01ff3/0452b62/Install (ver.: 0.7.0-p0)
------------------------------------------------------------------------
-- CMake 3.5.1
-- Build Release / Linux
------------------------------------------------------------- components
-- ETHASHCL         Build OpenCL components                  OFF
-- ETHASHCUDA       Build CUDA components                    ON
-- ETHSTRATUM       Build Stratum components                 ON
------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: /opt/ethminer/ethminer/build

# cmake --build .
[  0%] Built target BuildInfo.h
[  4%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[  8%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 12%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 16%] Linking CXX static library libdevcore.a
[ 32%] Built target devcore
[ 36%] Building C object libethash/CMakeFiles/ethash.dir/internal.c.o
[ 40%] Building C object libethash/CMakeFiles/ethash.dir/sha3.c.o
[ 44%] Linking C static library libethash.a
[ 44%] Built target ethash
[ 48%] Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
CMake Error at ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o.cmake:207 (message):
  Error generating
  /opt/ethminer/ethminer/build/libethash-cuda/CMakeFiles/ethash-cuda.dir//./ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o


libethash-cuda/CMakeFiles/ethash-cuda.dir/build.make:63: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o' failed
make[2]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
CMakeFiles/Makefile2:232: recipe for target 'libethash-cuda/CMakeFiles/ethash-cuda.dir/all' failed
make[1]: *** [libethash-cuda/CMakeFiles/ethash-cuda.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
@bsodmike
Copy link
Author

Whilst attempting to just compile the failing dependency, this provided some detail as to the error.

skylake:/opt/ethminer/ethminer/libethash-cuda/build⟫ make clean
skylake:/opt/ethminer/ethminer/libethash-cuda/build⟫ cmake -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 ..
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/ethminer/ethminer/libethash-cuda/build
skylake:/opt/ethminer/ethminer/libethash-cuda/build⟫ make -j8
[ 33%] Building NVCC (Device) object CMakeFiles/ethash-cuda.dir/ethash-cuda_generated_ethash_cuda_miner_kernel.cu.o
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future r
elease (Use -Wno-deprecated-gpu-targets to suppress warning).

<truncated>

[ 66%] Building CXX object CMakeFiles/ethash-cuda.dir/ethash_cuda_miner.cpp.o
In file included from /usr/include/c++/5/random:35:0,
                 from /opt/ethminer/ethminer/libethash-cuda/ethash_cuda_miner.cpp:29:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the
ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
/opt/ethminer/ethminer/libethash-cuda/ethash_cuda_miner.cpp: In static member function ‘static int ethash_cuda_miner
::getNumDevices()’:
/opt/ethminer/ethminer/libethash-cuda/ethash_cuda_miner.cpp:116:28: warning: extended initializer lists only availab
le with -std=c++11 or -std=gnu++11
    throw std::runtime_error{"No CUDA driver found"};
                            ^
/opt/ethminer/ethminer/libethash-cuda/ethash_cuda_miner.cpp:117:27: warning: extended initializer lists only availab
le with -std=c++11 or -std=gnu++11
   throw std::runtime_error{"Insufficient CUDA driver: " + std::to_string(driverVersion)};
                           ^
/opt/ethminer/ethminer/libethash-cuda/ethash_cuda_miner.cpp:117:59: error: ‘to_string’ is not a member of ‘std’
   throw std::runtime_error{"Insufficient CUDA driver: " + std::to_string(driverVersion)};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment