Re: (solved, I think) Re: openjdk build failures on "nm"
Date: Tue, 16 Sep 2025 21:31:33 UTC
Van: Harald Eilertsen <haraldei@anduin.net> Datum: dinsdag, 16 september 2025 13:33 Aan: Ronald Klop <ronald-lists@klop.ws> CC: java@freebsd.org Onderwerp: Re: (solved, I think) Re: openjdk build failures on "nm" > > 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 > > > Hi Harald, Thanks for the tip. I just found the documentation of --with-num-cores in doc/building.md. I think that is what we need. It makes it possible to set an upper limit on the number of parallel jobs and lets configure still calculate the balance with the amount of memory available. I'm curious what the pkg build cluster does tomorrow morning. This morning the relevant pkg builds (like 142amd64-default) crashed before any pkg was build. Unfortunately I'm not at EuroBSDCon this year. I have been there in previous editions. Lots of fun 👍 Regards, Ronald.