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

Bug#843695: pnm2ppa FTCBFS: 00_use_env_buildflags.patch causes build tools to be compiled with the host arch compiler



Source: pnm2ppa
Version: 1.13-7
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

pnm2ppa fails to cross build from source, because it compiles the build
tool make_hash_ink with the host architecture compiler and then fails
executing it. The cause for this is 00_use_env_buildflags.patch, which
reverts upstream's careful choice of the build architecture compiler.
Reverting 00_use_env_buildflags.patch makes the package cross build.

The goal of that patch is beyond my understanding. The make_hash_ink is
not installed into any package, so it does not matter what build flags
are used. If you really want to force build flags for that tool, you can
use:

export CFLAGS_FOR_BUILD=$(shell dpkg-architecture -a$(DEB_BUILD_ARCH) -c dpkg-buildflags --get CFLAGS)

Please consider applying the attached patch (i.e. reverting
00_use_env_buildflags.patch).

Helmut
diff --minimal -Nru pnm2ppa-1.13/debian/changelog pnm2ppa-1.13/debian/changelog
--- pnm2ppa-1.13/debian/changelog	2016-02-26 17:23:49.000000000 +0100
+++ pnm2ppa-1.13/debian/changelog	2016-11-08 20:31:41.000000000 +0100
@@ -1,3 +1,10 @@
+pnm2ppa (1.13-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Revert 00_use_env_buildflags.patch (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de>  Tue, 08 Nov 2016 20:31:41 +0100
+
 pnm2ppa (1.13-7) unstable; urgency=medium
 
   * Add patch to remove CPP timestamps usage, for reproducibility
diff --minimal -Nru pnm2ppa-1.13/debian/patches/00_use_env_buildflags.patch pnm2ppa-1.13/debian/patches/00_use_env_buildflags.patch
--- pnm2ppa-1.13/debian/patches/00_use_env_buildflags.patch	2014-03-06 14:58:37.000000000 +0100
+++ pnm2ppa-1.13/debian/patches/00_use_env_buildflags.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-Description: Build make_hash_ink natively, hence use the buildflags
-Author: Didier Raboud <odyx@debian.org>
-Last-Update: 2014-03-06
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -128,5 +128,5 @@
- LDFLAGS_FOR_BUILD =
- LDLIBS_FOR_BUILD =
- 
--make_hash_ink: make_hash_ink.c
--	$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $< $(LDLIBS_FOR_BUILD)
-+noinst_PROGRAMS = make_hash_ink
-+make_hash_ink_SOURCES = make_hash_ink.c
diff --minimal -Nru pnm2ppa-1.13/debian/patches/series pnm2ppa-1.13/debian/patches/series
--- pnm2ppa-1.13/debian/patches/series	2016-02-26 17:19:35.000000000 +0100
+++ pnm2ppa-1.13/debian/patches/series	2016-11-08 20:31:38.000000000 +0100
@@ -1,4 +1,3 @@
-00_use_env_buildflags.patch
 10_177295-fix_signedness.patch
 99-examples_shbangs.patch
 99-pnm2ppa_manpage.patch

Reply to: