Bug#900200: ace-of-penguins FTCBFS: uses the build architecture compiler
Helmut Grohne
helmut at subdivi.de
Sun May 27 15:18:03 BST 2018
Source: ace-of-penguins
Version: 1.5~rc2-2
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap
ace-of-penguins fails to cross build from source, because it uses the
build architecture compiler. It's actually the debian packaging that
forces CC as a build architecture compiler, because it uses the makefile
$(CC) default for setting its own $(cc). Including dpkg's buildtools.mk
slightly improves that, but now BUILD_CC also contains a cross compiler.
We must not use $(cc) for BUILD_CC. The attached patch simply passes
CC_FOR_BUILD (set up by buildtools.mk) without any CFLAGS or the like,
because these flags end up not influencing the resulting binary package.
Finally, I got a linker error for -lpng and -lz (for the build
architecture). After adding the missing build dependencies,
ace-of-penguins finally cross builds. Please consider applying the
attached patch.
Helmut
-------------- next part --------------
diff --minimal -Nru ace-of-penguins-1.5~rc2/debian/changelog ace-of-penguins-1.5~rc2/debian/changelog
--- ace-of-penguins-1.5~rc2/debian/changelog 2018-03-02 21:53:00.000000000 +0100
+++ ace-of-penguins-1.5~rc2/debian/changelog 2018-05-27 15:28:04.000000000 +0200
@@ -1,3 +1,12 @@
+ace-of-penguins (1.5~rc2-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTCBFS: (Closes: #-1)
+ + Pass a cross compiler for CC, but not BUILD_CC.
+ + Missing Build-Depends: libpng-dev:native, zlib1g-dev:native.
+
+ -- Helmut Grohne <helmut at subdivi.de> Sun, 27 May 2018 15:28:04 +0200
+
ace-of-penguins (1.5~rc2-2) unstable; urgency=medium
* Use compat level 11.
diff --minimal -Nru ace-of-penguins-1.5~rc2/debian/control ace-of-penguins-1.5~rc2/debian/control
--- ace-of-penguins-1.5~rc2/debian/control 2018-03-02 21:53:00.000000000 +0100
+++ ace-of-penguins-1.5~rc2/debian/control 2018-05-27 15:28:04.000000000 +0200
@@ -7,8 +7,10 @@
Build-Depends:
debhelper (>= 11),
libpng-dev,
+ libpng-dev:native,
libx11-dev,
- zlib1g-dev
+ zlib1g-dev,
+ zlib1g-dev:native
Standards-Version: 4.1.3
Vcs-Git: https://anonscm.debian.org/git/pkg-games/ace-of-penguins.git
Vcs-Browser: https://anonscm.debian.org/git/pkg-games/ace-of-penguins.git
diff --minimal -Nru ace-of-penguins-1.5~rc2/debian/rules ace-of-penguins-1.5~rc2/debian/rules
--- ace-of-penguins-1.5~rc2/debian/rules 2018-03-02 21:53:00.000000000 +0100
+++ ace-of-penguins-1.5~rc2/debian/rules 2018-05-27 15:28:04.000000000 +0200
@@ -1,5 +1,8 @@
#!/usr/bin/make -f
+-include /usr/share/dpkg/buildtools.mk
+CC_FOR_BUILD ?= $(CC)
+
PACKAGE = ace-of-penguins
PRGPREFIX = ace-
ICON_NAME = ace.png
@@ -42,7 +45,7 @@
CC="$(cc)" dh_auto_configure -- $(CONFFLAGS)
override_dh_auto_build: build-man
- dh_auto_build -- CC="$(cc)" BUILD_CC="$(cc)"
+ dh_auto_build -- CC="$(cc)" BUILD_CC="$(CC_FOR_BUILD)"
test:
# target: test
More information about the Pkg-games-devel
mailing list