Created attachment 251038 [details] Patch the linking code, disable a troublesome compiler warning It is somewhat disheartening, how easily port-maintainers give up upon encountering problems with the base compiler -- and make a custom compiler a requirement instead... openjdk11 currently requires an LLVM -- of version 12 -- and this PR seeks to fix that. The proposal adds a patch, which was once part of the opendjk17 port back in (see Bug 274109). This fixes the problem with the linking. Separately, the now-fatal compiler warning is explicitly disabled -- so the code compiles. It also places the custom CFLAGS, CXXFLAGS, and LDFLAGS into the CONFIGURE_ARGS (as the JDK maintainers want).
A patch which removed usage of llvm12 was committed in ports 08cc50220f1d71f12d13d7e2c957a5679b02914d. The port is compiled by llvm from base for a while now. Can this issue be closed?
(In reply to Ronald Klop from comment #1) > Can this issue be closed? The commit does not reference this ticket, and the changes don't include all of the things I provided. In particular, the CFLAGS, CXXFLAGS, and LDFLAGS still aren't passed to configure...
(In reply to Mikhail T. from comment #2) Update subject of the PR, update patch. Maintainer timeout already reached - I'll commit it.
Created attachment 253259 [details] Respect compiler and linker flags (In reply to Vladimir Druzenko from comment #3) > Update subject of the PR, update patch. Here it is. In addition to setting the compiler and linker flags, the patch disables precompiled headers whenever gcc is used -- not just on powerpc64. Without this, I was getting PCH-error from g++12 on my amd64 machine too. I _suspect_, it is currently set on powerpc64, because gcc is the only compiler there, but I have no access to a powerpc64-machine to test :(
Maybe create same for all java/openjdk*?
(In reply to Vladimir Druzenko from comment #5) > Maybe create same for all java/openjdk*? That really is the job of java@, is not it? :-)
(In reply to Mikhail T. from comment #6) I don't see them being active. Who is in this group anyway?
(In reply to Vladimir Druzenko from comment #7) See: https://wiki.freebsd.org/Java I don't know how active the group is nowadays. But things are not a "job of java@". It is a lot of voluntary work. The mechanism is to create a good patch and notify the maintainer of a port. After two weeks the patch can be committed by somebody else stating 'maintainer timeout' (this is documented somewhere). About 'doing this for java/openjdk*', I would advice to first commit this patch. Then create a new patch for the other JDKs. Possible using a new issue. So this will not transform in a lingering project with a bigger and bigger scope. In the meantime we can learn from feedback on this change while rolling it out on the other JDK ports. This is how I roll out changes in my mongodb* ports. But, that is just my opinion. Cheers.
> The mechanism is to create a good patch and notify the maintainer of a port. After two weeks the patch can be committed by somebody else stating 'maintainer timeout' (this is documented somewhere). You describe, how things should be, but they aren't. This PR is over 3 months old... Some of the changes I initially proposed were made independently, the committer evidently not even aware of this PR. Something is broken in our system -- something, portmgr@ should be fixing, in my not so humble opinion. > After two weeks the patch can be committed by somebody else stating 'maintainer timeout' Yes, I've done "maintainer timeout" commits too. But I cannot any more, because portmgr@ took away my commit-bit. > I would advice to first commit this patch. Full agreement here.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e3120f0ac06e578482a669fe51fb65fb2bcb6619 commit e3120f0ac06e578482a669fe51fb65fb2bcb6619 Author: Mikhail T. <freebsd-2024@virtual-estates.net> AuthorDate: 2024-09-09 07:50:21 +0000 Commit: Ronald Klop <ronald@FreeBSD.org> CommitDate: 2024-09-10 11:34:53 +0000 java/openjdk11: respect compiler and linker flags pass CFLAGS, CXXFLAGS and LDFLAGS to the build This enables more easily testing different build options. fix build on gcc by passing --disable-precompiled-headers not only on powerpc64 "Without this, I was getting PCH-error from g++12 on my amd64 machine too." PR: 279367 Tested by: poudriere Approved by: maintainer timeout (java@) java/openjdk11/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
Committed. Thanks for your patch.