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.
This commit is contained in:
Harmen Stoppels 2023-05-04 17:50:00 +02:00 committed by GitHub
parent 86d3bad1e0
commit a5300b5726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -281,6 +281,12 @@ def configure(self, spec, prefix):
if sys.platform == "win32": if sys.platform == "win32":
return return
configure = Executable("./Configure") 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()) configure(*self.configure_args())
def build(self, spec, prefix): def build(self, spec, prefix):