rsocket / rsocket-cpp

C++ implementation of RSocket
http://rsocket.io
Apache License 2.0
253 stars 99 forks source link

Errow when "cmake -DCMAKE_BUILD_TYPE=DEBUG ../" (install on macOS) #896

Closed qingquansong closed 5 years ago

qingquansong commented 5 years ago

Partial error messages:

"CMake Error at CMakeLists.txt:215 (add_library): Target "ReactiveSocket" links to target "Boost::thread" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at yarpl/CMakeLists.txt:76 (add_library): Target "yarpl" links to target "Boost::thread" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at rsocket/benchmarks/CMakeLists.txt:5 (add_executable): Target "baselines_tcp" links to target "Boost::system" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): rsocket/benchmarks/CMakeLists.txt:15 (benchmark)"

timotheecour commented 4 years ago

@song3134 I'm getting the same / similar error on OSX; how did you resolve this? Thanks!

Compiler has atomic std::shared_ptr support
== macOS detected, disabling ASAN for yarpl
-- Found folly: /Users/timothee/homebrew
yarpl source dir: /Users/timothee/git_clone/temp/rsocket-cpp/yarpl
-- Configuring done
CMake Error at CMakeLists.txt:715 (add_executable):
  Target "example_cold-resumption-client" links to target "Boost::date_time"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?
qingquansong commented 4 years ago

@song3134 I'm getting the same error; how did you resolve this? Thanks!

For me it is caused by having two Boost package on my server system. One is on local user, another is global version. I just change the local one to global one and then it works. Hope it can help.

timotheecour commented 4 years ago

hah just found at same time after reading https://stackoverflow.com/questions/58081084/target-boostlibrary-already-has-an-imported-location-link-errors

cmake -DBoost_NO_BOOST_CMAKE=ON -DCMAKE_BUILD_TYPE=DEBUG ../

seems to work at least for that command thanks!

timotheecour commented 4 years ago

@song3134 sorry to bug you again, but curious whether you were successful with the next command, make -j ? I'm hitting https://github.com/rsocket/rsocket-cpp/issues/894: Undefined symbols folly::f14::detail::F14LinkCheck

I also tried upgrading from folly HEAD-3a5914c to folly current HEAD (currently at HEAD-91b375d) via brew unlink folly && brew install --HEAD folly but still same error