orocos-toolchain / rtt

Orocos Real-Time Toolkit
http://www.orocos.org
Other
72 stars 79 forks source link

2.9.1 ros debian package fails to install #299

Closed tfoote closed 4 years ago

tfoote commented 5 years ago

@meyerj This appears to be causing a regression for downstream packages: http://build.ros.org/view/Kbin_uX64/job/Kbin_uX64__ocl__ubuntu_xenial_amd64__binary/6/console

It seems to be trying to install the setup files that are usually disabled for the debian packages except for catkin. Are the default debian rules being overridden?

00:01:32.495   1542 'Unpacking ros-kinetic-rtt (2.9.1-1xenial-20190531-003608-0800) ...'
00:01:32.495   1543 'dpkg: error processing archive /var/cache/apt/archives/ros-kinetic-rtt_2.9.1-1xenial-20190531-003608-0800_amd64.deb (--unpack):'
00:01:32.495   1544 ' trying to overwrite '/opt/ros/kinetic/setup.bash', which is also in package ros-kinetic-catkin 0.7.14-0xenial-20190529-233325-0800'
00:01:32.495   1545 'dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)'
00:01:32.495   1546 'Processing triggers for libc-bin (2.23-0ubuntu11) ...'
00:01:32.495   1547 'Processing triggers for systemd (229-4ubuntu21.21) ...'
00:01:32.495   1548 'Processing triggers for ccache (3.2.4-1) ...'
00:01:32.495   1549 'Updating symlinks in /usr/lib/ccache ...'
00:01:32.495   1550 'Errors were encountered while processing:'
00:01:32.495   1551 ' /var/cache/apt/archives/ros-kinetic-rtt_2.9.1-1xenial-20190531-003608-0800_amd64.deb'
00:01:32.495   1552 'E: Sub-process /usr/bin/dpkg returned an error code (1)'

relevant rosdistro release: https://github.com/ros/rosdistro/pull/21232

meyerj commented 5 years ago

We did not change something deliberately. No patches are applied to the debian/rules file generated by bloom.

Indeed I see that the latest release does not add the -DCATKIN_BUILD_BINARY_PACKAGE="1" cmake variable anymore in debian/rules.em:

--- a/debian/rules.em
+++ b/debian/rules.em
@@ -8,7 +8,6 @@

 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
-export DH_OPTIONS=-v --buildsystem=cmake
 # TODO: remove the LDFLAGS override.  It's here to avoid esoteric problems
 # of this sort:
 #  https://code.ros.org/trac/ros/ticket/2977
@@ -20,17 +19,14 @@ export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig
 export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG

 %:
-       dh  $@@
+       dh $@@ -v --buildsystem=cmake

 override_dh_auto_configure:
        # In case we're installing to a non-standard location, look for a setup.sh
        # in the install tree that was dropped by catkin, and source it.  It will
        # set things like CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
        if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \
-       dh_auto_configure -- \
-               -DCATKIN_BUILD_BINARY_PACKAGE="1" \
-               -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)" \
-               -DCMAKE_PREFIX_PATH="@(InstallationPrefix)"
+       dh_auto_configure -- -DCMAKE_INSTALL_PREFIX="@(InstallationPrefix)"

 override_dh_auto_build:
        # In case we're installing to a non-standard location, look for a setup.sh

rtt specifies <export><build_type>cmake</build_type></export> in its package.xml because it is not a catkin-package and needs to be installed. But it tries to find catkin in its CMakeLists.txt to install an env-hook and also installs the package.xml in CMakeLists.txt:174.

Apparently since https://github.com/ros-infrastructure/bloom/pull/435 it is not allowed to call find_package(catkin) in a package with build-type cmake? Also note that the cmake/template.spec.em for generating rpms from cmake packages added in the same bloom PR still has the catkin-specific -DCATKIN_BUILD_BINARY_PACKAGE="1" option, so this issue only affects Debian-based targets.

I will add a patch to readd the -DCATKIN_BUILD_BINARY_PACKAGE="1" cmake option to rules.em.

tfoote commented 5 years ago

Thanks yeah, that's the flag that's necessary. I think the same thing happened to the recent release of ocl too.

meyerj commented 5 years ago

Thanks yeah, that's the flag that's necessary. I think the same thing happened to the recent release of ocl too.

Yes, you are right. I applied the same patch and rereleased as version 2.9.1-2 in https://github.com/ros/rosdistro/pull/21452 and https://github.com/ros/rosdistro/pull/21453.

tfoote commented 5 years ago

Great thanks. We've almost got the whole buildfarm back up and running and we'll merge the new releases once it's stabilized.

meyerj commented 4 years ago

Fixed in version 2.9.2-1 released via https://github.com/ros/rosdistro/pull/21445.