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

Could not find the following Boost libraries: boost_python3

asked 2020-02-24 15:09:46 -0500

haleqiu gravatar image

I am a beginner of ROS and I am trying to run ros-kinetic with python 3. When doing the catkin_make with export ROS_PYTHON_VERSION=3 Get my feedback like:

-- 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
-- Using CATKIN_DEVEL_PREFIX: /home/yuheng/interestinteract/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.2", minimum required is "3") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/yuheng/interestinteract/build/test_results
-- Found gtest sources under '/usr/src/gmock': gtests will be built
-- Found gmock sources under '/usr/src/gmock': gmock will be built
-- Found PythonInterp: /usr/bin/python3 (found version "3.5.2") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests
-- catkin 0.7.20
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 6 packages in topological order:
-- ~~  - opencv_tests
-- ~~  - vision_opencv (metapackage)
-- ~~  - cv_bridge
-- ~~  - image_geometry
-- ~~  - interaction
-- ~~  - interestingness_ros
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'opencv_tests'
-- ==> add_subdirectory(vision_opencv/opencv_tests)
-- +++ processing catkin metapackage: 'vision_opencv'
-- ==> add_subdirectory(vision_opencv/vision_opencv)
-- +++ processing catkin package: 'cv_bridge'
-- ==> add_subdirectory(vision_opencv/cv_bridge)
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found version "3.5.2") 
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.58.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:`

          boost_python3

  No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
Call Stack (most recent call first):
  vision_opencv/cv_bridge/CMakeLists.txt:11 (find_package)


-- Found OpenCV: /opt/ros/kinetic (found suitable version "3.3.1", minimum required is "3") found components:  opencv_core opencv_imgproc opencv_imgcodecs 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so (found suitable version "3.5.2", minimum required is "3.5") 
-- +++ processing catkin package: 'image_geometry'
-- ==> add_subdirectory(vision_opencv/image_geometry)
-- Found OpenCV: /opt/ros/kinetic (found version "3.3.1") 
-- +++ processing catkin package: 'interaction'
-- ==> add_subdirectory(interaction)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- interaction: 0 messages, 1 services
-- +++ processing catkin package: 'interestingness_ros'
-- ==> add_subdirectory(interestingness_ros)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
-- interestingness_ros: 1 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-09-06 19:29:11 -0500

Chozoh gravatar image

I tried building kinetic with python3 as well today and got the same error. After browsing https://github.com/ros/ros-overlay/is..., it seems that the boost_python3 libraries names got changed. In /usr/lib/x86_64-linux-gnu for my install of Ubuntu 16.04, the library is named libboost_python-py35.so, while it is named libboost_python3.so in the github thread. Creating a symbolic link with this latter name resolved the error for me.

cd /usr/lib/x86_64-linux-gnu
sudo ln -s libboost_python-py35.so libboost_python3.so
sudo ln -s libboost_python-py35.a libboost_python3.a
edit flag offensive delete link more

Comments

Hi, while following your solution, it throws the following errors. Can you please help?

jetbot@jetson:/usr/lib/aarch64-linux-gnu$ sudo ln -s libboost_python-py36.so libboost_python3.so
ln: failed to create symbolic link 'libboost_python3.so': File exists
jetbot@jetson:/usr/lib/aarch64-linux-gnu$ sudo ln -s libboost_python-py36.a libboost_python3.a
ln: failed to create symbolic link 'libboost_python3.a': File exists
stevensu1838 gravatar image stevensu1838  ( 2020-11-15 00:36:42 -0500 )edit

Maybe your libboost_python3.so and libboost_python3.a are already linked to another library version. I would run ls -al /usr/lib/aarch64-linux-gnu/libboost_python*to make sure. If it's linked to a different version, you can try removing it and remaking the link to the version you tried before, but this may break something else that's using boost_python. A safer way may be to change the CMakeList.txt of the package that's failing, so it points to the correct libboost_python names. See https://github.com/ros/ros-overlay/is... for an example.

Chozoh gravatar image Chozoh  ( 2020-11-15 12:55:10 -0500 )edit

This worked for me too in Ubuntu 18.04, just had to change versions

cd /usr/lib/x86_64-linux-gnu
sudo ln -s libboost_python3.a libboost_python37.a
sudo ln -s libboost_python3.so libboost_python37.so
rezenders gravatar image rezenders  ( 2021-04-29 11:21:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-02-24 15:09:46 -0500

Seen: 8,202 times

Last updated: Feb 24 '20