nicehash / nheqminer

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

undefined reference to `cuda_djezo::getinfo(int, int, std::string&, int&, std::string&)' error #361

Open apzentral opened 6 years ago

apzentral commented 6 years ago

I couldn't compile the nheqminer with Ubuntu 16 and CUDA 9. Does anyone run into the same issue?

I follow the instruction below,

cd ~/nheqminer/cpu_xenoncat/asm_linux/ sh ./assemble.sh cd ~/build cmake ../nheqminer make -j $(nproc)

Output from each command below

cmake ../nheqminer

-- USE_CPU_XENONCAT DEFINED -- USE_CUDA_DJEZO DEFINED -- Boost version: 1.58.0 -- Found the following Boost libraries: -- system -- log_setup -- log -- date_time -- filesystem -- thread -- regex -- chrono -- atomic -- CXXFLAGS: -std=c++11 -m64 -msse2 -- LIBS: /usr/lib/x86_64-linux-gnu/libboost_system.a;/usr/lib/x86_64-linux-gnu/libboost_log_setup.a;/usr/lib/x86_64-linux-gnu/libboost_log.a;/usr/lib/x86_64-linux-gnu/libboost_date_time.a;/usr/lib/x86_64-linux-gnu/libboost_filesystem.a;/usr/lib/x86_64-linux-gnu/libboost_thread.a;/usr/lib/x86_64-linux-gnu/libboost_regex.a;/usr/lib/x86_64-linux-gnu/libboost_chrono.a;/usr/lib/x86_64-linux-gnu/libboost_atomic.a;/usr/lib/x86_64-linux-gnu/libpthread.a CUDA FOUND -- CUDA_NVCC_FLAGS: -D_FORCE_INLINES;--disable-warnings;--ptxas-options=-v;-Xptxas=-dlcm=ca;-Xptxas=-dscm=cs;-O3;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60 -- Configuring done -- Generating done -- Build files have been written to: /root/build


make -j $(nproc)

[ 9%] Built target cpu_xenoncat [ 22%] Built target cuda_djezo [ 27%] Linking CXX executable nheqminer CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function print_cuda_info()': main.cpp:(.text+0x406): undefined reference tocuda_djezo::getinfo(int, int, std::string&, int&, std::string&)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_short_year(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE17format_short_yearERNS8_7contextE[_ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE17format_short_yearERNS8_7contextE]+0x2b): undefined reference tovoid boost::log::v2s_mt_posix::aux::put_integer(std::basic_string<char, std::char_traits, std::allocator >&, unsigned int, unsigned int, char)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_full_year(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE16format_full_yearERNS8_7contextE[_ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE16format_full_yearERNS8_7contextE]+0x15): undefined reference tovoid boost::log::v2s_mt_posix::aux::put_integer(std::basic_string<char, std::char_traits, std::allocator >&, unsigned int, unsigned int, char)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_numeric_month(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE20format_numeric_monthERNS8_7contextE[_ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE20format_numeric_monthERNS8_7contextE]+0x16): undefined reference tovoid boost::log::v2s_mt_posix::aux::put_integer(std::basic_string<char, std::char_traits, std::allocator >&, unsigned int, unsigned int, char)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function void boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_month_day<(char)32>(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE16format_month_dayILc32EEEvRNS8_7contextE[_ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE16format_month_dayILc32EEEvRNS8_7contextE]+0x16): undefined reference tovoid boost::log::v2s_mt_posix::aux::put_integer(std::basic_string<char, std::char_traits, std::allocator >&, unsigned int, unsigned int, char)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function void boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::format_month_day<(char)48>(boost::log::v2s_mt_posix::aux::date_time_formatter<boost::log::v2s_mt_posix::aux::decomposed_time_wrapper<boost::posix_time::ptime>, char>::context&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE16format_month_dayILc48EEEvRNS8_7contextE[_ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE16format_month_dayILc48EEEvRNS8_7contextE]+0x16): undefined reference tovoid boost::log::v2s_mt_posix::aux::put_integer(std::basic_string<char, std::char_traits, std::allocator >&, unsigned int, unsigned int, char)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o:main.cpp:(.text._ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE12format_hoursILc32EEEvRNS8_7contextE[_ZN5boost3log12v2s_mt_posix3aux19date_time_formatterINS2_23decomposed_time_wrapperINS_10posix_time5ptimeEEEcE12format_hoursILc32EEEvRNS8_7contextE]+0x16): more undefined references to void boost::log::v2s_mt_posix::aux::put_integer<char>(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)' follow CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In functionvoid boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits, std::allocator >::aligned_write(wchar_t const, long)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix24basic_formatting_ostreamIcSt11char_traitsIcESaIcEE13aligned_writeIwEEvPKT_l[_ZN5boost3log12v2s_mt_posix24basic_formatting_ostreamIcSt11char_traitsIcESaIcEE13aligned_writeIwEEvPKT_l]+0x94): undefined reference to `boost::log::v2s_mt_posix::aux::code_convert(wchar_t const, unsigned long, std::string&, std::locale const&)' main.cpp:(.text._ZN5boost3log12v2s_mt_posix24basic_formatting_ostreamIcSt11char_traitsIcESaIcEE13aligned_writeIwEEvPKT_l[_ZN5boost3log12v2s_mt_posix24basic_formatting_ostreamIcSt11char_traitsIcESaIcEE13aligned_writeIwEEvPKT_l]+0xdf): undefined reference to boost::log::v2s_mt_posix::aux::code_convert(wchar_t const*, unsigned long, std::string&, std::locale const&)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In functionvoid boost::log::v2s_mt_posix::type_dispatcher::callback_base::trampoline<boost::log::v2s_mt_posix::binder1st<boost::log::v2s_mt_posix::output_fun, boost::log::v2s_mt_posix::expressions::aux::stream_ref<boost::log::v2s_mt_posix::basic_formatting_ostream<char, std::char_traits, std::allocator > >&>, std::basic_string<wchar_t, std::char_traits, std::allocator > >(void, std::basic_string<wchar_t, std::char_traits, std::allocator > const&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix15type_dispatcher13callback_base10trampolineINS1_9binder1stINS1_10output_funERNS1_11expressions3aux10stream_refINS1_24basic_formatting_ostreamIcSt11char_traitsIcESaIcEEEEEEESbIwSBIwESaIwEEEEvPvRKT0[_ZN5boost3log12v2s_mt_posix15type_dispatcher13callback_base10trampolineINS1_9binder1stINS1_10output_funERNS1_11expressions3aux10stream_refINS1_24basic_formatting_ostreamIcSt11char_traitsIcESaIcEEEEEEESbIwSBIwESaIwEEEEvPvRKT0]+0x5a): undefined reference to `boost::log::v2s_mt_posix::aux::code_convert(wchar_t const, unsigned long, std::string&, std::locale const&)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::recursive_mutex, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >(boost::log::v2s_mt_posix::record_view const&, boost::recursive_mutex&, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS_15recursive_mutexENS2_26basic_text_ostream_backendIcEEEEvRKNS1_11record_viewERT_RT0_[_ZN5boost3log12v2s_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS_15recursive_mutexENS2_26basic_text_ostream_backendIcEEEEvRKNS1_11record_viewERT_RT0_]+0x103): undefined reference toboost::log::v2s_mt_posix::sinks::basic_text_ostream_backend::consume(boost::log::v2s_mt_posix::record_view const&, std::string const&)' CMakeFiles/nheqminer.dir/nheqminer/main.cpp.o: In function void boost::log::v2s_mt_posix::sinks::basic_formatting_sink_frontend<char>::feed_record<boost::log::v2s_mt_posix::aux::fake_mutex, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char> >(boost::log::v2s_mt_posix::record_view const&, boost::log::v2s_mt_posix::aux::fake_mutex&, boost::log::v2s_mt_posix::sinks::basic_text_ostream_backend<char>&)': main.cpp:(.text._ZN5boost3log12v2s_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexENS2_26basic_text_ostream_backendIcEEEEvRKNS1_11record_viewERT_RT0_[_ZN5boost3log12v2s_mt_posix5sinks30basic_formatting_sink_frontendIcE11feed_recordINS1_3aux10fake_mutexENS2_26basic_text_ostream_backendIcEEEEvRKNS1_11record_viewERT_RT0_]+0xed): undefined reference toboost::log::v2s_mt_posix::sinks::basic_text_ostream_backend::consume(boost::log::v2s_mt_posix::record_view const&, std::string const&)' CMakeFiles/nheqminer.dir/nheqminer/MinerFactory.cpp.o: In function Solver<cuda_djezo>::getdevinfo()': MinerFactory.cpp:(.text._ZN6SolverI10cuda_djezoE10getdevinfoEv[_ZN6SolverI10cuda_djezoE10getdevinfoEv]+0x9): undefined reference tocuda_djezo::getdevinfo()' collect2: error: ld returned 1 exit status CMakeFiles/nheqminer.dir/build.make:502: recipe for target 'nheqminer' failed make[2]: [nheqminer] Error 1 CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/nheqminer.dir/all' failed make[1]: [CMakeFiles/nheqminer.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

TheMeasles commented 6 years ago

Yup, everyone trying to compile with CUDA 9 will have this issue.

This is written for CUDA 8

You need to uninstall CUDA 9 and install CUDA 8 then start again

(CUDA 8 is still available from NVIDIA in the 'legacy' bit)