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

Project 'davis_ros_driver' tried to find library 'pthread'. The library is neither a target nor built/installed properly.

asked 2021-12-08 06:28:08 -0600

luna wu gravatar image

updated 2021-12-08 13:03:47 -0600

Mike Scheutzow gravatar image

When I run the code

catkin build davis_ros_driver

from https://github.com/uzh-rpg/rpg_dvs_ros, I met an error:

CMake Error at /opt/ros/melodic/share/roscpp/cmake/roscppConfig.cmake:173 (message):
  Project 'davis_ros_driver' tried to find library 'pthread'.  The library is
  neither a target nor built/installed properly.  Did you compile project
  'roscpp'? Did you find_package() it before the subdirectory containing its
  code is included?

This problem has been bothering me for a week. I tried many solutions, such as changing the Cmake version to 3.10.0 and 3.12.4, but it still didn't work, so I feel very desperate. I hope someone will help me.

Any suggestions from everyone will help me. Thanks

Melodic ros Ubuntu18.04

edit retag flag offensive close merge delete

Comments

osilva gravatar image osilva  ( 2021-12-08 09:14:45 -0600 )edit

Yes, I have tried this :

Using compile options via CMakeLists.txt worked for me add_compile_options(-pthread)

But it didn't work for me.

luna wu gravatar image luna wu  ( 2021-12-08 21:16:55 -0600 )edit

I tried to replicate your error a couple times but I was unable to reproduce, it compiles with no issues. Perhaps start with a fresh installation of ROS Melodic and Ubuntu 18.04 as the owners of this library are not very responsive.

osilva gravatar image osilva  ( 2021-12-09 07:19:53 -0600 )edit

Thank you very much for your attention to this issue.

Because of too many problems ,I reinstalled the Ubuntu 18.04 version, and the recompilation was successful without any errors.

luna wu gravatar image luna wu  ( 2021-12-09 07:59:40 -0600 )edit

Glad it worked. Please document as an answer so others may benefit in the future.

osilva gravatar image osilva  ( 2021-12-09 08:31:02 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-12-10 00:48:53 -0600

luna wu gravatar image

Since I did not solve this problem , I reinstalled the Ubuntu 18.04 version, and the recompilation was successful without any errors...

I think, sometimes, reinstalling the system is faster than solving the problem

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-12-08 06:28:08 -0600

Seen: 602 times

Last updated: Dec 10 '21