I got this error 2 weeks ago.
Today! Finally! I deal with it!!!
Problem
can’t find the library ‘-pthread’.
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".
Solution
finding methods
I have already tried so many function like: cmake and libpthread
But still can’t solve the problem…
Then I find this link about CMake Error: Project ‘nav_core’ tried to find library ‘-lpthread’. Here is just one short commit to telling us "The problem was caused by wrong cmake version"
.
So I try…
My OS is Ubuntu 16.04, ROS is kinetic. So the default Cmake version is 3.5.1. For installing RBDL, I upgrade CMake to 3.15.3.
What strange is that
- some part of my system still is version 3.5.1, because when I run
ccmake .
, it showed the version3.5.1
- but when I run “
cmake --version
”, it showed me that3.15.3
.
Done!
I now downgrade the CMake version from 3.15.3
to 3.10.0-rc1.
Then solve the problem:)
To solve this problem! Just by installing a lower version CMake.
The problem about finding franka
and gazebo
are also solved!!
I post the question in ROS Froum.
Install CMake with new version
following here
In http://www.cmake.org/files download the CMake, which you want.
sudo apt-get install build-essential
tar xf cmake-3.10.0-rc1
cd cmake-3.10.0-rc1
./configure
make
sudo make install
At last, check the version which you install.
cmake --version
If your version shows it correct in the terminal, that means success!!