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

Bug#878358: dnprogs FTCBFS: many reasons



Source: dnprogs
Version: 2.65
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

dnprogs fails to cross build from source for many reasons. The packaging
runs plain make without passing any cross toolchain, so it ends up using
the build architecture toolchain. Indirecting that through dh_auto_build
fixes that. Then dapfs/Makefile hard codes the build architecture
compiler g++ and that of course fails processing host architecture
object files. During installation, it passes -s to install, which uses
the build architecture strip and thus fails. After fixing all of the
above, dnprogs cross builds successfully. Please consider applying the
attached patch.

Helmut
diff --minimal -Nru dnprogs-2.65/Makefile.common dnprogs-2.65+nmu1/Makefile.common
--- dnprogs-2.65/Makefile.common	2017-07-06 21:42:10.000000000 +0200
+++ dnprogs-2.65+nmu1/Makefile.common	2017-10-13 06:57:30.000000000 +0200
@@ -157,12 +157,6 @@
 DEPLIBDAP=$(TOP)/libdap/libdnet-dap.so
 endif
 
-ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-STRIPBIN=
-else
-STRIPBIN=-s
-endif
-
 LIBS=$(LIBDAP) $(LIBDNET)
 DEPLIBS=$(DEPLIBDAP) $(DEPLIBDNET)
 
diff --minimal -Nru dnprogs-2.65/dapfs/Makefile dnprogs-2.65+nmu1/dapfs/Makefile
--- dnprogs-2.65/dapfs/Makefile	2011-12-09 15:42:32.000000000 +0100
+++ dnprogs-2.65+nmu1/dapfs/Makefile	2017-10-13 06:57:30.000000000 +0200
@@ -13,7 +13,7 @@
 CFLAGS=-I../include -I ../librms -Wall $(DFLAGS) -fdollars-in-identifiers
 
 $(PROG1): $(PROG1OBJS) $(DEPLIBS)
-	g++ -o$(PROG1) $(LDFLAGS) $(PROG1OBJS) $(LIBDAP) -L../librms -lrms $(LIBDNET) -lfuse -lpthread
+	$(CXX) -o$(PROG1) $(LDFLAGS) $(PROG1OBJS) $(LIBDAP) -L../librms -lrms $(LIBDNET) -lfuse -lpthread
 
 install:
 	install -d $(rootprefix)/sbin
diff --minimal -Nru dnprogs-2.65/debian/changelog dnprogs-2.65+nmu1/debian/changelog
--- dnprogs-2.65/debian/changelog	2017-07-06 21:42:10.000000000 +0200
+++ dnprogs-2.65+nmu1/debian/changelog	2017-10-13 06:57:30.000000000 +0200
@@ -1,3 +1,13 @@
+dnprogs (2.65+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross compilers to make.
+    + Do not hard code g++ in dapfs/Makefile.
+    + Remove -s from install as dh_strip takes care.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Fri, 13 Oct 2017 06:57:30 +0200
+
 dnprogs (2.65) unstable; urgency=low
 
   * QA upload.
diff --minimal -Nru dnprogs-2.65/debian/rules dnprogs-2.65+nmu1/debian/rules
--- dnprogs-2.65/debian/rules	2014-07-28 12:19:45.000000000 +0200
+++ dnprogs-2.65+nmu1/debian/rules	2017-10-13 06:57:27.000000000 +0200
@@ -4,7 +4,7 @@
 
 build:
 	$(checkdir)
-	make prefix=/usr RELEASE=true BUILDING_DEB=true
+	dh_auto_build -- prefix=/usr RELEASE=true BUILDING_DEB=true
 	touch build
 
 build-arch: build

Reply to: