[External] : Re: jlink error when building jextract on macOS for JDK 21

Jorn Vernee jorn.vernee at oracle.com
Tue Jul 25 21:47:27 UTC 2023


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 
> <https://urldefense.com/v3/__http://jdk.java.net__;!!ACWV5N9M2RV99hQ!NfESNbHmMWN7XJAF0j4qDA0lLLYUjAdr7BKwMSOtPdalJFlKaX_lXOttFzoJQyXQxkFg0vb6-tAvu-s6NMjN8L3gKlxw$> 
> (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
>     <https://urldefense.com/v3/__http://jdk.java.net__;!!ACWV5N9M2RV99hQ!NfESNbHmMWN7XJAF0j4qDA0lLLYUjAdr7BKwMSOtPdalJFlKaX_lXOttFzoJQyXQxkFg0vb6-tAvu-s6NMjN8L3gKlxw$>
>     [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/
>     <https://urldefense.com/v3/__https://jdk.java.net/21/__;!!ACWV5N9M2RV99hQ!NfESNbHmMWN7XJAF0j4qDA0lLLYUjAdr7BKwMSOtPdalJFlKaX_lXOttFzoJQyXQxkFg0vb6-tAvu-s6NMjN8DaJA-LU$>
>
>     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
>>>         <https://urldefense.com/v3/__https://github.com/manuelbl/JavaDoesUSB__;!!ACWV5N9M2RV99hQ!LeVfvzO1SmSaGdm9YadRxM4_TOaqfusTlVSh9BiZsY2dqOD8jUoGZ8X45Mn-XRlR-rS9YuzKcl-Gfe1hE6IVS40Z0PBu$>
>>>         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: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20230725/e0f29fe4/attachment-0001.htm>


More information about the jextract-dev mailing list