[Debian-med-packaging] Bug#930240: ncbi-blast+ FTCBFS: configures for the build architecture

Helmut Grohne helmut at subdivi.de
Sun Jun 9 06:36:36 BST 2019


Source: ncbi-blast+
Version: 2.8.1-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

ncbi-blast+ fails to cross build from source, because it does not pass
--host to ./configure. The easiest way of fixing that - using
dh_auto_configure - does not work here, because it passes a
--runstatedir flag that is not understood. Thus, the --host flag must be
added manually.

I also noticed that ncbi-blast+ runs tests in the presence of
DEB_BUILD_OPTIONS=nocheck. Doing so typically breaks cross compilation.

The attached patch fixes the issues above, but does not make ncbi-blast+
cross buildable. It seems to build a project_tree_builder with the host
compiler and then fails running it. I didn't figure out how to fix this.
Please consider applying the attached patch as an incremental
improvement and close this bug when doing so.

Helmut
-------------- next part --------------
diff --minimal -Nru ncbi-blast+-2.8.1/debian/changelog ncbi-blast+-2.8.1/debian/changelog
--- ncbi-blast+-2.8.1/debian/changelog	2019-02-04 04:47:45.000000000 +0100
+++ ncbi-blast+-2.8.1/debian/changelog	2019-06-09 07:21:54.000000000 +0200
@@ -1,3 +1,12 @@
+ncbi-blast+ (2.8.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve cross building: (Closes: #-1)
+    + Pass --host to the configure script.
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 09 Jun 2019 07:21:54 +0200
+
 ncbi-blast+ (2.8.1-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru ncbi-blast+-2.8.1/debian/rules ncbi-blast+-2.8.1/debian/rules
--- ncbi-blast+-2.8.1/debian/rules	2019-02-04 03:52:00.000000000 +0100
+++ ncbi-blast+-2.8.1/debian/rules	2019-06-09 07:21:54.000000000 +0200
@@ -26,7 +26,11 @@
 export DEB_CFLAGS_MAINT_APPEND=-Wall -pedantic
 export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed
 
-DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+include /usr/share/dpkg/architecture.mk
+
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+DEB_CONFIGURE_EXTRA_FLAGS += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+endif
 
 CFLAGS   := $(shell dpkg-buildflags --get CFLAGS)
 CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
@@ -62,9 +66,11 @@
 	echo "Save time and do nothing for architecture independent builds"
 
 override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	-dh_auto_test
 	-c++/BUILD/build/check.sh concat_err
 	-cat c++/BUILD/build/check.sh.out_err
+endif
 
 instroot = debian/ncbi-blast+/usr
 leg_bin = debian/ncbi-blast+-legacy/usr/bin


More information about the Debian-med-packaging mailing list