fkanehiro / openhrp3

Open Architecture Human-centered Robotics Platform
http://www.openrtp.jp/openhrp3
Other
26 stars 34 forks source link

Could not find a package configuration file provided by "boost_signals" #145

Open Saeed-Mansouri opened 4 years ago

Saeed-Mansouri commented 4 years ago

When I try to run cmake I get this error :

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
CMake Error at /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package):
  Could not find a package configuration file provided by "boost_signals"
  (requested version 1.71.0) with any of the following names:

    boost_signalsConfig.cmake
    boost_signals-config.cmake

  Add the installation prefix of "boost_signals" to CMAKE_PREFIX_PATH or set
  "boost_signals_DIR" to a directory containing one of the above files.  If
  "boost_signals" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
  /usr/local/share/cmake-3.16/Modules/FindBoost.cmake:443 (find_package)
  CMakeLists.txt:122 (find_package)

CMake Warning (dev) in /usr/local/share/cmake-3.16/Modules/FindBoost.cmake:
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
  and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  The included script

    /usr/local/share/cmake-3.16/Modules/FindBoost.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
  compatibility, so the effects are applied to the including context.
Call Stack (most recent call first):
  CMakeLists.txt:122 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

any thoughts ?

fkanehiro commented 4 years ago

Which OS are you using? The compilation of OpenHRP3 is tested only with ubuntu 16.04 and 18.04.

Saeed-Mansouri commented 4 years ago

I'm using Ubuntu 16.04

fkanehiro commented 4 years ago

You seem to have cmake and boost which are newer than packages provided by ubuntu. They might be causing the error.

1ADZX commented 4 years ago

我正在使用Ubuntu 16.04

I have also encountered this problem. May I ask you how to solve it?

fkanehiro commented 4 years ago

It's hard to answer as I don't know your environment.

1ADZX commented 4 years ago

It's hard to answer as I don't know your environment.

I also use Ubuntu 16.04. When I used ROS, I installed boost 1.58, and then I installed boost 1.70 myself

fkanehiro commented 4 years ago

If using boost 1.58 is ok for you, you can configure cmake so that it doesn't search .cmake files under /usr/local/lib/cmake.

storypku commented 4 years ago

Boost 1.69.0 Changelog announces the signal library removal. Use boost-signals2 instead. Refer to https://stackoverflow.com/questions/27252213/cmake-can-not-find-boostsignals2 to switch to signals2 in CMakeLists.txt.

LimingGao commented 3 years ago

I have the same issue when using the Ubuntu 20.04

fkanehiro commented 3 years ago

I tried to reproduce this issue with Ubuntu20.04 but I couldn't.

wenhao12111 commented 2 years ago

I got an answer here: https://github.com/ros/geometry2/pull/354#issue-400320296 To sum up: I use ubuntu18.04 (boost 1.76.0), and the same error occurs when using catkin_make. The solution is to figure out which file [in the error info: Call Stack (most recent call first)] requires signals, then rm the "signals" in find_packages().

guiskibh commented 2 years ago

same here with ubuntu 20.04, boost 1.71.0, ros noetic. How did you solve it?

wenhao12111 commented 2 years ago

Hello, I can see your error. The following printing info may mean that the boost signal is required in navigation_ros/fake_localization.

-- ==> add_subdirectory(navigation_ros/fake_localization) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package): Could not find a package configuration file provided by "boost_signals" (requested version 1.71.0) with any of the following names:

boost_signalsConfig.cmake boost_signals-config.cmake

Thus, you can have a try by removing the "signals" in find_packages() of the navigation_ros/fake_localization related CmakeLists.txt.

guiskibh commented 2 years ago

Thanks Wenhao12111, commenting

find_package(Boost REQUIRED COMPONENTS signals)

in navigation_ros/fake_navigation/CMakeLists.txt solved the issue!

wenhao12111 commented 2 years ago

Glad that helps you.