Re: (solved, I think) Re: openjdk build failures on "nm"

From: Harald Eilertsen <haraldei_at_anduin.net>
Date: Tue, 16 Sep 2025 11:33:26 UTC
Hi Ronald,

On Mon, Sep 15, 2025 at 10:14:59AM +0200, Ronald Klop wrote:
> The current construction in openjdk17 handles MAKE_JOBS_NUMBER
> properly. And with that also the MAKE_JOBS_UNSAFE variable. After more
> testing we can use this blueprint in other openjdk ports.
> Also in openjdk23 and -24. They don't have flapping builds but can
> improve handling of MAKE_JOBS_NUMBER.

Nice finds! I don't really have a strong opinion either way, but think
it should probably be selectable whether to use (and how many) parallel
jobs to run. I'm curious if there has been problems with this number of
parallel jobs for other platforms as well. I'll try to ask around a bit.

The OpenJDK build process does, as you say, determine how many jobs to
spawn on it's own, based on available CPU cores and memory. Having the
port Makefile trying to parallelize that further would get in the way of
this, so we set MAKE_JOBS_UNSAFE to prevent it. As I understand it, this
should not prevent the OpenJDK build system to spawn parallel jobs.

In addition to setting the --with-jobs config parameter, it's possible
to tune this with the --with-num-cores and --with-memory-size to limit
the number of jobs to not occupy the whole capacity of the machine.

It would be interesting to know if there's any difference if we clamp
number of cores it's allowed to use to f.ex. 16 or something.

Will you be at EuroBSDCon or the FreeBSD dev summit? Could be
interesting to dig into these things a bit there with some of the
experts on the port system available too.

Take care!
Harald