nicehash / nheqminer

Equihash miner for NiceHash
https://www.nicehash.com
MIT License
768 stars 583 forks source link

does not compile on ubuntu 17.04 #296

Open akosmaroy opened 7 years ago

akosmaroy commented 7 years ago

Hi,

I'm trying to compile you project on ubuntu 17.04, but it says:

$ make
[  4%] Building NVCC (Device) object cuda_djezo/CMakeFiles/cuda_djezo.dir/cuda_djezo_generated_equi_miner.cu.o
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 cuda_djezo_generated_equi_miner.cu.o.cmake:222 (message):
  Error generating
  /home/miner/src/nheqminer/build/cuda_djezo/CMakeFiles/cuda_djezo.dir//./cuda_djezo_generated_equi_miner.cu.o

cuda_djezo/CMakeFiles/cuda_djezo.dir/build.make:63: recipe for target 'cuda_djezo/CMakeFiles/cuda_djezo.dir/cuda_djezo_generated_equi_miner.cu.o' failed
make[2]: *** [cuda_djezo/CMakeFiles/cuda_djezo.dir/cuda_djezo_generated_equi_miner.cu.o] Error 1
CMakeFiles/Makefile2:178: recipe for target 'cuda_djezo/CMakeFiles/cuda_djezo.dir/all' failed
make[1]: *** [cuda_djezo/CMakeFiles/cuda_djezo.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

with gcc being:

$ gcc --version
gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
akosmaroy commented 7 years ago

so, I add "-ccbin clang-3.8" to CUDA_NVCC_FLAGS in cuda_djezo/CMakeLists.txt

then I get:

make
...
/usr/include/math_functions.h:8925:41: error: declaration conflicts with target of using declaration already in scope
__attribute((always_inline)) inline int signbit(float x);
                                        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/cmath:691:16: note: target of using declaration
constexpr bool signbit(float __x)
Seriyyy95 commented 7 years ago

Use gcc-5

JaquesBoum commented 7 years ago

Are you using Nvidia Cards?

If not, did you try removing the solvers as stated in the readme:

USE_CUDA_TROMP
USE_CUDA_DJEZO
If you don't wan't to build with all solvlers you can go to nheqminer Properties > C/C++ > Preprocessor > Preprocessor Definitions and remove the solver you don't need.

According to CUDA 8 documentation Ubuntu 17 is not supported, look here: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html