Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Saeed-Mansouri opened this issue Jan 18, 2020 · 15 comments

Comments

@Saeed-Mansouri
Copy link

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
Copy link
Owner

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

@Saeed-Mansouri
Copy link
Author

I'm using Ubuntu 16.04

@fkanehiro
Copy link
Owner

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

@1ADZX
Copy link

1ADZX commented Jun 1, 2020

我正在使用Ubuntu 16.04

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

@fkanehiro
Copy link
Owner

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

@1ADZX
Copy link

1ADZX commented Jun 1, 2020

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
Copy link
Owner

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
Copy link

storypku commented Jun 6, 2020

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
Copy link

I have the same issue when using the Ubuntu 20.04

@fkanehiro
Copy link
Owner

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

@wenhao12111
Copy link

I got an answer here: ros/geometry2#354 (comment)
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
Copy link

guiskibh commented Sep 7, 2022

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

  • Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: thread
    -- Installing devel-space wrapper /home/ros/catkin_ws/src/gazebo_ros_pkgs/gazebo_ros/scripts/spawn_model to /home/ros/catkin_ws/devel/lib/gazebo_ros
    -- +++ processing catkin package: 'amcl'
    -- ==> add_subdirectory(navigation_ros/amcl)
    -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
    -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
    -- +++ processing catkin package: '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

@wenhao12111
Copy link

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
Copy link

guiskibh commented Sep 7, 2022

Thanks Wenhao12111, commenting

find_package(Boost REQUIRED COMPONENTS signals)

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

@wenhao12111
Copy link

Glad that helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants