ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

cv_bridge: boost-python not found (Noetic, Fedora 32)

asked 2020-08-25 06:48:28 -0600

RobbieTheK gravatar image

updated 2020-08-25 11:06:12 -0600

gvdhoorn gravatar image

Any ideas why this fails and what the workaround is?

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Boost (missing: python) (found version "1.69.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindBoost.cmake:2166 (find_package_handle_standard_args)
  CMakeLists.txt:14 (find_package)

-- Configuring incomplete, errors occurred!
See also "/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeOutput.log".
See also "/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeError.log".
<== Failed to process package 'cv_bridge':
  Command '['/root/ros_catkin_ws/install_isolated/env.sh', 'cmake', '/root/ros_catkin_ws/src/vision_opencv/cv_bridge', '-DCATKIN_DEVEL_PREFIX=/root/ros_catkin_ws/devel_isolated/cv_bridge', '-DCMAKE_INSTALL_PREFIX=/root/ros_catkin_ws/install_isolated', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1.

Reproduce this error by running:
==> cd /root/ros_catkin_ws/build_isolated/cv_bridge && /root/ros_catkin_ws/install_isolated/env.sh cmake /root/ros_catkin_ws/src/vision_opencv/cv_bridge -DCATKIN_DEVEL_PREFIX=/root/ros_catkin_ws/devel_isolated/cv_bridge -DCMAKE_INSTALL_PREFIX=/root/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'

Command failed, exiting.



CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Boost (missing: python) (found version "1.69.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindBoost.cmake:2166 (find_package_handle_standard_args)
  CMakeLists.txt:14 (find_package)

-- Configuring incomplete, errors occurred!
See also "/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeOutput.log".
See also "/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeError.log".
<== Failed to process package 'cv_bridge':
  Command '['/root/ros_catkin_ws/install_isolated/env.sh', 'cmake', '/root/ros_catkin_ws/src/vision_opencv/cv_bridge', '-DCATKIN_DEVEL_PREFIX=/root/ros_catkin_ws/devel_isolated/cv_bridge', '-DCMAKE_INSTALL_PREFIX=/root/ros_catkin_ws/install_isolated', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1.

Reproduce this error by running:
==> cd /root/ros_catkin_ws/build_isolated/cv_bridge && /root/ros_catkin_ws/install_isolated/env.sh cmake /root/ros_catkin_ws/src/vision_opencv/cv_bridge -DCATKIN_DEVEL_PREFIX=/root/ros_catkin_ws/devel_isolated/cv_bridge -DCMAKE_INSTALL_PREFIX=/root/ros_catkin_ws/install_isolated -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'

Command failed, exiting.


  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_84cd7/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_84cd7.dir/build.make CMakeFiles/cmTC_84cd7.dir/build
gmake[1]: Entering directory '/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_84cd7.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_84cd7.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_84cd7
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84cd7.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_84cd7.dir/CheckFunctionExists.c.o  -o cmTC_84cd7  -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_84cd7.dir/build.make:107: cmTC_84cd7] Error 1
gmake[1]: Leaving directory '/root/ros_catkin_ws/build_isolated/cv_bridge/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:141: cmTC_84cd7/fast] Error 2
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-08-25 09:57:48 -0600

gvdhoorn gravatar image

updated 2020-08-25 11:12:56 -0600

Any ideas why this fails and what the workaround is?

The error message seems rather clear:

Could NOT find Boost (missing: python) (found version "1.69.0")

according to CMake, your Boost installation does not have the python module.

So two options:

  1. if you're certain it should be present, try to find out why CMake doesn't find it
  2. if it's not present, make sure to install it

Looks like this documents a similar problem.


Edit: from trying this out in a Docker container (fedora:32), it would appear the version suffix for Boost Python 1.69 on Fedora 32 needs to be python3.8.

So it seems this would need to be changed in cv_bridge/CMakeLists.txt, specifically these lines.

edit flag offensive delete link more

Comments

it's there:

locate libboost_python
/usr/lib64/libboost_python38.a
/usr/lib64/libboost_python38.so
/usr/lib64/libboost_python38.so.1.69.0
Package boost-python3-1.69.0-18.fc32.x86_64 is already installed.

I found a suggestion to use elseif in the CMakeList.txt file, but I'm not sure how to do that and which file that is.

Or does this suggestion to use BOOST_AUTO_LINK_TAGGED or BOOST_AUTO_LINK_VERSIONED or BOOST_AUTO_LINK_SYSTEM apply? Not sure which to choose, unless that's only for Windows.

RobbieTheK gravatar image RobbieTheK  ( 2020-08-25 10:17:05 -0600 )edit

I have no idea right now.

Does a plain CMakeLists.txt with something like this also fail?

cmake_minimum_required(VERSION 3.5)
project(test CXX)
find_package(Boost REQUIRED COMPONENTS python)

If it does, this would not be a ROS problem any more, but a plain CMake one.

Package boost-python3-1.69.0-18.fc32.x86_64 is already installed.

does that also install the development headers? Those are typically needed, not just the runtime library.


Edit: this is the logic used in cv_bridge/CMakeLists.txt. It could be the conditional there doesn't work on your system.

Perhaps the python there should be python38 or something similar.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-25 10:26:58 -0600 )edit

I believe the dev headers were already isntalled:

Package boost-python3-devel-1.69.0-18.fc32.x86_64 is already installed.

What folder is the correct CMakeLists.txt file that I should be looking for? Is it ~/src/vision_opencv/cv_bridge/CMakeLists.txt So just remove all of the contents of that file and replace it with your suggested 3 lines?

RobbieTheK gravatar image RobbieTheK  ( 2020-08-25 10:43:42 -0600 )edit

So just remove all of the contents of that file and replace it with your suggested 3 lines?

No.

You create a new empty directoy somewhere (perhaps in /tmp), then create a new, empty CMakeList.txt and add those lines. Then save. Then mkdir build; cd build; cmake ...

gvdhoorn gravatar image gvdhoorn  ( 2020-08-25 10:44:57 -0600 )edit

What would the full cmake command be?

RobbieTheK gravatar image RobbieTheK  ( 2020-08-25 10:48:57 -0600 )edit

That is the full cmake command.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-25 10:53:46 -0600 )edit

Perhaps the python there should be python38 or something similar. I changed in ~/src/vision_opencv/cv_bridge/CMakeLists.txt

    find_package(Boost REQUIRED python3.8)
  else()
    find_package(Boost REQUIRED python3.8)

Now getting a different error:

Errors     << controller_interface:cmake /root/ros_catkin_ws/logs/controller_interface/build.cmake.002.log
CMake Warning at /root/ros_catkin_ws/install/share/catkin/cmake/test/gtest.cmake:160 (message):
  skipping gmock 'controller_base_test' in project 'controller_interface'
  because gmock was not found
Call Stack (most recent call first):
  /root/ros_catkin_ws/install/share/catkin/cmake/test/gtest.cmake:89 (_catkin_add_executable_with_google_test)
  /root/ros_catkin_ws/install/share/catkin/cmake/test/gtest.cmake:63 (_catkin_add_google_test)
  CMakeLists.txt:33 (catkin_add_gmock)

CMake Error at /root/ros_catkin_ws/src/ros_control/controller_interface/CMakeLists.txt:34 (target_link
RobbieTheK gravatar image RobbieTheK  ( 2020-08-25 10:55:40 -0600 )edit

ok

That is the full cmake command.

Got it thanks see below:

cmake ..
-- The CXX compiler identification is GNU 10.2.1
-- 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
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Boost (missing: python) (found version "1.69.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindBoost.cmake:2166 (find_package_handle_standard_args)
  CMakeLists.txt:3 (find_package)

-- Configuring incomplete, errors occurred!
See also "/tmp/build/CMakeFiles/CMakeOutput.log".
RobbieTheK gravatar image RobbieTheK  ( 2020-08-25 10:58:34 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-08-25 06:48:28 -0600

Seen: 1,957 times

Last updated: Aug 25 '20