Bug#881341: webkit2gtk FTCBFS: debian/rules confuses build and host

Helmut Grohne helmut at subdivi.de
Fri Nov 10 14:49:58 UTC 2017


Source: webkit2gtk
Version: 2.18.2-1
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

webkit2gtk fails to cross build from source for a significant number of
reasons. One of those reasons is that debian/rules confuses build and
host. "build" is the machine type you are building on and host is the
one you are building for. Yet, debian/rules determines flags based on
the build architecture. Building e.g. for armhf on amd64 fails to find
gstreamer-gl-1.0, because the build-depends annotate the relevant
dependency with !armhf. Switching to the proper flags fixes this aspect,
but doesn't make webkit2gtk cross build. Please consider applying the
attached patch and closing this bug when doing so.

Helmut
-------------- next part --------------
diff --minimal -Nru webkit2gtk-2.18.2/debian/changelog webkit2gtk-2.18.2/debian/changelog
--- webkit2gtk-2.18.2/debian/changelog	2017-10-27 15:05:15.000000000 +0200
+++ webkit2gtk-2.18.2/debian/changelog	2017-11-09 17:26:34.000000000 +0100
@@ -1,3 +1,10 @@
+webkit2gtk (2.18.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix confusion of build and host in debian/rules. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Thu, 09 Nov 2017 17:26:34 +0100
+
 webkit2gtk (2.18.2-1) unstable; urgency=medium
 
   * New upstream release.
diff --minimal -Nru webkit2gtk-2.18.2/debian/rules webkit2gtk-2.18.2/debian/rules
--- webkit2gtk-2.18.2/debian/rules	2017-10-27 15:05:15.000000000 +0200
+++ webkit2gtk-2.18.2/debian/rules	2017-11-09 17:26:34.000000000 +0100
@@ -2,9 +2,7 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
-DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
 
 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) -Wall
 CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
@@ -20,23 +18,23 @@
 	LDFLAGS += -Wl,--no-keep-memory
 endif
 
-ifeq ($(DEB_BUILD_ARCH),alpha)
+ifeq ($(DEB_HOST_ARCH),alpha)
 	LDFLAGS += -Wl,--no-relax
 endif
 
 # The debug packages produced by webkit are huge and cause problems in
 # most buildds, so use -g1 in all architectures except the ones that
 # are known to work fine
-ifeq (,$(filter $(DEB_BUILD_ARCH),amd64 ppc64 ppc64el))
+ifeq (,$(filter $(DEB_HOST_ARCH),amd64 ppc64 ppc64el))
 	CFLAGS := $(CFLAGS:-g=-g1)
 endif
 
-ifeq (,$(filter $(DEB_BUILD_ARCH),i386 amd64 hurd-i386 kfreebsd-i386 kfreebsd-amd64 armhf arm64))
+ifeq (,$(filter $(DEB_HOST_ARCH),i386 amd64 hurd-i386 kfreebsd-i386 kfreebsd-amd64 armhf arm64))
 	EXTRA_CMAKE_ARGUMENTS += -DENABLE_JIT=OFF
 endif
 
 # https://bugs.webkit.org/show_bug.cgi?id=175127
-ifneq (,$(filter $(DEB_BUILD_ARCH),armel armhf sparc64 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
+ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf sparc64 hurd-i386 kfreebsd-i386 kfreebsd-amd64))
 	EXTRA_CMAKE_ARGUMENTS += -DUSE_GSTREAMER_GL=OFF
 endif
 


More information about the Pkg-webkit-maintainers mailing list