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

Bug#836542: nfs-utils FTCBFS: uses build architecture compiler, uses pre-built ELF object files



Source: nfs-utils
Version: 1:1.2.8-9.2
Severity: important
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

nfs-utils fails to cross build from source, because it doesn't pass
--host to ./configure and thus uses the build architecture compiler. The
attached patch uses dh_auto_configure, which automatically supplies
those flags as needed. Then I found that the build would reuse existing
ELF object files (e.g. exportfs.o) instead of building them from source,
which is why I mark this bug as important. Reusing those objects causes
the build to fail for any host architecture that is not amd64.

Helmut
diff --minimal -Nru nfs-utils-1.2.8/debian/changelog nfs-utils-1.2.8/debian/changelog
--- nfs-utils-1.2.8/debian/changelog	2016-08-11 18:50:24.000000000 +0200
+++ nfs-utils-1.2.8/debian/changelog	2016-09-03 22:30:39.000000000 +0200
@@ -1,3 +1,12 @@
+nfs-utils (1:1.2.8-9.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure provide cross flags.
+    + Remove pre-built object files.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Sat, 03 Sep 2016 22:26:25 +0200
+
 nfs-utils (1:1.2.8-9.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru nfs-utils-1.2.8/debian/rules nfs-utils-1.2.8/debian/rules
--- nfs-utils-1.2.8/debian/rules	2016-06-27 23:13:41.000000000 +0200
+++ nfs-utils-1.2.8/debian/rules	2016-09-03 22:35:23.000000000 +0200
@@ -24,8 +24,7 @@
 build-stamp:
 	dh_testdir
 	dh_autoreconf
-	CFLAGS="$(CFLAGS)" ./configure \
-		--mandir='$${prefix}/share/man' \
+	CFLAGS="$(CFLAGS)" dh_auto_configure -- \
 		--enable-nfsv41 \
 		--enable-ipv6 \
 		--enable-libmount-mount \
@@ -41,6 +40,7 @@
 	[ ! -f Makefile ] || $(MAKE) distclean
 	dh_autoreconf_clean
 	dh_clean
+	find . -name "*.o" -delete
 
 binary-indep: build
 binary-arch: build

Reply to: