[Debian-med-packaging] Bug#1150998: proteinortho FTCBFS: build times out
Helmut Grohne
helmut at subdivi.de
Wed Oct 14 08:30:25 BST 2026
Source: proteinortho
Version: 6.3.1+dfsg-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs
When trying to cross build proteinortho using sbuild, the result is a
150 minute build timeout via inactivity. What actually happens is that
after linking proteinortho_clustering, the build system runs it and as
that fails proceeds to silently rebuilding lapack. Given that lapack is
non-trivial to compile and all of its output is hidden, this times out
the build.
We cannot expect to run this test during cross compilation. I therefore
propose to make the build system aware of cross compilation. Then, it
trusts that a successful link is ok. Once doing so, proteinortho quickly
cross builds successfully saving a lot of QA resources. The failure mode
has wasted around 9 CPU days so far. Please consider applying the
attached patch.
Helmut
-------------- next part --------------
diff -Nru proteinortho-6.3.1+dfsg/debian/changelog proteinortho-6.3.1+dfsg/debian/changelog
--- proteinortho-6.3.1+dfsg/debian/changelog 2024-01-12 06:50:22.000000000 +0100
+++ proteinortho-6.3.1+dfsg/debian/changelog 2026-10-14 09:17:54.000000000 +0200
@@ -1,3 +1,10 @@
+proteinortho (6.3.1+dfsg-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: Avoid running tests during cross builds. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de> Wed, 14 Oct 2026 09:17:54 +0200
+
proteinortho (6.3.1+dfsg-1) unstable; urgency=medium
* New upstream version
diff -Nru proteinortho-6.3.1+dfsg/debian/patches/cross.patch proteinortho-6.3.1+dfsg/debian/patches/cross.patch
--- proteinortho-6.3.1+dfsg/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ proteinortho-6.3.1+dfsg/debian/patches/cross.patch 2026-10-14 09:17:03.000000000 +0200
@@ -0,0 +1,41 @@
+--- proteinortho-6.3.1+dfsg.orig/Makefile
++++ proteinortho-6.3.1+dfsg/Makefile
+@@ -36,6 +36,7 @@
+ # compile statically
+ STATIC=FALSE
+ DEPLOY=FALSE
++CROSS_COMPILING=FALSE
+
+ ifdef static
+ STATIC=$(static)
+@@ -189,6 +190,9 @@
+ ifeq ($(USEPRECOMPILEDLAPACK),TRUE)
+ ifeq ($(STATIC),TRUE)
+ @echo "[ 20%] Building **proteinortho_clustering** with LAPACK (static linking)";
++ifeq ($(CROSS_COMPILING),TRUE)
++ $(CXX) -std=c++11 -O3 -funroll-loops -static $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -Wl,--allow-multiple-definition -llapack -lblas -lgfortran -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lquadmath
++else
+ @echo "$(CXX) -std=c++11 -O3 -funroll-loops -static $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -Wl,--allow-multiple-definition -llapack -lblas -lgfortran -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lquadmath" && $(CXX) -std=c++11 -O3 -funroll-loops -static $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -Wl,--allow-multiple-definition -llapack -lblas -lgfortran -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lquadmath && ([ $$? -eq 0 ] && $@ -test && [ $$? -eq 0 ] ) || ( \
+ echo "......$(ORANGE)dynamic linking failed too, now I try dynamic linking without -WL,-whole-archive... (this should now work for OSX).$(NC)"; \
+ echo "$(CXX) -std=c++11 -O3 -funroll-loops -static $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -Wl,--allow-multiple-definition -llapack -lblas -lgfortran -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lquadmath" && $(CXX) -std=c++11 -O3 -funroll-loops -static $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -Wl,--allow-multiple-definition -llapack -lblas -lgfortran -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lquadmath && ([ $$? -eq 0 ] && $@ -test && [ $$? -eq 0 ] ) || ( \
+@@ -205,8 +209,12 @@
+ if [ ! -f src/lapack-3.8.0/build/lib/liblapack.a ]; then echo " mkdir src/lapack-3.8.0/build; cd src/lapack-3.8.0/build; cmake .. -DCMAKE_CXX_COMPILER=$(CXX) > /dev/null; make all -j4 "; mkdir src/lapack-3.8.0/build 2> /dev/null; cd src/lapack-3.8.0/build; cmake .. -DCMAKE_CXX_COMPILER=$(CXX) > /dev/null; make all -j4 > /dev/null 2>&1; cd ../../.. ; fi; \
+ echo "......[ 99%] Building **proteinortho_clustering** with LAPACK (dynamic linking)"; \
+ echo "$(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< -Isrc/lapack-3.8.0/build/include/ -Lsrc/lapack-3.8.0/build/lib/ -llapack -lblas $(LDFLAGS) $(LDLIBS) -lgfortran" && $(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< -Isrc/lapack-3.8.0/build/include/ -Lsrc/lapack-3.8.0/build/lib/ -llapack -lblas $(LDFLAGS) $(LDLIBS) -lgfortran && echo "......OK dynamic linking was successful for proteinortho_clustering!" || ( echo "" ) ; ) ) ) ) )
++endif
+ else
+ @echo "[ 20%] Building **proteinortho_clustering** with LAPACK (dynamic linking)";
++ifeq ($(CROSS_COMPILING),TRUE)
++ $(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -llapack -lblas -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
++else
+ @echo "$(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -llapack -lblas -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" && $(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -llapack -lblas -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive && ([ $$? -eq 0 ] && $@ -test && [ $$? -eq 0 ] && echo "......OK dynamic linking was successful for proteinortho_clustering!";) || ( \
+ echo "......$(ORANGE)dynamic linking failed too, now I try dynamic linking without -WL,-whole-archive (this should now work for OSX).$(NC)"; \
+ echo "$(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -llapack -lblas -pthread -lpthread" && $(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< $(LDFLAGS) $(LDLIBS) -llapack -lblas -pthread -lpthread && ([ $$? -eq 0 ] && $@ -test && [ $$? -eq 0 ] && echo "......OK dynamic linking was successful for proteinortho_clustering!";) || ( \
+@@ -220,6 +228,7 @@
+ echo "......[ 99%] Building **proteinortho_clustering** with LAPACK (dynamic linking)"; \
+ echo "$(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< -Isrc/lapack-3.8.0/build/include/ -Lsrc/lapack-3.8.0/build/lib/ -llapack -lblas $(LDFLAGS) $(LDLIBS) -lgfortran" && $(CXX) -std=c++11 -O3 -funroll-loops $(CPPFLAGS) $(CXXFLAGS) $(MTUNEARCHFLAGS) -fopenmp -o $@ $< -Isrc/lapack-3.8.0/build/include/ -Lsrc/lapack-3.8.0/build/lib/ -llapack -lblas $(LDFLAGS) $(LDLIBS) -lgfortran && echo "......OK dynamic linking was successful for proteinortho_clustering!" || ( echo "" ) ; ) ) )
+ endif
++endif
+ @if [ ! -e $(BUILDDIR)/proteinortho_clustering ]; then echo "proteinortho_clustering compilation failed. Please visit https://gitlab.com/paulklemm_PHD/proteinortho/wikis/Error%20Codes"; false; fi
+ else
+ @echo "[ 15%] Extracting the LAPACK library";
diff -Nru proteinortho-6.3.1+dfsg/debian/patches/series proteinortho-6.3.1+dfsg/debian/patches/series
--- proteinortho-6.3.1+dfsg/debian/patches/series 2024-01-12 06:50:22.000000000 +0100
+++ proteinortho-6.3.1+dfsg/debian/patches/series 2026-10-14 09:10:57.000000000 +0200
@@ -1 +1,2 @@
deb_diamond
+cross.patch
diff -Nru proteinortho-6.3.1+dfsg/debian/rules proteinortho-6.3.1+dfsg/debian/rules
--- proteinortho-6.3.1+dfsg/debian/rules 2024-01-12 06:50:22.000000000 +0100
+++ proteinortho-6.3.1+dfsg/debian/rules 2026-10-14 09:17:47.000000000 +0200
@@ -9,6 +9,11 @@
%:
dh $@
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+override_dh_auto_build:
+ dh_auto_build -- CROSS_COMPILING=TRUE
+endif
+
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test --no-parallel
More information about the Debian-med-packaging
mailing list