Bug 250270 - java/openjdk12 java/openjdk13 java/openjdk14 java/openjdk15: Fix build with clang 11
Summary: java/openjdk12 java/openjdk13 java/openjdk14 java/openjdk15: Fix build with c...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jung-uk Kim
URL:
Keywords:
: 253385 (view as bug list)
Depends on:
Blocks: 248756
  Show dependency treegraph
 
Reported: 2020-10-11 10:57 UTC by Dimitry Andric
Modified: 2021-05-18 19:15 UTC (History)
9 users (show)

See Also:
glewis: maintainer-feedback+
koobs: merge-quarterly+


Attachments
Fix java/openjdk12 build with clang 11 (7.77 KB, patch)
2020-10-11 10:57 UTC, Dimitry Andric
no flags Details | Diff
Fix java/openjdk13 build with clang 11 (7.77 KB, patch)
2020-10-11 10:58 UTC, Dimitry Andric
no flags Details | Diff
Fix java/openjdk14 build with clang 11 (7.77 KB, patch)
2020-10-11 10:58 UTC, Dimitry Andric
no flags Details | Diff
Fix java/openjdk15 build with clang 11 (2.82 KB, patch)
2020-10-11 10:59 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2020-10-11 10:57:41 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2020-10-11 10:58:40 UTC
Created attachment 218661 [details]
Fix java/openjdk13 build with clang 11
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2020-10-11 10:58:59 UTC
Created attachment 218662 [details]
Fix java/openjdk14 build with clang 11
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2020-10-11 10:59:18 UTC
Created attachment 218663 [details]
Fix java/openjdk15 build with clang 11
Comment 4 Greg Lewis freebsd_committer freebsd_triage 2020-10-13 21:17:54 UTC
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.
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2020-10-13 21:25:27 UTC
(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!
Comment 6 Kurt Jaeger freebsd_committer freebsd_triage 2020-12-19 21:32:38 UTC
Is there a reason those patches are not yet committed ?
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2020-12-19 21:54:00 UTC
(In reply to Dimitry Andric from comment #1)
This fails make patch on jdk13 -- should this still work ?
Comment 8 Dimitry Andric freebsd_committer freebsd_triage 2020-12-20 00:27:05 UTC
(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.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2021-01-26 05:50:33 UTC
^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)
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2021-01-26 05:51:40 UTC
@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)
Comment 11 Jung-uk Kim freebsd_committer freebsd_triage 2021-02-05 04:01:24 UTC
I'll take it.
Comment 12 commit-hook freebsd_committer freebsd_triage 2021-02-05 04:05:00 UTC
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
Comment 13 commit-hook freebsd_committer freebsd_triage 2021-02-05 04:07:02 UTC
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
Comment 14 Jung-uk Kim freebsd_committer freebsd_triage 2021-02-05 04:13:33 UTC
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
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-02-06 01:25:48 UTC
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
Comment 16 commit-hook freebsd_committer freebsd_triage 2021-02-06 01:26:50 UTC
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
Comment 17 Jung-uk Kim freebsd_committer freebsd_triage 2021-02-09 21:27:31 UTC
*** Bug 253385 has been marked as a duplicate of this bug. ***
Comment 18 cory 2021-05-18 19:15:45 UTC
(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.