[Pkg-opencl-devel] Bug#996980: khronos-opencl-clhpp: build-dependency loop between khronos-opencl-clhpp, khronos-opencl-headers, ocl-icd

Steve Langasek steve.langasek at canonical.com
Thu Oct 21 21:42:52 BST 2021


Package: khronos-opencl-clhpp
Version: 3.0~2.0.15-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Dear maintainers,

With the unfreezing of the Ubuntu archive for jammy and the import of the
latest packages from Debian, khronos-opencl-clhpp was failing to build with
unsatisfied build-dependencies, due to a loop between khronos-opencl-clhpp,
khronos-opencl-headers, and ocl-icd:

  - khronos-opencl-clhpp build-depends ocl-icd-opencl-dev
  - ocl-icd-opencl-dev depends opencl-c-headers and opencl-clhpp-headers
  - current opencl-c-headers in unstable Breaks: previously available
    versions of opencl-clhpp-headers

While this loop doesn't cause an ongoing problem once khronos-opencl-clhpp
3.0~2.0.15-1 is built, it still represents a bootstrap loop, which is
suboptimal.  Also, it seems strange that an arch: all headers-only package
build-depends on other -dev packages.

Digging in, I found that the build-dependency was because examples were
being compiled (and subsequently run).  While this is a good test to have
for the package, the current implementation only ensures the tests are run
on the architecture where arch: all packages are being built.  Surely this
would be better done as an autopkgtest, so that it runs for each
architecture?

(Also, btw, the implementation in debian/rules was testing the examples
outside of the 'nocheck' test, which would cause problems for cross-builds,
among other things)

I have applied the attached patch in Ubuntu to break the bootstrap loop. 
While I could drop the patch once the bootstrap is finished, I think this,
combined with adding the examples as an autopkgtest (which I have not
implemented here - sorry) would be an overall improvement in robustness, so
I'm submitting this bug for consideration.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru khronos-opencl-clhpp-3.0~2.0.15/debian/control khronos-opencl-clhpp-3.0~2.0.15/debian/control
--- khronos-opencl-clhpp-3.0~2.0.15/debian/control	2021-08-23 16:17:49.000000000 -0700
+++ khronos-opencl-clhpp-3.0~2.0.15/debian/control	2021-10-21 12:52:36.000000000 -0700
@@ -7,7 +7,6 @@
 Build-Depends: debhelper-compat (= 13),
                opencl-c-headers (>= 3.0~2021.04.29),
                cmake,
-               ocl-icd-opencl-dev,
                doxygen,
 Rules-Requires-Root: no
 Standards-Version: 4.6.0
diff -Nru khronos-opencl-clhpp-3.0~2.0.15/debian/rules khronos-opencl-clhpp-3.0~2.0.15/debian/rules
--- khronos-opencl-clhpp-3.0~2.0.15/debian/rules	2021-08-23 16:17:49.000000000 -0700
+++ khronos-opencl-clhpp-3.0~2.0.15/debian/rules	2021-10-21 12:50:32.000000000 -0700
@@ -7,13 +7,12 @@
 	dh $@
 
 override_dh_auto_configure:
-	dh_auto_configure -- -DBUILD_TESTS=OFF -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+	dh_auto_configure -- -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
 
 override_dh_auto_build:
 	dh_auto_build -- all docs
 
 override_dh_auto_test:
-	dh_auto_test -- examples
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	$(MAKE) -C debian/t
 endif


More information about the Pkg-opencl-devel mailing list