Bug#914476: flint-arb FTCBFS: ./configure needs to be told about crossing

Helmut Grohne helmut at subdivi.de
Fri Nov 23 18:48:37 GMT 2018


Source: flint-arb
Version: 1:2.14.0-4
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

flint-arb fails to cross build from source. Nothing tells its
./configure about cross compilation, so it misses dependencies while
building for the wrong architecture. The attached patch adds the most
important flags and while the value passed for --build is not exactly
what it needs, it seems to be good enough for a couple of architectures.
Please consider applying it.

Helmut
-------------- next part --------------
diff --minimal -Nru flint-arb-2.14.0/debian/changelog flint-arb-2.14.0/debian/changelog
--- flint-arb-2.14.0/debian/changelog	2018-09-26 20:25:16.000000000 +0200
+++ flint-arb-2.14.0/debian/changelog	2018-11-23 19:41:26.000000000 +0100
@@ -1,3 +1,10 @@
+flint-arb (1:2.14.0-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Tell ./configure about cross compiling. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Fri, 23 Nov 2018 19:41:26 +0100
+
 flint-arb (1:2.14.0-4) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru flint-arb-2.14.0/debian/rules flint-arb-2.14.0/debian/rules
--- flint-arb-2.14.0/debian/rules	2018-09-26 20:25:16.000000000 +0200
+++ flint-arb-2.14.0/debian/rules	2018-11-23 19:41:17.000000000 +0100
@@ -9,11 +9,16 @@
 %:
 	dh $@
 
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+include /usr/share/dpkg/buildtools.mk
+CONFIGURE_FLAGS = --build=$(DEB_HOST_GNU_CPU)-$(DEB_HOST_ARCH_OS) CC=$(CC) CXX=$(CXX) AR=$(AR)
+endif
+
 # upstream Makefile has only CFLAGS, not CPPFLAGS and not even CXXFLAGS, so
 # inject flags using configure. let's hope CFLAGS will always be good enough
 # even for $(CXX)
 override_dh_auto_configure:
-	./configure --prefix=/usr --disable-static --with-flint=/usr CFLAGS='$(CPPFLAGS) $(CFLAGS)'
+	./configure --prefix=/usr --disable-static --with-flint=/usr CFLAGS='$(CPPFLAGS) $(CFLAGS)' $(CONFIGURE_FLAGS)
 	sed -i Makefile -e "s/libarb/libflint-arb/g"
 	sed -i Makefile -e "s/-larb/-lflint-arb/g"
 	sed -i Makefile -e "s|LIBDIR=lib|LIBDIR=lib/$(DEB_HOST_MULTIARCH)|g"


More information about the debian-science-maintainers mailing list