Should CMAKE_INSTALL_LIBDIR be ignored in REP136 packages?

asked 2020-07-12 06:53:41 -0600

For example, from the build log for nodeletlib here:

cd obj-x86_64-linux-gnu && \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON "-GUnix Makefiles" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_AUTOGEN_VERBOSE=ON \
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
-DCATKIN_BUILD_BINARY_PACKAGE=1 \
-DCMAKE_INSTALL_PREFIX=/opt/ros/noetic \
-DCMAKE_PREFIX_PATH=/opt/ros/noetic ..

Note the -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu which, via cmake GNUInstallDirs is, in a regular Debian package, used to place all *.so.* files under lib/ARCH/ instead of lib/.

However, in nodeletlib (and all? other pkgs) libs end up under /lib instead:

-- Installing: /tmp/binarydeb/ros-noetic-nodelet-1.10.0/debian/ros-noetic-nodelet/opt/ros/noetic/lib/libnodeletlib.so

Following the standard and placing the libs under lib/ARCH leads to package build errors like:

dpkg-shlibdeps: error: cannot find library libXXX needed by YYY

Is this a documented behavior specific for ROS, or am I missing something? :-)

edit retag flag offensive close merge delete

Comments

Maybe it should be ignored? I'm not sure where CMAKE_INSTALL_LIBDIR is coming from.

It looks like the bloom template for the Debian rules file hard codes a -l argument to /lib/ only. I wonder if this is because of REP 122?

It seems like you might have been down this path before

https://github.com/ros-infrastructure...

https://github.com/mrpt-ros-pkg-relea...

sloretz gravatar image sloretz  ( 2020-08-03 17:55:49 -0600 )edit