Hi,
I'm trying to compile on Ubuntu 17.04 - and it doesn't work. Here is what I'm doing:
Since you are on ubuntu, why don't you simply use gcc?
because with the gcc version that comes with ubuntu 17.04, nvcc doesn't work:
$make
...
nvcc -gencode=arch=compute_61,code=\"sm_61,compute_61\" -I/usr/local/cuda/include -I. -I./compat/jansson --ptxas-options="-v" --maxrregcount=128 -o heavy/heavy.o -c heavy/heavy.cu
ERROR: No supported gcc/g++ host compiler found, but clang-3.8 is available.
Use 'nvcc -ccbin clang-3.8' to use that instead.
Makefile:2489: recipe for target 'heavy/heavy.o' failed
gcc is:
$ 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.
the above error with -fPIC comes if I use gcc to compile the C code while I use clang with nvcc. if I try to harmonize and use clang for both C code and nvcc, compilation fails with the following:
clang++-3.8 -DHAVE_CONFIG_H -I. -pthread -fno-strict-aliasing -I./compat/jansson -I/usr/local/cuda/include -g -O2 -MT ccminer-scrypt.o -MD -MP -MF .deps/ccminer-scrypt.Tpo -c -o ccminer-scrypt.o `test -f 'scrypt.cpp' || echo './'`scrypt.cpp
scrypt.cpp:34:10: fatal error: 'omp.h' file not found
#include
^
1 error generated.
Makefile:1995: recipe for target 'ccminer-scrypt.o' failed
interestingly, configure says that OpenMP is not supported when using clang:
$ CC=clang-3.8
$ CXX=clang++-3.8
$ ./autogen.sh
$ ./configure CFLAGS="-Wall -O3 -march=native"
...
checking for clang-3.8 option to support OpenMP... unsupported
this it seems that it doesn't compile with gcc because nvcc doesn't like the gcc version, and it doesn't compile with clang because it doesn't support OpenMP.
what other options would be to compile?
did anyone manage to compile under ubuntu 17.04?