summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2023-05-04 17:50:00 +0200
committerGitHub <noreply@github.com>2023-05-04 17:50:00 +0200
commita5300b57260d5421a866b9e14e4ee6ece36a315d (patch)
tree4ea37d4758c753b9ca88da8ff894bacd5e81352b /var
parent86d3bad1e05140398f6e19919de38928f3d0c484 (diff)
downloadspack-a5300b57260d5421a866b9e14e4ee6ece36a315d.tar.gz
spack-a5300b57260d5421a866b9e14e4ee6ece36a315d.tar.bz2
spack-a5300b57260d5421a866b9e14e4ee6ece36a315d.tar.xz
spack-a5300b57260d5421a866b9e14e4ee6ece36a315d.zip
perl: fix jobserver job issue (#37428)
When building perl with posix jobserver, it seems to eat jobs, which reduces parallelism to 1 in many cases, and is rather annoying. This is solved in GNU Make 4.4 (fifo is more stable than file descriptors), but that version is typically not available. So, fix this issue by simply unsetting MAKEFLAGS for the duration of ./Configure. That's enough, and the build phase runs perfectly in parallel again.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index 56276cbacd..b3e0c7b6f9 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -281,6 +281,12 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
if sys.platform == "win32":
return
configure = Executable("./Configure")
+ # The Configure script plays with file descriptors and runs make towards the end,
+ # which results in job tokens not being released under the make jobserver. So, we
+ # disable the jobserver here, and let the Configure script execute make
+ # sequentially. There is barely any parallelism anyway; the most parallelism is
+ # in the build phase, in which the jobserver is enabled again, since we invoke make.
+ configure.add_default_env("MAKEFLAGS", "")
configure(*self.configure_args())
def build(self, spec, prefix):