Buildds always take the first dependency that isn't _explicitly_ marked as not for their architecture: the build will fail if the first alternative doesn't exist, even if one of the others does. (Example: https://buildd.debian.org/status/fetch.php?pkg=visp&arch=powerpc&ver=2.8.0-3&stamp=1380322503) $ diff -up debian/control_orig debian/control --- debian/control_orig 2013-10-17 17:37:14.876687413 +0100 +++ debian/control 2013-10-17 17:37:03.016687763 +0100 @@ -10,7 +10,7 @@ Vcs-Git: git://anonscm.debian.org/pkg-ga Build-Depends: debhelper (>= 9~), dpkg-dev (>= 1.16.1~), cmake (>= 2.8.0), - g++ (>= 4:4.8.0) | g++-4.8, + g++-4.8 [powerpc sparc] | g++ (>= 4:4.8.0) [mips mipsel powerpc sparc], pkg-config, libboost1.54-dev, libboost-atomic1.54-dev, Make the gcc version check the right way round (ifneq (,$(findstring means if nonempty, i.e. if the string _is_ found), accept future versions, and only do it on architectures that require it. $ diff -up debian/rules_orig debian/rules --- debian/rules_orig 2013-10-17 17:38:26.724685290 +0100 +++ debian/rules 2013-10-17 18:15:26.360619707 +0100 @@ -22,12 +22,13 @@ endif # see #725143, some architectures fail to build because they lack # "__sync_fetch_and_add_8", need to link with libatomic (since ~rc2 done -# upstrema) and depend on the version provided by GCC >= 4.8 -ifneq (,$(findstring $(shell g++ --version),"4.8")) +# upstream) and depend on the version provided by GCC >= 4.8 +ifneq (,$(findstring $(DEB_HOST_ARCH) , mips mipsel powerpc sparc )) +ifneq (,$(findstring $(shell dpkg --compare-versions `g++ -dumpversion` ge 4.8 || echo old),old)) export CXX := g++-4.8 export CC := gcc-4.8 endif - +endif DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
Also, your (debian/rules) gcc version check is the wrong way round, and
the buildds always use the first alternative build-dep (failing if it
doesn't exist) unless you use an explicit architecture tag
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614807); fix attached.
- Bug#725143: unbuildable on some archs Rebecca N. Palmer
- Bug#725143: unbuildable on some archs Rebecca N. Palmer
- Bug#725143: unbuildable on some arc... Manuel A. Fernandez Montecelo
- Bug#725143: unbuildable on some... Rebecca N. Palmer