Ask Your Question

Cannot install ros-melodic-rostime on Archlinux

asked 2019-01-01 12:03:21 -0600

NelsonCandela gravatar image

In the instalation guide for Arch, the first thing you are told to do is execute pikaur -S ros-melodic-desktop-full but this ended in an error when installing ros-melodic-rostime package. I tried to install just that package and this was the given error. Project 'rostime' tried to find library '-lpthread'. The library is neither a target nor built/installed properly.

It uses /usr/bin/cc and /usr/bin/c++, I changed them to /usr/bin/gcc and /usr/bin/g++ but is still giving the same error.

And the output of find /usr/lib -name "*libpthread*" is:


So I have libpthread installed

Y have already solved one error like this yesterday, it was just downgrading cmake, so now I have

cmake --version
cmake version 3.12.4

And just with that I was able to install the package ros-melodic-class-loader that gave me the same error before downgrading cmake, but now I don't know what to do, I have been searching for hours but found nothing.

If someone has any idea I appreciate so much.

edit retag flag offensive close merge delete


This is probably related to #q311685 if not a duplicate.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-01 14:17:15 -0600 )edit

I had already read it, its why I downgraded cmake from 3.13 to 3.12 as it says, and with that I was able to install ros-melodic-class-loader and probably another bunch of packages that were going to fail with 3.13 but rostime gives me the exact same error that it did class-loader but with cmake<3.13

NelsonCandela gravatar image NelsonCandela  ( 2019-01-01 16:06:07 -0600 )edit

@allenh1 already mentions in #q311685 that his patching/work is probably incomplete. See also ros/ros-overlay#711.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-02 02:48:42 -0600 )edit

I didn't read enough, so sorry for wasting your time, it was just rebuild the package ros-melodic-cpp-common and I could successfully install rso-melodic-rostime

NelsonCandela gravatar image NelsonCandela  ( 2019-01-02 08:36:02 -0600 )edit

No need to apologise.

Please post your last comment as an answer (extend it a little) and perhaps refer to the relevant comments by @allenh1 or in the issue on ros/ros-overlay I linked to so future readers have an easier time to solve it themselves.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-02 08:57:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-01-02 09:19:03 -0600

NelsonCandela gravatar image

updated 2019-01-02 09:26:13 -0600

Solved, for me was a quite simple solution.

  1. Install the version 3.12.3 of cmake, it's the one that I used, it might also work with 3.12.4 or other versions, but I can't confirm it.

  2. Rebuild the package ros-melodic-cpp-common. As I don't know how to just rebuild something, I first removed it with pikaur -Rs ros-melodic-cpp-common and then reinstalled it with pikaur -S ros-melodic-cpp-common.

  3. Now you should be able to install ros-melodic-rostime with pikaur -S ros-melodic-rostime.

I used pikaur as AUR helper, but it should work with any other, like yay for example.

Here was were I obtained all the information.

edit flag offensive delete link more


Final comment: I would consider all of this a work-around, not a solution. IIUC, upstream CMake changed something in a find..(..) script which adds -lpthread to the LIBRARIES variable, instead of making it a proper compiler flag. That is why things break, and it should be fixed there. ..

gvdhoorn gravatar image gvdhoorn  ( 2019-01-02 10:02:02 -0600 )edit

.. This is not a ROS or Catkin problem.

See the Debian bug report for more background.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-02 10:03:20 -0600 )edit

Ran into this same issue. I also ended up needing to downgrade to boost and boost-libs 1.68.0-2 instead of the current 1.69.0. A few packages were looking for, which appears gone in 1.69.0?

jwhendy gravatar image jwhendy  ( 2019-01-17 00:30:37 -0600 )edit

While maybe not a ROS bug, others are wrestling with this here too.

jwhendy gravatar image jwhendy  ( 2019-01-17 00:33:29 -0600 )edit

@jwhendy: the boost downgrade sounds like a separate issue. Let's not conflate them.

others are wrestling with this here too.

Yes, that is ros/ros-overlay#711 that was referred to earlier.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-17 04:20:27 -0600 )edit

Agreed. I now think that since I downgraded cmake via arch archive binaries, it was likely compiled against previous versions of boost at that time.

jwhendy gravatar image jwhendy  ( 2019-01-20 01:33:37 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2019-01-01 12:03:21 -0600

Seen: 1,409 times

Last updated: Jan 02 '19