[mlpack] 03/04: save space under some circumstances

Barak A. Pearlmutter barak+git at pearlmutter.net
Mon Nov 28 17:20:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit 8916358a132affaec897d8f722010664ac61d177
Author: Barak A. Pearlmutter <barak+git at pearlmutter.net>
Date:   Mon Nov 28 16:50:32 2016 +0000

    save space under some circumstances
---
 debian/rules | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index e7c295d..70d55bb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,8 +4,39 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+## Memory consumption issues on some autobuilders have been causing
+## build failures.  There are two ways to address such issues:
+## (a) reduce parallelism, e.g., dh $@ --max-parallel=2
+## (b) reduce GCC memory usage, e.g., g++ --param ggc-min-expand=20 to
+## reduce abrupt memory spikes, and g++ -g0 to skip debugging info.
+
+## These issues have occurred post-2.1.x in two places: Ubuntu
+## Launchpad, and some particular Debian architectures including
+## armhf, mips, mipsel, m68k, kfreebsd-amd64, kfreebsd-i386.
+
+## For that reason, I am activating all of the above space-reduction
+## mechanisms on Ubuntu, all 32-bit architectures, and all kfreebsd
+## systems.
+
+ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
+SAVE_SPACE=yes
+endif
+
+ifeq ($(shell dpkg-architecture --query DEB_BUILD_ARCH_BITS),32)
+SAVE_SPACE=yes
+endif
+
+ifeq ($(shell dpkg-architecture --query DEB_BUILD_ARCH_OS),kfreebsd)
+SAVE_SPACE=yes
+endif
+
+ifeq ($(SAVE_SPACE),yes)
+export CXX=g++ --param ggc-min-expand=20 -g0
+DH_FLAGS += --max-parallel=2
+endif
+
 %:
-	dh $@
+	dh $@ ${DH_FLAGS}
 
 override_dh_auto_build:
 	dh_auto_build

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list