Subject: [PATCH] gnu: reduce: Forbid parallel builds.

From: Nigko Yerden <[email-masked]>
Date: Sun, 9 Feb 2025 09:35:10 +0500

* gnu/packages/algebra.scm (reduce)[parallel-build?]: New field.

Change-Id: I90af4070cc885b3d788333ff425734804b4667e3
---
Parallel make seems to be broken for this package. See
https://ci.guix.gnu.org/build/9182618/log/raw
https://ci.guix.gnu.org/build/9180049/log/raw
https://ci.guix.gnu.org/build/9186909/log/raw

For example, below we see that make tries to rename the same file
(.deps/scs_private.Tpo) twice:
--------- begin https://ci.guix.gnu.org/build/9182618/log/raw -----------
mv -f .deps/scs_private.Tpo .deps/scs_private.Po
cp /tmp/guix-build-reduce-2024-08-12.drv-0/Reduce-svn6860-src/csl/cslbase/fonts/*.ttf reduce.fonts
mv -f .deps/scs_private.Tpo .deps/scs_private.Po
mv -f .deps/scs2mpfr.Tpo .deps/scs2mpfr.Po
gcc -DHAVE_CONFIG_H -I. -I/tmp/guix-build-reduce-2024-08-12.drv-0/Reduce-svn6860-src/libraries/crlibm/scs_lib -I..  -I/tmp/guix-build-reduce-2024-08-1
2.drv-0/Reduce-svn6860-src/libraries/crlibm -I. -I.. -I/gnu/store/7ah6i5829f5ha6bdfzcj1gf21115xyyd-freetype-2.13.0/include/freetype2   -MT double2scs.
o -MD -MP -MF .deps/double2scs.Tpo -c -o double2scs.o /tmp/guix-build-reduce-2024-08-12.drv-0/Reduce-svn6860-src/libraries/crlibm/scs_lib/double2scs.c
gcc -DHAVE_CONFIG_H -I. -I/tmp/guix-build-reduce-2024-08-12.drv-0/Reduce-svn6860-src/libraries/crlibm/scs_lib -I..  -I/tmp/guix-build-reduce-2024-08-1
2.drv-0/Reduce-svn6860-src/libraries/crlibm -I. -I.. -I/gnu/store/7ah6i5829f5ha6bdfzcj1gf21115xyyd-freetype-2.13.0/include/freetype2   -MT print_scs.o
 -MD -MP -MF .deps/print_scs.Tpo -c -o print_scs.o /tmp/guix-build-reduce-2024-08-12.drv-0/Reduce-svn6860-src/libraries/crlibm/scs_lib/print_scs.c
mv: cannot stat '.deps/scs_private.Tpo': No such file or directory
make[3]: *** [Makefile:448: scs_private.o] Error 1
make[3]: *** Waiting for unfinished jobs....
--------- end https://ci.guix.gnu.org/build/9182618/log/raw -----------

When this package is built via 'guix build -c n' with n < 3 these errors
do not arise.

 gnu/packages/algebra.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index afca739766..9e2ad02fe7 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1920,7 +1920,8 @@ (define-public reduce
                            #:directories? #t))))))
     (build-system gnu-build-system)
     (arguments
-     (list #:configure-flags
+     (list #:parallel-build? #f
+           #:configure-flags
            #~(list "--without-autogen"
                    ;; fix conflict with internal build name determination
                    "--build="

base-commit: dd1f05edab0a375a53bb489173489025498a38cb
-- 
2.47.1