CMake Error: Project 'nav_core' tried to find library '-lpthread'
I can't to build navigation stack ( https://github.com/ros-planning/navig... ). My system is: Ubuntu 16.04 4.15.0-43-generic, ROS Kinetic. What I do:
mkdir -p navigation_ws/src
cd navigation_ws/src
catkin_init_workspace
git clone -b kinetic-devel https://github.com/ros-planning/navigation
cd ..
catkin_make
The error message is:
CMake Error at /home/username/navigation_ws/devel/share/costmap_2d/cmake/costmap_2dConfig.cmake:148 (message):
Project 'nav_core' tried to find library '-lpthread'. The library is
neither a target nor built/installed properly. Did you compile project
'costmap_2d'? 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)
navigation/nav_core/CMakeLists.txt:4 (find_package)
Then I found that '-l-lpthread' instead of '-lpthread' presents in files: devel/lib/pkgconfig/costmap_2d.pc, build/navigation/costmap_2d/catkin_generated/pkg.installspace.context.pc.py, build/navigation/costmap_2d/catkin_generated/pkg.develspace.context.pc.py and build/navigation/costmap_2d/catkin_generated/installspace/costmap_2d.pc
Please, help to solve this problem.
I believe this is a duplicate of #q311753 and #q311685, although you're using Ubuntu.