[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#995980: assimp FTCBFS: very wrong python dependency and more issues

Source: assimp
Version: 5.0.1~ds0-3
Tags: patch
Control: clone -1 -2
Control: retitle -2 rules-require-build-prerequisite gives bogus advice
Control: reassign -2 lintian
Control: severity -2 important
Control: tags -2 - patch
Control: affects -2 src:assimp
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debhelper@packages.debian.org
X-Debbugs-Cc: debian-cross@lists.debian.org

assimp fails to cross build from source. It attempts to build a python
module, but it ultimately fails doing so. While inspecting this, I
discovered that assimp "Build-Depends: python3:any | python3-all:any |
python3-dev:any | python3-all-dev:any | dh-sequence-python3". This is
wrong on so many levels.

For starters, sbuild ignores any alternative in unstable, so in
practice, this happens to become "python3:any". Any other alternative is
simply ignored and shouldn't be there.

Then, issuing a dependency on python3-dev:any without libpython3-dev is
practically never correct. That could be a separate lintian tag, but
that's not too bad here as python3-dev isn't needed. Either you go
python3-dev or you go python3-dev:any, libpython3-dev or you have a very
special and unusual use case that I have never encountered anywhere.

Also listing dh-sequence-python3 there is bogus. You already added
"--with python3" in debian/rules. This is duplicate at best. Either
should be dropped, but enabling a dh-addon in an alternative is clearly
not right, and debhelper should likely fail hard when encountering that.
Niels, do you agree?

I wondered how one would come up with such a strange dependency and
asked #debian-mentors for help. Kindly, a user named "itd" pointed me at
the lintian tag rules-require-build-prerequisite, which very likely is
the cause for this. Please disable the tag right now as it does more
harm than good. While the tag isn't bad per-se, the advice it gives
misleads users and produces broken packages. I request hiding or
disabling it now and then figuring out what it really should say.

Back to assimp. I looked into this to make it cross buildable, right?
And it was failing in Python-ish stuff. So why do we actually build the
Python module? Did I say module? It's not an extension? No, it isn't.
And we really don't have to build it in an arch-only build. So the key
to making assimp cross buildable is to make an arch-only build fully
skip the Python stuff. And once you do that, you don't care about :any
annotations anymore as those are practically irrelevant in

So I've attached a patch for assimp to fix the cross build and the
strange build dependency. Please consider applying it.

diff --minimal -Nru assimp-5.0.1~ds0/debian/changelog assimp-5.0.1~ds0/debian/changelog
--- assimp-5.0.1~ds0/debian/changelog	2021-10-06 09:02:14.000000000 +0200
+++ assimp-5.0.1~ds0/debian/changelog	2021-10-08 20:49:28.000000000 +0200
@@ -1,3 +1,15 @@
+assimp (5.0.1~ds0-3.1) UNRELEASED; urgency=medium
+  * Non-maintainer upload.
+  * Fix python build dependency. (Closes: #-1)
+    + Alternatives in Build-Depends are ignored.
+    + Enable the python3 dh addon once only.
+    + Build python module in indep build only.
+    + Move python Build-Depends to B-D-I.
+    + Drop the :any nonsense.
+ -- Helmut Grohne <helmut@subdivi.de>  Fri, 08 Oct 2021 20:49:28 +0200
 assimp (5.0.1~ds0-3) unstable; urgency=medium
   [ Debian Janitor ]
diff --minimal -Nru assimp-5.0.1~ds0/debian/control assimp-5.0.1~ds0/debian/control
--- assimp-5.0.1~ds0/debian/control	2021-10-06 09:02:14.000000000 +0200
+++ assimp-5.0.1~ds0/debian/control	2021-10-08 20:49:28.000000000 +0200
@@ -15,8 +15,10 @@
  zlib1g-dev | libz-dev,
- python3:any | python3-all:any | python3-dev:any | python3-all-dev:any | dh-sequence-python3,
+ dh-sequence-python3,
+ python3,
 Rules-Requires-Root: no
 Vcs-Git: https://salsa.debian.org/debian/assimp.git
 Vcs-Browser: https://salsa.debian.org/debian/assimp
diff --minimal -Nru assimp-5.0.1~ds0/debian/rules assimp-5.0.1~ds0/debian/rules
--- assimp-5.0.1~ds0/debian/rules	2021-10-06 09:02:14.000000000 +0200
+++ assimp-5.0.1~ds0/debian/rules	2021-10-08 20:49:28.000000000 +0200
@@ -33,7 +33,7 @@
 export PYBUILD_NAME=pyassimp
-	dh $@ --with python3 --buildsystem=cmake
+	dh $@ --buildsystem=cmake
 	dh_auto_configure -- \
@@ -50,8 +50,10 @@
+ifneq ($(filter python3-pyassimp,$(shell dh_listpackages)),)
 	dh_auto_build --buildsystem=pybuild -- \
 		-d port/PyAssimp/
 	cd obj-$(DEB_HOST_GNU_TYPE)/doc && doxygen Doxyfile
 	cd doc && doxygen Doxyfile_Cmd
@@ -61,8 +63,10 @@
+ifneq ($(filter python3-pyassimp,$(shell dh_listpackages)),)
 	dh_auto_install --buildsystem=pybuild -- \
 		-d port/PyAssimp/
 	# IrrXML is not packaged for Debian, so drop the wrapper
 	find debian/*/usr -name irrXMLWrapper.h -delete

Reply to: