ethereum-mining / ethminer

Ethereum miner with OpenCL, CUDA and stratum support
GNU General Public License v3.0
5.97k stars 2.28k forks source link

ethminer link error on Ubuntu 18.04 #2157

Open mzakharo opened 3 years ago

mzakharo commented 3 years ago

Describe the bug Ethminer link error due to missing Boost:filesystem.

To Reproduce

  1. Fresh Ubuntu 18.04 install + CUDA 10.2 from CUDA toolkit archive
  2. cmake --build

Additional context Adding 'Boost:filesystem to ethminer/CMakeLists.txt does not help:

-target_link_libraries(ethminer PRIVATE ethcore poolprotocols devcore ethminer-buildinfo CLI11::CLI11 Boost::system Boost::thread)
+target_link_libraries(ethminer PRIVATE ethcore poolprotocols devcore ethminer-buildinfo CLI11::CLI11 Boost::system Boost::thread Boost:filesystem)

I was able to manually install system sudo apt install libboost-filesystem-dev and link ethminer successfully by tweaking the link command and running it on the console, however, this solution seems rather hackish.

vahriin commented 3 years ago

Have same error

Describe the bug Ethminer link error due to missing Boost::filesystem.

To Reproduce

  1. Build in container (I will attach the Dockerfile later)
  2. mkdir -p ./bin && cmake -DHUNTER_JOBS_NUMBER=4 -DETHASHCL=OFF -DAPICORE=OFF -DBINKERN=OFF -H. -Bbin && cmake --build bin -- -j8

Environment

Operating System: nvcr.io/nvidia/cuda:11.2.1-devel-ubuntu20.04 Hardware: GTX 1080 Ethminer Version: git cuda11 Ethminer options used - N/A

I'm looking for solution, will update later.

vahriin commented 3 years ago

Found a solution. Need to add Boost::filesystem to target_link_libraries() to line 15 of ethminer/libhwmon/CMakeLists.txt. Looks like this for me:

target_link_libraries(hwmon ${HWMON_LINK_LIBRARIES} Boost::filesystem)

Should i make a PR if i don't understand how it works? :smile:

MinzhiYoyo commented 2 years ago

add Boost::filesystem to target_link_libraries(), target_link_libraries(hwmon ${HWMON_LINK_LIBRARIES} Boost::filesystem) thank vahriin

Yes, it works for me. And I need remove all build files, then cmake again