Control: tag -1 patch confirmed

On Wed, Feb 16, 2022 at 12:57:11PM +0100, gypt...@gyptazy.ch wrote:
 
> I can confirm this issue when rebuilding Perl on powerful systems. Multiple 
> builds of ‚generate_uudmap.o‘ are
> created during the compile time and at some point it fails with:
> 
>     make -j88 […]
>     ./generate_uudmap uudmap.h bitcount.h mg_data.h
>     6584make[3]: ./generate_uudmap: Text file busy
>     6585make[3]: *** [Makefile:329: bitcount.h] Error 127
> 
> As a result, I patched the ‚rules‘ file to run ‚dh_auto_build‘ with 
> ‚--no-parallel‘ option.

Thanks.

This seems to be a build system corner case that only happens when the
Configure run is split in two with -E and -S, which we do for the benefit
of cross builds.

I think it can be fixed by injecting a 'make depend' call at the end of
debian/config.debian, mimicking what Configure does when run "normally"
with -e. That would be preferrable to the dh --no-parallel workaround
as it would not slow the builds.

Could you please try if the attached patch fixes it?
-- 
Niko Tyni   nt...@debian.org
>From 26b11231d66447ae0ed0d3ba032ae1b0523a26c0 Mon Sep 17 00:00:00 2001
From: Niko Tyni <nt...@debian.org>
Date: Tue, 1 Mar 2022 21:17:00 +0200
Subject: [PATCH] Fix massively parallel builds by first making depend

This is what Configure does at the end when run "normally" with -e.

The Makefile dependencies are not quite robust for parallel builds if
generate_uudmap is not pre-built (which happens during the 'make depend'
phase.)

Closes: #996953
---
 debian/config.debian | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/config.debian b/debian/config.debian
index e27858c07..7afc379e7 100644
--- a/debian/config.debian
+++ b/debian/config.debian
@@ -242,6 +242,9 @@ fi
 # now continue with extracting Makefile et al.
 /bin/bash ./Configure -S $crossargs
 
+# mimic what 'Configure -e' does, unbreaking parallel builds (#996953)
+make depend
+
 # append PERL_BUILD_DATE before the last #endif in config.h
 # massive quoting problems prevent passing this to Configure
 sed -i "\$i #define PERL_BUILD_DATE \"$PERL_BUILD_DATE\"" config.h
-- 
2.30.2

Reply via email to