I having problem compiling on Ubuntu 20.04. I managed to work though a couple of issues
but never got it to compile.
First I have to clone the repo. The release source tarball doesn't have the git config files
so git submodule update fails.
The default in Ubuntu 20.04 is GCC-9. I needed to install GCC-8 and configure cmake to use it:
cmake .. -DCMAKE_C_COMPILER=gcc-8
Then this error during make:
[ 54%] Linking CXX static library libhwmon.a
[ 54%] Built target hwmon
[ 57%] Building NVCC (Device) object libcuda/CMakeFiles/cuda.dir/cuda_generated_ethash_cuda_miner_kernel.cu.o
nvcc fatal : Value 'c++17' is not defined for option 'std'
CMake Error at cuda_generated_ethash_cuda_miner_kernel.cu.o.Release.cmake:220 (message):
Error generating
/home/bob/miners/nsf/nsfminer/build/libcuda/CMakeFiles/cuda.dir//./cuda_generated_ethash_cuda_miner_kernel.cu.o
make[2]: *** [libcuda/CMakeFiles/cuda.dir/build.make:65: libcuda/CMakeFiles/cuda.dir/cuda_generated_ethash_cuda_miner_kernel.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:462: libcuda/CMakeFiles/cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 60%] Linking CXX static library libpool.a
[ 60%] Built target pool
make: *** [Makefile:152: all] Error 2
I then editted 2 config files to change all references of c++17 to c++14. It got further but still failed with many undefined references:
[100%] Linking CXX executable nsfminer
/usr/bin/ld: CMakeFiles/nsfminer.dir/main.cpp.o: in function `dev::eth::TelemetryType::strvec(std::__cxx11::list, std::allocator >, std::allocator, std::allocator > > >&)':
main.cpp:(.text._ZN3dev3eth13TelemetryType6strvecERNSt7__cxx114listINS2_12basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEE[_ZN3dev3eth13TelemetryType6strvecERNSt7__cxx114listINS2_12basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEE]+0x47): undefined reference to `std::__cxx11::basic_stringstream, std::allocator >::basic_stringstream()'
/usr/bin/ld: CMakeFiles/nsfminer.dir/main.cpp.o: in function `headers(std::vector, std::allocator >, std::allocator, std::allocator > > >&, bool) [clone .constprop.0]':
main.cpp:(.text._ZL7headersRSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEb.constprop.0+0x94): undefined reference to `std::__cxx11::basic_stringstream, std::allocator >::basic_stringstream()'
/usr/bin/ld: ../libeth/libeth.a(Farm.cpp.o): in function `dev::eth::Farm::Farm(std::map, std::allocator >, dev::eth::DeviceDescriptor, std::less, std::allocator > >, std::allocator, std::allocator > const, dev::eth::DeviceDescriptor> > >&, dev::eth::FarmSettings)':
Farm.cpp:(.text._ZN3dev3eth4FarmC2ERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_16DeviceDescriptorESt4lessIS8_ESaISt4pairIKS8_S9_EEENS0_12FarmSettingsE+0x7c6): undefined reference to `std::__cxx11::basic_ostringstream, std::allocator >::basic_ostringstream()'
/usr/bin/ld: Farm.cpp:(.text._ZN3dev3eth4FarmC2ERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_16DeviceDescriptorESt4lessIS8_ESaISt4pairIKS8_S9_EEENS0_12FarmSettingsE+0xb64): undefined reference to `std::__cxx11::basic_ostringstream, std::allocator >::basic_ostringstream()'
/usr/bin/ld: ../libpool/libpool.a(PoolManager.cpp.o): in function `dev::eth::PoolManager::setClientHandlers()::{lambda(std::chrono::duration > const&, unsigned int const&)#5}::operator()(std::chrono::duration > const&, unsigned int const&) const [clone .isra.0]':
PoolManager.cpp:(.text._ZZN3dev3eth11PoolManager17setClientHandlersEvENKUlRKNSt6chrono8durationIlSt5ratioILl1ELl1000EEEERKjE3_clES8_SA_.isra.0+0x3b): undefined reference to `std::__cxx11::basic_stringstream, std::allocator >::basic_stringstream()'