[Debichem-devel] Bug#941297: libmsnumpress FTCBFS: debian/rules hard codes the build architecture compiler

Helmut Grohne helmut at subdivi.de
Sat Sep 28 08:43:27 BST 2019


Source: libmsnumpress
Version: 1.0.0-5
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

libmsnumpress fails to cross build from source, because debian/rules
hard codes plain g++. The easiest way of using cross compilers is
letting dpkg's buildtools.mk supply them. Please consider applying the
attached patch.

Helmut
-------------- next part --------------
diff --minimal -Nru libmsnumpress-1.0.0/debian/changelog libmsnumpress-1.0.0/debian/changelog
--- libmsnumpress-1.0.0/debian/changelog	2019-03-07 16:38:58.000000000 +0100
+++ libmsnumpress-1.0.0/debian/changelog	2019-09-27 22:47:39.000000000 +0200
@@ -1,3 +1,10 @@
+libmsnumpress (1.0.0-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dpkg's buildtools.mk supply the compiler. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Fri, 27 Sep 2019 22:47:39 +0200
+
 libmsnumpress (1.0.0-5) unstable; urgency=low
 
   * Fix the mis-named qt compressed help file and add the QCH file to the doc
diff --minimal -Nru libmsnumpress-1.0.0/debian/rules libmsnumpress-1.0.0/debian/rules
--- libmsnumpress-1.0.0/debian/rules	2018-01-10 18:03:08.000000000 +0100
+++ libmsnumpress-1.0.0/debian/rules	2019-09-27 22:47:39.000000000 +0200
@@ -4,6 +4,7 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 #export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+-include /usr/share/dpkg/buildtools.mk
 
 SOVER = 1
 RELVER = $(SOVER).0.0
@@ -27,7 +28,7 @@
 # The $(CFLAGS) and $(LDFLAGS) are required below to account 
 # for the hardening flags as set above.
 override_dh_auto_build: manpage
-	cd src/main/cpp && g++ $(CFLAGS) -shared -fPIC -g -c MSNumpress.cpp -o MSNumpress.o && g++ $(LDFLAGS) -shared -fPIC -g -o libmsnumpress.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmsnumpress.so.$(SOVER) MSNumpress.o && ln -sf libmsnumpress.so.$(RELVER) libmsnumpress.so.$(SOVER) && ln -sf libmsnumpress.so.$(SOVER) libmsnumpress.so
+	cd src/main/cpp && $(CXX) $(CFLAGS) -shared -fPIC -g -c MSNumpress.cpp -o MSNumpress.o && $(CXX) $(LDFLAGS) -shared -fPIC -g -o libmsnumpress.so.$(RELVER) -Wl,-z,relro -Wl,-soname,libmsnumpress.so.$(SOVER) MSNumpress.o && ln -sf libmsnumpress.so.$(RELVER) libmsnumpress.so.$(SOVER) && ln -sf libmsnumpress.so.$(SOVER) libmsnumpress.so
 	mkdir -p debian/build && doxygen debian/Doxyfile
 	find debian/build/doxygen/html -name "*.md5" | xargs rm -f
 	find debian/build/doxygen/html -name "*.map" | xargs rm -f


More information about the Debichem-devel mailing list