On Thu, Nov 02, 2017 at 09:42:12PM +0530, Kartik Mistry wrote: > Thanks for the patch!
Thanks for looking into it so quickly. > With this patch, xosview fails to build on amd64. I have not yet look > into details yet. And sorry for sending a broken patch and taking that long to reply. :-( The key issue here is that the upstream Makefile determines ARCH as $(uname -m) and that yields x86_64 for amd64, but I was passing amd64. After fixing that I can build it for amd64 and also verified that it builds for arm64, armel, armhf, mips64el, powerpc, powerpcel and s390x. I'm employing a sort of make-variable dictionary here: ARCH_MAP_amd64 = x86_64 ARCH = $(or $(ARCH_MAP_$(DEB_HOST_ARCH_CPU)),$(DEB_HOST_ARCH_CPU)) In the updated patch, I also applied it to the PLATFORM variable for consistency and shrinking the code. I hope that this works for you. Otherwise do: ifeq ($(DEB_HOST_ARCH_CPU),amd64) ARCH = amd64 else ARCH = $(DEB_HOST_ARCH_CPU) endif Helmut
diff --minimal -Nru xosview-1.19/debian/changelog xosview-1.19/debian/changelog --- xosview-1.19/debian/changelog 2016-12-10 14:15:30.000000000 +0100 +++ xosview-1.19/debian/changelog 2017-10-27 06:31:37.000000000 +0200 @@ -1,3 +1,13 @@ +xosview (1.19-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross compilers to make. + + Fix build/host confusion. + + Also pass ARCH= to make. + + -- Helmut Grohne <hel...@subdivi.de> Fri, 27 Oct 2017 06:31:37 +0200 + xosview (1.19-1) unstable; urgency=low * New upstream release. diff --minimal -Nru xosview-1.19/debian/rules xosview-1.19/debian/rules --- xosview-1.19/debian/rules 2016-06-30 07:39:12.000000000 +0200 +++ xosview-1.19/debian/rules 2017-10-27 06:31:37.000000000 +0200 @@ -4,27 +4,28 @@ #export DH_VERBOSE=1 DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildflags.mk CXX=g++ -DEB_BUILD_ARCH_OS ?=$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) -ifeq ($(DEB_BUILD_ARCH_OS),linux) - PLATFORM=linux -else ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd) - PLATFORM=bsd -else ifeq ($(DEB_BUILD_ARCH_OS),hurd) - PLATFORM=gnu -else - $(error Missing implementation for $(DEB_BUILD_ARCH_OS)) +PLATFORM_MAP_linux = linux +PLATFORM_MAP_kfreebsd = bsd +PLATFORM_MAP_hurd = gnu +PLATFORM = $(PLATFORM_MAP_$(DEB_HOST_ARCH_OS)) +ifeq ($(PLATFORM),) + $(error Missing implementation for $(DEB_HOST_ARCH_OS)) endif +ARCH_MAP_amd64 = x86_64 +ARCH = $(or $(ARCH_MAP_$(DEB_HOST_ARCH_CPU)),$(DEB_HOST_ARCH_CPU)) + build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir - $(MAKE) PLATFORM=$(PLATFORM) + dh_auto_build -- PLATFORM=$(PLATFORM) ARCH=$(ARCH) touch $@ clean: