From mcimadamore at openjdk.org Thu Jul 20 12:32:27 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 20 Jul 2023 12:32:27 GMT Subject: RFR: Tweak jextract to work with latest API changes Message-ID: This PR fixes a bunch of issues with jextract that were introduced by the latest changes in the Panama repo: * All var handles now take an extra offset parameter. This required changes to the libclang generated bindings, as well as changes in the code generated by jextract. * The name of some allocation factories in SegmentAllocator has changed. This PR fixes jextract to use the right names. * ValueLayout::arrayElementVarHandle is no longer present ------------- Commit messages: - Tweak jextract to work with latest API changes Changes: https://git.openjdk.org/jextract/pull/124/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=124&range=00 Stats: 41 lines in 15 files changed: 0 ins; 4 del; 37 mod Patch: https://git.openjdk.org/jextract/pull/124.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/124/head:pull/124 PR: https://git.openjdk.org/jextract/pull/124 From mcimadamore at openjdk.org Thu Jul 20 12:32:29 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 20 Jul 2023 12:32:29 GMT Subject: RFR: Tweak jextract to work with latest API changes In-Reply-To: References: Message-ID: On Thu, 20 Jul 2023 12:26:01 GMT, Maurizio Cimadamore wrote: > This PR fixes a bunch of issues with jextract that were introduced by the latest changes in the Panama repo: > > * All var handles now take an extra offset parameter. This required changes to the libclang generated bindings, as well as changes in the code generated by jextract. > * The name of some allocation factories in SegmentAllocator has changed. This PR fixes jextract to use the right names. > * ValueLayout::arrayElementVarHandle is no longer present src/main/java/org/openjdk/jextract/impl/StructBuilder.java line 300: > 298: append(vhConstant.accessExpression()); > 299: append(".get("); > 300: append(seg + ", "); Note that in this (and the setter) indexed accessor, we can now remove slicing, as we can simply pass the offset we want to the underlying var handle. This seems like a good thing. ------------- PR Review Comment: https://git.openjdk.org/jextract/pull/124#discussion_r1269388659 From sundar at openjdk.org Thu Jul 20 13:44:01 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Thu, 20 Jul 2023 13:44:01 GMT Subject: RFR: Tweak jextract to work with latest API changes In-Reply-To: References: Message-ID: On Thu, 20 Jul 2023 12:26:01 GMT, Maurizio Cimadamore wrote: > This PR fixes a bunch of issues with jextract that were introduced by the latest changes in the Panama repo: > > * All var handles now take an extra offset parameter. This required changes to the libclang generated bindings, as well as changes in the code generated by jextract. > * The name of some allocation factories in SegmentAllocator has changed. This PR fixes jextract to use the right names. > * ValueLayout::arrayElementVarHandle is no longer present LGTM ------------- Marked as reviewed by sundar (Committer). PR Review: https://git.openjdk.org/jextract/pull/124#pullrequestreview-1539297348 From mcimadamore at openjdk.org Thu Jul 20 14:44:07 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Thu, 20 Jul 2023 14:44:07 GMT Subject: Integrated: Tweak jextract to work with latest API changes In-Reply-To: References: Message-ID: <4wuqvLUmOutxv3uu2rLCGLEPI0znlDqCVGLQPri5FzA=.29c050a7-29f7-47d8-b70b-fbbfa6380626@github.com> On Thu, 20 Jul 2023 12:26:01 GMT, Maurizio Cimadamore wrote: > This PR fixes a bunch of issues with jextract that were introduced by the latest changes in the Panama repo: > > * All var handles now take an extra offset parameter. This required changes to the libclang generated bindings, as well as changes in the code generated by jextract. > * The name of some allocation factories in SegmentAllocator has changed. This PR fixes jextract to use the right names. > * ValueLayout::arrayElementVarHandle is no longer present This pull request has now been integrated. Changeset: 35b613d5 Author: Maurizio Cimadamore URL: https://git.openjdk.org/jextract/commit/35b613d58fd1e4b0c2c13c28d3ee1bd0e746784c Stats: 41 lines in 15 files changed: 0 ins; 4 del; 37 mod Tweak jextract to work with latest API changes Reviewed-by: sundar ------------- PR: https://git.openjdk.org/jextract/pull/124 From sundar at openjdk.org Mon Jul 24 11:17:12 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Mon, 24 Jul 2023 11:17:12 GMT Subject: RFR: sample fixes for JDK 22 Panama API changes. Message-ID: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> sample fixes for JDK 22 Panama API changes. All samples fine on MacOS. Windows scripts have to be adjusted and samples have to be tested on Windows. ------------- Commit messages: - sample fixes for JDK 22 Panama API changes. Changes: https://git.openjdk.org/jextract/pull/125/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=125&range=00 Stats: 309 lines in 78 files changed: 51 ins; 77 del; 181 mod Patch: https://git.openjdk.org/jextract/pull/125.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/125/head:pull/125 PR: https://git.openjdk.org/jextract/pull/125 From jvernee at openjdk.org Mon Jul 24 14:10:04 2023 From: jvernee at openjdk.org (Jorn Vernee) Date: Mon, 24 Jul 2023 14:10:04 GMT Subject: RFR: sample fixes for JDK 22 Panama API changes. In-Reply-To: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> References: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> Message-ID: On Mon, 24 Jul 2023 11:11:44 GMT, Athijegannathan Sundararajan wrote: > sample fixes for JDK 22 Panama API changes. All samples fine on MacOS. Windows scripts have to be adjusted and samples have to be tested on Windows. Windows changes are here: https://github.com/sundararajana/jextract/pull/3 ------------- PR Comment: https://git.openjdk.org/jextract/pull/125#issuecomment-1647990193 From sundar at openjdk.org Mon Jul 24 16:19:31 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Mon, 24 Jul 2023 16:19:31 GMT Subject: RFR: sample fixes for JDK 22 Panama API changes. [v2] In-Reply-To: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> References: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> Message-ID: > sample fixes for JDK 22 Panama API changes. All samples fine on MacOS. Windows scripts have to be adjusted and samples have to be tested on Windows. Athijegannathan Sundararajan has updated the pull request incrementally with two additional commits since the last revision: - Merge pull request #3 from JornVernee/Win_Samples fix Windows sample scripts - fix Windows sample scripts ------------- Changes: - all: https://git.openjdk.org/jextract/pull/125/files - new: https://git.openjdk.org/jextract/pull/125/files/538b866a..fccba9d5 Webrevs: - full: https://webrevs.openjdk.org/?repo=jextract&pr=125&range=01 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=125&range=00-01 Stats: 18 lines in 9 files changed: 0 ins; 1 del; 17 mod Patch: https://git.openjdk.org/jextract/pull/125.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/125/head:pull/125 PR: https://git.openjdk.org/jextract/pull/125 From jvernee at openjdk.org Mon Jul 24 16:19:32 2023 From: jvernee at openjdk.org (Jorn Vernee) Date: Mon, 24 Jul 2023 16:19:32 GMT Subject: RFR: sample fixes for JDK 22 Panama API changes. [v2] In-Reply-To: References: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> Message-ID: On Mon, 24 Jul 2023 16:14:51 GMT, Athijegannathan Sundararajan wrote: >> sample fixes for JDK 22 Panama API changes. All samples fine on MacOS. Windows scripts have to be adjusted and samples have to be tested on Windows. > > Athijegannathan Sundararajan has updated the pull request incrementally with two additional commits since the last revision: > > - Merge pull request #3 from JornVernee/Win_Samples > > fix Windows sample scripts > - fix Windows sample scripts Marked as reviewed by jvernee (Committer). ------------- PR Review: https://git.openjdk.org/jextract/pull/125#pullrequestreview-1543830639 From mcimadamore at openjdk.org Mon Jul 24 16:21:08 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Mon, 24 Jul 2023 16:21:08 GMT Subject: RFR: sample fixes for JDK 22 Panama API changes. [v2] In-Reply-To: References: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> Message-ID: <6KqT_9zKf9NsI8QIhHb83T6Uo9p2CWDzccB182rmhos=.31ecdf61-1d83-4f2e-b860-2d3506692107@github.com> On Mon, 24 Jul 2023 16:19:31 GMT, Athijegannathan Sundararajan wrote: >> sample fixes for JDK 22 Panama API changes. All samples fine on MacOS. Windows scripts have to be adjusted and samples have to be tested on Windows. > > Athijegannathan Sundararajan has updated the pull request incrementally with two additional commits since the last revision: > > - Merge pull request #3 from JornVernee/Win_Samples > > fix Windows sample scripts > - fix Windows sample scripts Marked as reviewed by mcimadamore (Committer). ------------- PR Review: https://git.openjdk.org/jextract/pull/125#pullrequestreview-1543838357 From sundar at openjdk.org Mon Jul 24 16:25:03 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Mon, 24 Jul 2023 16:25:03 GMT Subject: Integrated: sample fixes for JDK 22 Panama API changes. In-Reply-To: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> References: <7kZ429bthp6vTA-ytqKhrqdoi9IaqSsZwfwLRtVqOac=.92d7dde0-018a-492a-be2b-e9abdb08afbe@github.com> Message-ID: On Mon, 24 Jul 2023 11:11:44 GMT, Athijegannathan Sundararajan wrote: > sample fixes for JDK 22 Panama API changes. All samples fine on MacOS. Windows scripts have to be adjusted and samples have to be tested on Windows. This pull request has now been integrated. Changeset: 5a00d7ec Author: Athijegannathan Sundararajan URL: https://git.openjdk.org/jextract/commit/5a00d7ecb0ea283a4fc5f9fae9a85915028003bc Stats: 327 lines in 87 files changed: 51 ins; 78 del; 198 mod sample fixes for JDK 22 Panama API changes. Reviewed-by: jvernee, mcimadamore ------------- PR: https://git.openjdk.org/jextract/pull/125 From sundar at openjdk.org Tue Jul 25 10:21:21 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Tue, 25 Jul 2023 10:21:21 GMT Subject: RFR: samples fixes for JDK 21 panama API changes and version change. Message-ID: All samples fine on MacOS. I changed run_windows scripts but I've not tested samples on Windows. ------------- Commit messages: - trailing whitespace - samples fixes for JDK 21 panama API changes and version change. Changes: https://git.openjdk.org/jextract/pull/126/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=126&range=00 Stats: 224 lines in 30 files changed: 50 ins; 77 del; 97 mod Patch: https://git.openjdk.org/jextract/pull/126.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/126/head:pull/126 PR: https://git.openjdk.org/jextract/pull/126 From mcimadamore at openjdk.org Tue Jul 25 10:32:02 2023 From: mcimadamore at openjdk.org (Maurizio Cimadamore) Date: Tue, 25 Jul 2023 10:32:02 GMT Subject: RFR: samples fixes for JDK 21 panama API changes and version change. In-Reply-To: References: Message-ID: On Tue, 25 Jul 2023 03:21:57 GMT, Athijegannathan Sundararajan wrote: > All samples fine on MacOS. I changed run_windows scripts but I've not tested samples on Windows. Marked as reviewed by mcimadamore (Committer). ------------- PR Review: https://git.openjdk.org/jextract/pull/126#pullrequestreview-1545144589 From sundar at openjdk.org Tue Jul 25 12:51:03 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Tue, 25 Jul 2023 12:51:03 GMT Subject: RFR: samples fixes for JDK 21 panama API changes and version change. [v2] In-Reply-To: References: Message-ID: <2HUAf3W7YrRNe8B-tiHhvyXrNrtTO68UmFznAAaIgVI=.88c38b9a-e200-4958-a304-762635321002@github.com> > All samples fine on MacOS. I changed run_windows scripts but I've not tested samples on Windows. Athijegannathan Sundararajan has updated the pull request incrementally with two additional commits since the last revision: - Merge pull request #4 from JornVernee/Win_Scripts fix teapot - fix teapot ------------- Changes: - all: https://git.openjdk.org/jextract/pull/126/files - new: https://git.openjdk.org/jextract/pull/126/files/89cd81b0..533f8ce2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jextract&pr=126&range=01 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=126&range=00-01 Stats: 8 lines in 1 file changed: 0 ins; 1 del; 7 mod Patch: https://git.openjdk.org/jextract/pull/126.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/126/head:pull/126 PR: https://git.openjdk.org/jextract/pull/126 From sundar at openjdk.org Tue Jul 25 12:51:05 2023 From: sundar at openjdk.org (Athijegannathan Sundararajan) Date: Tue, 25 Jul 2023 12:51:05 GMT Subject: Integrated: samples fixes for JDK 21 panama API changes and version change. In-Reply-To: References: Message-ID: On Tue, 25 Jul 2023 03:21:57 GMT, Athijegannathan Sundararajan wrote: > All samples fine on MacOS. I changed run_windows scripts but I've not tested samples on Windows. This pull request has now been integrated. Changeset: 8e7596d9 Author: Athijegannathan Sundararajan URL: https://git.openjdk.org/jextract/commit/8e7596d9d112a1ee46dfa076a950de887a6a6745 Stats: 232 lines in 31 files changed: 50 ins; 78 del; 104 mod samples fixes for JDK 21 panama API changes and version change. Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.org/jextract/pull/126 From jvernee at openjdk.org Tue Jul 25 12:51:03 2023 From: jvernee at openjdk.org (Jorn Vernee) Date: Tue, 25 Jul 2023 12:51:03 GMT Subject: RFR: samples fixes for JDK 21 panama API changes and version change. [v2] In-Reply-To: <2HUAf3W7YrRNe8B-tiHhvyXrNrtTO68UmFznAAaIgVI=.88c38b9a-e200-4958-a304-762635321002@github.com> References: <2HUAf3W7YrRNe8B-tiHhvyXrNrtTO68UmFznAAaIgVI=.88c38b9a-e200-4958-a304-762635321002@github.com> Message-ID: On Tue, 25 Jul 2023 12:46:36 GMT, Athijegannathan Sundararajan wrote: >> All samples fine on MacOS. I changed run_windows scripts but I've not tested samples on Windows. > > Athijegannathan Sundararajan has updated the pull request incrementally with two additional commits since the last revision: > > - Merge pull request #4 from JornVernee/Win_Scripts > > fix teapot > - fix teapot Marked as reviewed by jvernee (Committer). ------------- PR Review: https://git.openjdk.org/jextract/pull/126#pullrequestreview-1545386925 From manuel.bleichenbacher at gmail.com Tue Jul 25 19:44:59 2023 From: manuel.bleichenbacher at gmail.com (Manuel Bleichenbacher) Date: Tue, 25 Jul 2023 21:44:59 +0200 Subject: jlink error when building jextract on macOS for JDK 21 Message-ID: As part of upgrading https://github.com/manuelbl/JavaDoesUSB to JDK 21, I'm building jextract for JDK 21. It works without issue on Linux and Windows. But on macOS it fails with this error message: *> Task :createJextractImage* FAILED Error: jdk.tools.jlink.plugin.PluginException: Duplicate resources: {include/darwin/jawt_md.h=[jdk.compiler, jdk.internal.opt], conf/jaxp.properties=[jdk.compiler, jdk.internal.opt], include/jawt.h=[jdk.compiler, jdk.internal.opt]} >From my limited understanding of jlink, I think one of the explicitly specified modules has a transitive dependency to the module "jdk.internal.opt", so it's included as well. But the modules "jdk.compiler" and "jdk.internal.opt" have three common files, which are now in conflict. Is this a known issue? Is there a workaround? My environment is: - JDK for gradle: openjdk version "17.0.1" 2021-10-19 LTS - JDK 21: OpenJDK 64-Bit Server VM Zulu21+69-CA (build 21-ea+28, mixed mode, sharing) - jextract: head of "jdk21" branch - Command line: sh ./gradlew -Pjdk21_home=/Users/me/Documents/zulu21.0.69-ea-jdk21.0.0-ea.28-macosx_aarch64 -Pllvm_home=/Library/Developer/CommandLineTools/usr/ clean verify -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn.vernee at oracle.com Tue Jul 25 20:22:39 2023 From: jorn.vernee at oracle.com (Jorn Vernee) Date: Tue, 25 Jul 2023 22:22:39 +0200 Subject: jlink error when building jextract on macOS for JDK 21 In-Reply-To: References: Message-ID: <52319b0a-fd13-cf92-05f3-0b8a9544bf83@oracle.com> Hey Manuel, This looks like a strange error. I do not recognize it. The jawt header files are from java.desktop, and the jaxp.properties file is from java.xml. So, they should not be in jdk.compiler and jdk.internal.opt If you list the contents of the jdk.compiler and jdk.internal.opt jmod files (using jmod list), are these resources listed? Jorn On 25/07/2023 21:44, Manuel Bleichenbacher wrote: > As part of upgrading https://github.com/manuelbl/JavaDoesUSB to JDK > 21, I'm building jextract for JDK 21. It works without issue on Linux > and Windows. But on macOS it fails with this error message: > > *> Task :createJextractImage* FAILED > > Error: jdk.tools.jlink.plugin.PluginException: Duplicate resources: > {include/darwin/jawt_md.h=[jdk.compiler, jdk.internal.opt], > conf/jaxp.properties=[jdk.compiler, jdk.internal.opt], > include/jawt.h=[jdk.compiler, jdk.internal.opt]} > > > From my limited understanding of jlink, I think one of the explicitly > specified modules has a transitive dependency to the module > "jdk.internal.opt", so it's included as well. But the modules > "jdk.compiler" and "jdk.internal.opt" have three common files, which > are now in conflict. > > Is this a known issue? Is there a workaround? > > My environment is: > - JDK for gradle: openjdk version "17.0.1" 2021-10-19 LTS > - JDK 21: OpenJDK 64-Bit Server VM Zulu21+69-CA (build 21-ea+28, mixed > mode, sharing) > - jextract: head of "jdk21" branch > - Command line: sh ./gradlew > -Pjdk21_home=/Users/me/Documents/zulu21.0.69-ea-jdk21.0.0-ea.28-macosx_aarch64 > -Pllvm_home=/Library/Developer/CommandLineTools/usr/ clean verify > -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel.bleichenbacher at gmail.com Tue Jul 25 20:33:35 2023 From: manuel.bleichenbacher at gmail.com (Manuel Bleichenbacher) Date: Tue, 25 Jul 2023 22:33:35 +0200 Subject: jlink error when building jextract on macOS for JDK 21 In-Reply-To: <52319b0a-fd13-cf92-05f3-0b8a9544bf83@oracle.com> References: <52319b0a-fd13-cf92-05f3-0b8a9544bf83@oracle.com> Message-ID: Hi Jorn All three conflicting files are present in both the jdk.compiler and jdk.internal.opt jmod files. In the JDK 20, they haven't been present in either jmod file. What build of the JDK are you using for testing? Regards Manuel Am Di., 25. Juli 2023 um 22:22 Uhr schrieb Jorn Vernee < jorn.vernee at oracle.com>: > Hey Manuel, > > This looks like a strange error. I do not recognize it. The jawt header > files are from java.desktop, and the jaxp.properties file is from java.xml. > So, they should not be in jdk.compiler and jdk.internal.opt > > If you list the contents of the jdk.compiler and jdk.internal.opt jmod > files (using jmod list), are these resources listed? > > Jorn > On 25/07/2023 21:44, Manuel Bleichenbacher wrote: > > As part of upgrading https://github.com/manuelbl/JavaDoesUSB to JDK 21, > I'm building jextract for JDK 21. It works without issue on Linux and > Windows. But on macOS it fails with this error message: > > *> Task :createJextractImage* FAILED > > Error: jdk.tools.jlink.plugin.PluginException: Duplicate resources: > {include/darwin/jawt_md.h=[jdk.compiler, jdk.internal.opt], > conf/jaxp.properties=[jdk.compiler, jdk.internal.opt], > include/jawt.h=[jdk.compiler, jdk.internal.opt]} > > From my limited understanding of jlink, I think one of the explicitly > specified modules has a transitive dependency to the module > "jdk.internal.opt", so it's included as well. But the modules > "jdk.compiler" and "jdk.internal.opt" have three common files, which are > now in conflict. > > Is this a known issue? Is there a workaround? > > My environment is: > - JDK for gradle: openjdk version "17.0.1" 2021-10-19 LTS > - JDK 21: OpenJDK 64-Bit Server VM Zulu21+69-CA (build 21-ea+28, mixed > mode, sharing) > - jextract: head of "jdk21" branch > - Command line: sh ./gradlew > -Pjdk21_home=/Users/me/Documents/zulu21.0.69-ea-jdk21.0.0-ea.28-macosx_aarch64 > -Pllvm_home=/Library/Developer/CommandLineTools/usr/ clean verify > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn.vernee at oracle.com Tue Jul 25 20:46:01 2023 From: jorn.vernee at oracle.com (Jorn Vernee) Date: Tue, 25 Jul 2023 22:46:01 +0200 Subject: [External] : Re: jlink error when building jextract on macOS for JDK 21 In-Reply-To: References: <52319b0a-fd13-cf92-05f3-0b8a9544bf83@oracle.com> Message-ID: <0c5b2ed4-2a82-7eb5-4b97-b1dcfe12a905@oracle.com> I've tried both the latest JDK 21 for Windows/x64 and Mac/AArch64 from jdk.java.net [1]. Neither of the jdk.compiler or jdk.internal.opt .jmod files contain the conflicting resources, in those builds. I also did a test run on Windows with the latest JDK 21 and the jextract jdk21 branch, and that seems to work fine (except for a known test failure in `TestDocComments.java`). I think this might be an issue with the particular JDK you're using. Jorn [1]: https://jdk.java.net/21/ On 25/07/2023 22:33, Manuel Bleichenbacher wrote: > Hi Jorn > > All three conflicting files are present in both the jdk.compiler and > jdk.internal.opt jmod files. In the JDK 20, they haven't been present > in either jmod file. > > What build of the JDK are you using for testing? > > Regards > Manuel > > > Am Di., 25. Juli 2023 um 22:22?Uhr schrieb Jorn Vernee > : > > Hey Manuel, > > This looks like a strange error. I do not recognize it. The jawt > header files are from java.desktop, and the jaxp.properties file > is from java.xml. So, they should not be in jdk.compiler and > jdk.internal.opt > > If you list the contents of the jdk.compiler and jdk.internal.opt > jmod files (using jmod list), are these resources listed? > > Jorn > > On 25/07/2023 21:44, Manuel Bleichenbacher wrote: >> As part of upgrading https://github.com/manuelbl/JavaDoesUSB >> >> to JDK 21, I'm building jextract for JDK 21. It works without >> issue on Linux and Windows. But on macOS it fails with this error >> message: >> >> *> Task :createJextractImage* FAILED >> >> Error: jdk.tools.jlink.plugin.PluginException: Duplicate >> resources: {include/darwin/jawt_md.h=[jdk.compiler, >> jdk.internal.opt], conf/jaxp.properties=[jdk.compiler, >> jdk.internal.opt], include/jawt.h=[jdk.compiler, jdk.internal.opt]} >> >> >> From my limited understanding of jlink, I think one of the >> explicitly specified modules has a transitive dependency to the >> module "jdk.internal.opt", so it's included as well. But the >> modules "jdk.compiler" and "jdk.internal.opt" have three common >> files, which are now in conflict. >> >> Is this a known issue? Is there a workaround? >> >> My environment is: >> - JDK for gradle: openjdk version "17.0.1" 2021-10-19 LTS >> - JDK 21: OpenJDK 64-Bit Server VM Zulu21+69-CA (build 21-ea+28, >> mixed mode, sharing) >> - jextract: head of "jdk21" branch >> - Command line: sh ./gradlew >> -Pjdk21_home=/Users/me/Documents/zulu21.0.69-ea-jdk21.0.0-ea.28-macosx_aarch64 >> -Pllvm_home=/Library/Developer/CommandLineTools/usr/ clean verify >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuel.bleichenbacher at gmail.com Tue Jul 25 20:58:10 2023 From: manuel.bleichenbacher at gmail.com (Manuel Bleichenbacher) Date: Tue, 25 Jul 2023 22:58:10 +0200 Subject: [External] : Re: jlink error when building jextract on macOS for JDK 21 In-Reply-To: <0c5b2ed4-2a82-7eb5-4b97-b1dcfe12a905@oracle.com> References: <52319b0a-fd13-cf92-05f3-0b8a9544bf83@oracle.com> <0c5b2ed4-2a82-7eb5-4b97-b1dcfe12a905@oracle.com> Message-ID: Hi Jorn The JDK at jdk.java.net (build 32) resolves it ? jextract builds without issue. Thanks for the support Manuel Am Di., 25. Juli 2023 um 22:46 Uhr schrieb Jorn Vernee < jorn.vernee at oracle.com>: > I've tried both the latest JDK 21 for Windows/x64 and Mac/AArch64 from > jdk.java.net [1]. Neither of the jdk.compiler or jdk.internal.opt .jmod > files contain the conflicting resources, in those builds. I also did a test > run on Windows with the latest JDK 21 and the jextract jdk21 branch, and > that seems to work fine (except for a known test failure in > `TestDocComments.java`). > > I think this might be an issue with the particular JDK you're using. > > Jorn > > [1]: https://jdk.java.net/21/ > > On 25/07/2023 22:33, Manuel Bleichenbacher wrote: > > Hi Jorn > > All three conflicting files are present in both the jdk.compiler and > jdk.internal.opt jmod files. In the JDK 20, they haven't been present in > either jmod file. > > What build of the JDK are you using for testing? > > Regards > Manuel > > > Am Di., 25. Juli 2023 um 22:22 Uhr schrieb Jorn Vernee < > jorn.vernee at oracle.com>: > >> Hey Manuel, >> >> This looks like a strange error. I do not recognize it. The jawt header >> files are from java.desktop, and the jaxp.properties file is from java.xml. >> So, they should not be in jdk.compiler and jdk.internal.opt >> >> If you list the contents of the jdk.compiler and jdk.internal.opt jmod >> files (using jmod list), are these resources listed? >> >> Jorn >> On 25/07/2023 21:44, Manuel Bleichenbacher wrote: >> >> As part of upgrading https://github.com/manuelbl/JavaDoesUSB >> >> to JDK 21, I'm building jextract for JDK 21. It works without issue on >> Linux and Windows. But on macOS it fails with this error message: >> >> *> Task :createJextractImage* FAILED >> >> Error: jdk.tools.jlink.plugin.PluginException: Duplicate resources: >> {include/darwin/jawt_md.h=[jdk.compiler, jdk.internal.opt], >> conf/jaxp.properties=[jdk.compiler, jdk.internal.opt], >> include/jawt.h=[jdk.compiler, jdk.internal.opt]} >> >> From my limited understanding of jlink, I think one of the explicitly >> specified modules has a transitive dependency to the module >> "jdk.internal.opt", so it's included as well. But the modules >> "jdk.compiler" and "jdk.internal.opt" have three common files, which are >> now in conflict. >> >> Is this a known issue? Is there a workaround? >> >> My environment is: >> - JDK for gradle: openjdk version "17.0.1" 2021-10-19 LTS >> - JDK 21: OpenJDK 64-Bit Server VM Zulu21+69-CA (build 21-ea+28, mixed >> mode, sharing) >> - jextract: head of "jdk21" branch >> - Command line: sh ./gradlew >> -Pjdk21_home=/Users/me/Documents/zulu21.0.69-ea-jdk21.0.0-ea.28-macosx_aarch64 >> -Pllvm_home=/Library/Developer/CommandLineTools/usr/ clean verify >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn.vernee at oracle.com Tue Jul 25 21:47:27 2023 From: jorn.vernee at oracle.com (Jorn Vernee) Date: Tue, 25 Jul 2023 23:47:27 +0200 Subject: [External] : Re: jlink error when building jextract on macOS for JDK 21 In-Reply-To: References: <52319b0a-fd13-cf92-05f3-0b8a9544bf83@oracle.com> <0c5b2ed4-2a82-7eb5-4b97-b1dcfe12a905@oracle.com> Message-ID: No problem! Glad to hear it works now. Jorn On 25/07/2023 22:58, Manuel Bleichenbacher wrote: > Hi Jorn > > The JDK at jdk.java.net > > (build 32) resolves it ? jextract builds without issue. > > Thanks for the support > Manuel > > > Am Di., 25. Juli 2023 um 22:46?Uhr schrieb Jorn Vernee > : > > I've tried both the latest JDK 21 for Windows/x64 and Mac/AArch64 > from jdk.java.net > > [1]. Neither of the jdk.compiler or jdk.internal.opt .jmod files > contain the conflicting resources, in those builds. I also did a > test run on Windows with the latest JDK 21 and the jextract jdk21 > branch, and that seems to work fine (except for a known test > failure in `TestDocComments.java`). > > I think this might be an issue with the particular JDK you're using. > > Jorn > > [1]: https://jdk.java.net/21/ > > > On 25/07/2023 22:33, Manuel Bleichenbacher wrote: >> Hi Jorn >> >> All three conflicting files are present in both the jdk.compiler >> and jdk.internal.opt jmod files. In the JDK 20, they haven't been >> present in either jmod file. >> >> What build of the JDK are you using for testing? >> >> Regards >> Manuel >> >> >> Am Di., 25. Juli 2023 um 22:22?Uhr schrieb Jorn Vernee >> : >> >> Hey Manuel, >> >> This looks like a strange error. I do not recognize it. The >> jawt header files are from java.desktop, and the >> jaxp.properties file is from java.xml. So, they should not be >> in jdk.compiler and jdk.internal.opt >> >> If you list the contents of the jdk.compiler and >> jdk.internal.opt jmod files (using jmod list), are these >> resources listed? >> >> Jorn >> >> On 25/07/2023 21:44, Manuel Bleichenbacher wrote: >>> As part of upgrading https://github.com/manuelbl/JavaDoesUSB >>> >>> to JDK 21, I'm building jextract for JDK 21. It works >>> without issue on Linux and Windows. But on macOS it fails >>> with this error message: >>> >>> *> Task :createJextractImage* FAILED >>> >>> Error: jdk.tools.jlink.plugin.PluginException: Duplicate >>> resources: {include/darwin/jawt_md.h=[jdk.compiler, >>> jdk.internal.opt], conf/jaxp.properties=[jdk.compiler, >>> jdk.internal.opt], include/jawt.h=[jdk.compiler, >>> jdk.internal.opt]} >>> >>> >>> From my limited understanding of jlink, I think one of the >>> explicitly specified modules has a transitive dependency to >>> the module "jdk.internal.opt", so it's included as well. But >>> the modules "jdk.compiler" and "jdk.internal.opt" have three >>> common files, which are now in conflict. >>> >>> Is this a known issue? Is there a workaround? >>> >>> My environment is: >>> - JDK for gradle: openjdk version "17.0.1" 2021-10-19 LTS >>> - JDK 21: OpenJDK 64-Bit Server VM Zulu21+69-CA (build >>> 21-ea+28, mixed mode, sharing) >>> - jextract: head of "jdk21" branch >>> - Command line: sh ./gradlew >>> -Pjdk21_home=/Users/me/Documents/zulu21.0.69-ea-jdk21.0.0-ea.28-macosx_aarch64 >>> -Pllvm_home=/Library/Developer/CommandLineTools/usr/ clean >>> verify >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: