Bug#945162: Build fails on some (Ubuntu) builders due to lack of memory

2019-12-07 Thread Kristian Nielsen
How about this? It uses --max-parallel to limit build to one process per 3
GB of memory:

  
https://salsa.debian.org/knielsen-guest/openscad/commit/3c64461f18762bbc2a1eebefe3c5f8880726791a

This should prevent builds failing due to out-of-memory on small machines,
and still allow most machines to benefit from the great speedup that
parallel build provides.

 - Kristian.



Bug#945162: Build fails on some (Ubuntu) builders due to lack of memory

2019-11-21 Thread Kristian Nielsen
Sebastien Bacher  writes:

> because it uses more memory than available. The attached patch makes it
> build with --no-parallel which workarounds the issue, what would you

Hm, this seems to be the wrong place to put this?

If a build machine has too little memory for a --parallel build of a
package, that is a property of the build machine, not of the package. So
better if the individual build machine sets DEB_BUILD_OPTIONS=parallel=1 or
similar. IIUC, this is how it is done in the Debian build infrastructure.

(A refinement could be if the build machine could set DEB_LOW_MEM_BUILDER or
something that could conditionally disable parallel build on heavy packages.
Such mechanism should be general across packages (not specific to openscad),
not sure if something like that is available).

The patch penalises _every_ build which is bad - building with -jN makes a
huge difference in compile time for openscad, and should work fine on
modern-sized machines.

Also, IIUC, the patch would disable parallel not just for the build but also
for the test run? That would again be bad, the testsuite also benefits
hugely from parallel build, and I do not think parallel test suite requires
a lot of memory.

 - Kristian.



Bug#945162: Build fails on some (Ubuntu) builders due to lack of memory

2019-11-20 Thread Sebastien Bacher
Package: openscad
Version: 2019.05-2

The openscad build is failing on some builders in Ubuntu, it seems to be
because it uses more memory than available. The attached patch makes it
build with --no-parallel which workarounds the issue, what would you
think to apply it to Debian as well (the problem could happen there & it
would allow the package to stay in sync between the distributions)?

Thanks,


diff -Nru openscad-2019.05/debian/changelog openscad-2019.05/debian/changelog
--- openscad-2019.05/debian/changelog	2019-08-06 23:19:39.0 +0200
+++ openscad-2019.05/debian/changelog	2019-11-20 18:11:02.0 +0100
@@ -1,3 +1,11 @@
+openscad (2019.05-3) unstable; urgency=medium
+
+  * debian/rules:
+- build with --no-parallel to workaround builders failing the build
+  due to lack on memory on some architectures
+
+ -- Sebastien Bacher   Wed, 20 Nov 2019 16:01:50 +0100
+
 openscad (2019.05-2) unstable; urgency=medium
 
   * Fix some testsuite failures (Closes: #795300).
diff -Nru openscad-2019.05/debian/rules openscad-2019.05/debian/rules
--- openscad-2019.05/debian/rules	2019-08-06 23:01:34.0 +0200
+++ openscad-2019.05/debian/rules	2019-11-20 16:04:35.0 +0100
@@ -22,7 +22,7 @@
 export QT_SELECT = qt5
 
 %:
-	dh $@ --buildsystem=qmake
+	dh $@ --no-parallel --buildsystem=qmake
 
 override_dh_auto_configure:
 	dh_auto_configure -- \