On Thu, 28 May 2026 00:34:49 GMT, Mikael Vidstedt <[email protected]> wrote:

> ### Background (from JBS)
> 
> The devkit creation makefiles under make/devkit have been more or less 
> untouched since they were first introduced. While they have served us well 
> there are some key challenges which are slowly becoming more urgent to 
> address.
> 
> One such issue relates to the logic for creating the sysroot. Currently, it 
> is implemented using wget with a set of pattern to download packages directly 
> from the upstream yum repo. One problem with this is that it will download 
> all packages which happen to match the pattern, no matter if those packages 
> are actually needed or not. More problematically though, using wget like this 
> does not (necessarily) work for more recent linux distribution 
> versions/repositories.
> 
> The dnf tool is the native solution for downloading packages, including 
> dependencies etc.
> 
> The sysroot logic could also benefit from being split out into its own file, 
> making the fairly involved Tools.gmk slightly less complex.
> 
> A secondary goal of this cleanup is to make it possible to reuse the logic 
> (especially the sysroot logic) for creating devkit equivalents for building 
> project Detroit.
> 
> ### About the change
> 
> The goal of this change was, initially, to change the sysroot logic to use 
> dnf. In making the required changes I relatively quickly I realized that the 
> Tools.gmk file was long overdue for cleanup. I chose to split out the sysroot 
> logic to a separate file but couldn't resist making some fairly significant, 
> (_mostly_) cosmetic changes to Tools.gmk while at it, moving it closer to the 
> general style of the JDK build system. That said, a lot of the logic in 
> Tools.gmk remains "old-style" even after this change.
> 
> Some specific things worth highlighting:
> 
> - I've tried to adjust formatting to closer match the JDK build system style, 
> but I'm sure there are places/cases where it's off.
> - I updated versions and URLs to reflect the latest reality, and adjusted the 
> documentation in Makefile accordingly.
> - To avoid having to call the Sysroot.gmk file twice (first to download 
> packages and then to create the actual sysroot) I updated the logic to not 
> depend on parse time globing. Specifically, what used to be `RPM_FILE_LIST` 
> is now handled in the recipe instead.
> - I fixed some missing dependencies which were most likely not actual 
> problems, unless running with parallelism (which is not needed - Tools.gmk 
> sets BUILDPAR where relevant). Even with these fixes parallelism is unlikely 
> to work well.
> - I dropped some packages which no longer exist (assuming ...

This PR seems to be overwrapped with #31227. How should I treat #31227? I can 
close it if this PR can cover the problem in it.

I've created PR #31227 for fixing the problem on x64. I saw the error which 
related to multilib when I built devkit on Rocky Linux and Fedora, but this PR 
does not seem to fix it (`--disable-multilib` is not specified specified for 
GCC).

In #31227, @erikj79 commented he will discuss about it internally, thus I guess 
the direction of fixing should follow that conclusion.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/31303#issuecomment-4569528323

Reply via email to