Port of the OpenJDK 24 release branch for FreeBSD.
Details
- Reviewers
emaste jrm glewis - Commits
- R11:a7a4c323f320: java/openjdk24: Add port
Run Jtreg and gtest on amd and aarch64, as well as running server and GUI java programs.
Diff Detail
- Repository
- R11 FreeBSD ports repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This port is based on my own clone of the openjdk/jdk repo, as there's no bsd openjdk branch or repo from battleblow yet. I'm hoping we can move to battleblow before release.
Also it works and passes most of the tests on amd64, but needs some more work to build on aarch64. I'll be working on that while this is being reviewed. It should not affect the port itseld apart from updating the tag and distinfo.
This is pretty much just a copy of the port for openjdk23, so hopefully nothing too controversial :)
Is there a reason not to apply (some of) the patches in the repo directly?
java/openjdk24/Makefile | ||
---|---|---|
14–21 | If it's failing for i386 on all branches I'd recommend we just take i386 out of ONLY_FOR_ARCHS. | |
43 | We should be able to create a jdk project under freebsd. That could happen before or after adding the port. |
The PPC one could probably be applied to the base repo. I'll look into it. The others seem to be to be about making the build modifiable by the port system, so I don't see that these changes belong in the repo as they are now. We could try to move these changes properly into params to the configure scripts instead.
java/openjdk24/Makefile | ||
---|---|---|
14–21 | I need to test that, for now I just copied the Makefile from OpenJDK 23. i386-support is in any case being removed in OpenJDK 25. | |
43 | I'd really like if we could do that before submitting this port. I'll nag you on Monday about it :) |
In general I've tried to upstream patches where they are relevant to the port in general (e.g. patch-make_autoconf_flags-cflags.m4 would fit in that category) while not upstreaming things which are specific to the FreeBSD ports system. In that sense I'm aligned with Harald's response here
java/openjdk24/Makefile | ||
---|---|---|
14–21 | I'd agree with Ed here, there isn't much point leaving i386 in ONLY_FOR_ARCHS when support for it will be dropped upstream in the next LTS release. If someone really wanted i386 support they are welcome to submit a patch that fixes it, but in general I'm betting there are very few people running Java on a 32 bit platform at this point. |
- Changed source repo to freebsd/openjdk.
- Changed release tag to jdk-24-ga-freebsd-1
- Removed i386 as target arch, and added comment.
- Removed broken build lines for i386.
- Fixed build for aarch64 by removing JAVA_TOOL_OPTIONS env var and enabling compressed class pointers.
The Aarch64 build still has some more test failures than the x86_64 build (about 100 vs about 20).
Tomcat seems to run fine for both platforms, but I've only tested it briefly.
It looks good to me.
Some lower-priority points:
- We've discussed stripping vs. not stripping before, but for reference, the policy is to strip binaries and shared libraries. In this case, stripping reduces the size by about 6.5 MB.
- Adding a new port is a good time to check portlint/portclippy/portfmt for useful suggestions. That said, I appreciate the value of keeping formatting close to the other OpenJDK ports. I mention this for completeness.
Adding a new port is a good time to check portlint/portclippy/portfmt for useful suggestions. That said, I appreciate the value of keeping formatting close to the other OpenJDK ports. I mention this for completeness.
IMO consistency is more valuable here; we should address the lint reports, but should do all of the JDK ports together (either do the existing ones first, then commit this with the changes incorporated, or do all of them together after this goes in).
Yeah we discussed this wrt OpenJDK 23 as well, but there was at least some concerns that it would throw off stack traces and make them less useful. I'm having issues with stack traces in any case, so it may not make much difference.
- Adding a new port is a good time to check portlint/portclippy/portfmt for useful suggestions. That said, I appreciate the value of keeping formatting close to the other OpenJDK ports. I mention this for completeness.
Thanks for the reminder. If it improves the readability of the port, I think that would be more useful than the consistency between the versions tbh. I can give it a go after this is merged, and then backport to the others later.
@haraldei_anduin.net, are you good with this commit message?
Author: Harald Eilertsen <haraldei@anduin.net> AuthorDate: 2025-03-25 10:52 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2025-03-28 12:29 java/openjdk24: Add port Release notes: https://openjdk.org/projects/jdk/24/ Reviewed by: emaste, glewis, jrm Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49354
java/openjdk24/pkg-descr | ||
---|---|---|
9 | Should we update this line since i386 is no longer in ONLY_FOR_ARCHS? |
I'm good with the commit message, but let me fix the pkg-descr first :)
java/openjdk24/pkg-descr | ||
---|---|---|
9 | Oh, thanks, yes I think we should. One moment... |