Created attachment 218660 [details] Fix java/openjdk12 build with clang 11 As reported on the freebsd-ports mailing list, java/openjdk1[2-5] do not build with clang 11, which is in 13-CURRENT. For openjdk 12 through 14, this is due to duplicated symbols, and because clang 11 (like gcc 10) defaults to -fno-common now. For openjdk 12 through 15, there is also a problem in the return type of the awt wrapper for the Xlib XSynchronize(3) function: since this returns a pointer, the return type should be a jlong, not a jint. In this bug I will post patches for each of these openjdk versions.
Created attachment 218661 [details] Fix java/openjdk13 build with clang 11
Created attachment 218662 [details] Fix java/openjdk14 build with clang 11
Created attachment 218663 [details] Fix java/openjdk15 build with clang 11
I've only built openjdk12, but the changes are identical for all of them, so this looks good to me. Upstream I've pulled the changes from jdk15 back into 14, 13, and 12. I haven't pulled in the X wrapper changes yet.
(In reply to Greg Lewis from comment #4) > Upstream I've pulled the changes from jdk15 back into 14, 13, and 12. I haven't pulled in the X wrapper changes yet. Thanks!
Is there a reason those patches are not yet committed ?
(In reply to Dimitry Andric from comment #1) This fails make patch on jdk13 -- should this still work ?
(In reply to Kurt Jaeger from comment #7) I haven't checked recently. Since Greg posted in comment 4 "Upstream I've pulled the changes from jdk15 back into 14, 13, and 12", I expect that in the mean time some of the patches have already been applied in the upstream sources.
^Triage: - Needs confirmation of QA (poudriere, for at least freebsd clang versions with >=11 and <11) - Note: build/run/package fixes don't *require* maintainer approval, as they are: Approved by: portmgr (blanket: build fix) MFH: <branch> (blanket: build fix)
@Dimitry Feel free to combine the changesets into a single patch (in addition to the seprate ones) for committer convenience, (if you're not the committer who ends up committing them)
I'll take it.
A commit references this bug: Author: jkim Date: Fri Feb 5 04:04:54 UTC 2021 New revision: 564084 URL: https://svnweb.freebsd.org/changeset/ports/564084 Log: Fix build with Clang 11. https://github.com/battleblow/openjdk-jdk12u/commit/9e8e504992f95cc36c6dcd6e6f57ac18b58e0db5 https://github.com/battleblow/openjdk-jdk12u/commit/c525150ace8816c503ccc618ea5559d06c99bbcb https://github.com/battleblow/openjdk-jdk12u/commit/dc2d99a20d0eea8d79cb31960cb693b2a4a39a4b PR: 250270 Changes: head/java/openjdk12/Makefile head/java/openjdk12/files/patch-changeset-57932 head/java/openjdk12/files/patch-changeset-57994 head/java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java head/java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c
A commit references this bug: Author: jkim Date: Fri Feb 5 04:06:55 UTC 2021 New revision: 564085 URL: https://svnweb.freebsd.org/changeset/ports/564085 Log: Fix build with Clang 11. https://github.com/battleblow/jdk14u/commit/11c638e62d57229828810b7fbdd1bb143808d5a3 https://github.com/battleblow/jdk14u/commit/a01e80aa36522ce709ee301afac057f649a1c472 https://github.com/battleblow/jdk14u/commit/0874ad9af5058d3dc9381e7d80745b8a3b1c5b6d PR: 250270 Changes: head/java/openjdk14/Makefile head/java/openjdk14/files/patch-changeset-57932 head/java/openjdk14/files/patch-changeset-57994 head/java/openjdk14/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java head/java/openjdk14/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c
Note java/openjdk13 and java/openjdk15 were fixed by the following commits respectively. https://svnweb.freebsd.org/changeset/ports/553083 https://svnweb.freebsd.org/changeset/ports/553084
A commit references this bug: Author: jkim Date: Sat Feb 6 01:24:46 UTC 2021 New revision: 564169 URL: https://svnweb.freebsd.org/changeset/ports/564169 Log: MFH: r564084 Fix build with Clang 11. https://github.com/battleblow/openjdk-jdk12u/commit/9e8e504992f95cc36c6dcd6e6f57ac18b58e0db5 https://github.com/battleblow/openjdk-jdk12u/commit/c525150ace8816c503ccc618ea5559d06c99bbcb https://github.com/battleblow/openjdk-jdk12u/commit/dc2d99a20d0eea8d79cb31960cb693b2a4a39a4b PR: 250270 Changes: _U branches/2021Q1/ branches/2021Q1/java/openjdk12/Makefile branches/2021Q1/java/openjdk12/files/patch-changeset-57932 branches/2021Q1/java/openjdk12/files/patch-changeset-57994 branches/2021Q1/java/openjdk12/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java branches/2021Q1/java/openjdk12/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c
A commit references this bug: Author: jkim Date: Sat Feb 6 01:26:02 UTC 2021 New revision: 564170 URL: https://svnweb.freebsd.org/changeset/ports/564170 Log: MFH: r564085 Fix build with Clang 11. https://github.com/battleblow/jdk14u/commit/11c638e62d57229828810b7fbdd1bb143808d5a3 https://github.com/battleblow/jdk14u/commit/a01e80aa36522ce709ee301afac057f649a1c472 https://github.com/battleblow/jdk14u/commit/0874ad9af5058d3dc9381e7d80745b8a3b1c5b6d PR: 250270 Changes: _U branches/2021Q1/ branches/2021Q1/java/openjdk14/Makefile branches/2021Q1/java/openjdk14/files/patch-changeset-57932 branches/2021Q1/java/openjdk14/files/patch-changeset-57994 branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_classes_sun_awt_X11_XlibWrapper.java branches/2021Q1/java/openjdk14/files/patch-src_java.desktop_unix_native_libawt__xawt_xawt_XlibWrapper.c
*** Bug 253385 has been marked as a duplicate of this bug. ***
(In reply to commit-hook from comment #16) Is there a workaround for this bug? I'm trying to set up a system that's entirely built from the ports tree and this is breaking a bunch of options within the apache24 dependencies.