Ask Your Question
0

[buildfarm] dpkg-shlibdeps: error: cannot find library

asked 2021-11-02 04:11:59 -0500

updated 2021-11-02 05:59:05 -0500

gvdhoorn gravatar image

I'm trying to release paho.mqtt.cpp as a dependency of one of our packages.

If fails on the error: dpkg-shlibdeps: error: cannot find library libpaho-mqtt3as.so.1 build output

However this minimal docker works just fine:

FROM ros:noetic

RUN apt-get update -qq
RUN apt-get install -qqy git fakeroot dpkg-dev debhelper
RUN apt-get install -qqy ros-noetic-paho-mqtt-c
RUN git clone -b debian/noetic/focal/paho-mqtt-cpp https://github.com/nobleo/paho.mqtt.cpp-release

WORKDIR paho.mqtt.cpp-release
RUN apt-get install -qqy apt-src
RUN apt-src import ros-noetic-paho-mqtt-cpp --here --version 1.2.0-2
RUN apt-src build ros-noetic-paho-mqtt-cpp
RUN apt install ../ros-noetic-paho-mqtt-cpp_1.2.0-2focal_amd64.deb

The file libpaho-mqtt3as.so.1 is also present in this dockerfile. And on my laptop upon installing ros-noetic-paho-mqtt-c.

Where did the file go on the buildfarm?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-11-05 17:02:48 -0500

nuclearsandwich gravatar image

This error can occur if the target library is being installed to a directory that dh_shlibdeps doesn't expect.

I first encountered an issue like this one when producing the very first ROS 2 beta 2 debs shortly after joining Open Robotics (and I'm sad to say that in all this time I haven't taken the time to investigate the issue to my satisfaction. We ended up adding patches in the bloom-generated debian/rules.em templates which explicitly add the directory containing the "missing" library to the dh_shlibdeps search string.

We used to add these patches to affected packages' bloom templates for each new rosdistro's bootstrap process but discovered that no patch is needed when building on/for Ubuntu 18.04. I'm sad to say that I assumed the change was a "bug fix" in the build pipeline and didn't follow up at all and so I was quite surprised to see the problem return in Ubuntu 20.04.

I think a patch similar to the one above to the debian/rules.em template file in your bloom repository will resolve the issue but I don't have a deeper understanding of the problem to know if there's a "better" solution out there. If I ever dive into this mystery I will come back and update the answer.

edit flag offensive delete link more

Comments

This indeeds solved the issue.

If I ever dive into this mystery I will come back and update the answer.

Please do :)

Timple86 gravatar image Timple86  ( 2021-11-08 01:11:31 -0500 )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

3 followers

Stats

Asked: 2021-11-02 04:11:59 -0500

Seen: 42 times

Last updated: Nov 05 '21