Robotics StackExchange | Archived questions

Can't find library '-pthread'

I run catkin_make then this error occurs. I have no idea how to deal with it.

'controllermanagertests' is not my project, just a basic library.

I have already found some methods like here. But still doesn't work.

My OS is Ubuntu 16.04, ROS is kinetic

-- +++ processing catkin package: 'rbdl_test'
-- ==> add_subdirectory(rbdl_test)
-- +++ processing catkin package: 'hardware_interface'
-- ==> add_subdirectory(ros_control-kinetic-devel/hardware_interface)
-- +++ processing catkin package: 'combined_robot_hw'
-- ==> add_subdirectory(ros_control-kinetic-devel/combined_robot_hw)
-- +++ processing catkin package: 'controller_interface'
-- ==> add_subdirectory(ros_control-kinetic-devel/controller_interface)
-- +++ processing catkin package: 'controller_manager'
-- ==> add_subdirectory(ros_control-kinetic-devel/controller_manager)
-- Found Boost: /usr/include (found version "1.58.0") found components:  thread chrono system date_time atomic 
-- +++ processing catkin package: 'force_torque_sensor_controller'
-- ==> add_subdirectory(ros_controllers-kinetic-devel/force_torque_sensor_controller)
-- +++ processing catkin package: 'forward_command_controller'
-- ==> add_subdirectory(ros_controllers-kinetic-devel/forward_command_controller)
-- +++ processing catkin package: 'position_controllers'
-- ==> add_subdirectory(ros_controllers-kinetic-devel/position_controllers)
-- +++ processing catkin package: 'controller_manager_tests'
-- ==> add_subdirectory(ros_control-kinetic-devel/controller_manager_tests)
CMake Error at /home/yummy/catkin_ws/devel/share/controller_manager/cmake/controller_managerConfig.cmake:150 (message):
  Project 'controller_manager_tests' tried to find library '-pthread'.  The
  library is neither a target nor built/installed properly.  Did you compile
  project 'controller_manager'? Did you find_package() it before the
  subdirectory containing its code is included?
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  ros_control-kinetic-devel/controller_manager_tests/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/yummy/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/yummy/catkin_ws/build/CMakeFiles/CMakeError.log".

Asked by Yummy_Ou on 2019-12-10 12:27:57 UTC

Comments

Answers

I solve this problem! Just by installing a lower version CMake.

Before I solve the problem: My Ubuntu still is CMake 3.5.1. But because I upgraded CMake to 3.15.3, so when I run "cmake --version", it showed me that 3.15.3.

I now downgrade the CMake version from 3.15.3 to 3.10.0-rc1. Then solve the problem:)

Asked by Yummy_Ou on 2019-12-11 06:51:16 UTC

Comments