No rule to make target libboost_chrono when building with catkin_make

asked 2022-09-09 23:49:33 -0500

srburns gravatar image

Hello, I'm using Manjaro x86_64 and installed ROS noetic via an AUR helper, I'm trying to compile my package using catkin_make but I'm having errors:

[  0%] Built target _rosserial_arduino_generate_messages_check_deps_Test
[  0%] Built target _rosserial_arduino_generate_messages_check_deps_Adc
[  0%] Built target _rosserial_mbed_generate_messages_check_deps_Test
[  0%] Built target _rosserial_mbed_generate_messages_check_deps_Adc
[  0%] Built target _rosserial_msgs_generate_messages_check_deps_Log
Consolidate compiler generated dependencies of target motor_test_pub
Consolidate compiler generated dependencies of target teleop
make[2]: *** No rule to make target '/usr/lib/libboost_chrono.so.1.78.0', needed by '/home/srburns/Documents/ros-env/devel/lib/motor_comm/teleop'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:2895: ros_motor_comm/CMakeFiles/teleop.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target '/usr/lib/libboost_chrono.so.1.78.0', needed by '/home/srburns/Documents/ros-env/devel/lib/motor_comm/motor_test_pub'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:2869: ros_motor_comm/CMakeFiles/motor_test_pub.dir/all] Error 2
[  0%] Built target std_msgs_generate_messages_py
[  0%] Built target _rosserial_msgs_generate_messages_check_deps_RequestParam
[  0%] Built target _rosserial_msgs_generate_messages_check_deps_TopicInfo
[  0%] Built target _ros_essentials_cpp_generate_messages_check_deps_AddTwoInts
make: *** [Makefile:146: all] Error 2
Invoking "make -j6 -l6" failed

the CMakeLists.txt I'm using:

cmake_minimum_required(VERSION 3.0.2)
project(motor_comm)

set(CMAKE_CXX_FLAGS "-lncurses")

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  genmsg
)

find_package(Curses REQUIRED)

catkin_package(
  CATKIN_DEPENDS roscpp rospy std_msgs message_runtime
)

include_directories(${catkin_INCLUDE_DIRS})

add_executable(motor_test_pub src/motor_test_pub.cpp)
target_link_libraries(motor_test_pub ${catkin_LIBRARIES} ${Boost_INCLUDE_DIR})

add_executable(teleop src/teleop.cpp)
target_link_libraries(teleop ${catkin_LIBRARIES} ${CURSES_LIBRARIES} ${Boost_INCLUDE_DIR})

# add_executable(motor_control src/motor_control.cpp)
# target_link_libraries(motor_control ${catkin_LIBRARIES})

If some info is missing please comment bellow and I will add to this question, thanks in advance!

edit retag flag offensive close merge delete

Comments

Seems that it needs libboost-chrono-dev package. Please install it and try again.

ravijoshi gravatar image ravijoshi  ( 2022-09-10 01:18:06 -0500 )edit

@ravijoshi I have the binary libboost_chrono.so.1.79.0 in /usr/lib should I downgrade to 1.78?

srburns gravatar image srburns  ( 2022-09-10 02:14:15 -0500 )edit

No rule to make target '/usr/lib/libboost_chrono.so.1.78.0'

Yes please as it is looking for v1.78

ravijoshi gravatar image ravijoshi  ( 2022-09-10 07:44:46 -0500 )edit