<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>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`).<br>
</p>
<p>I think this might be an issue with the particular JDK you're
using.<br>
</p>
<p>Jorn</p>
<p>[1]: <a class="moz-txt-link-freetext" href="https://jdk.java.net/21/">https://jdk.java.net/21/</a></p>
<p></p>
<div class="moz-cite-prefix">On 25/07/2023 22:33, Manuel
Bleichenbacher wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAA7F5jJHoVNmv2vrz_ktb3sw5tJJGxP-KckudJF4up3syDZ4Sg@mail.gmail.com">
<div dir="ltr">Hi Jorn
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>What build of the JDK are you using for testing?</div>
<div><br>
</div>
<div>Regards</div>
<div>Manuel</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Di., 25. Juli 2023 um
22:22 Uhr schrieb Jorn Vernee <<a href="mailto:jorn.vernee@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">jorn.vernee@oracle.com</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>
<p>Hey Manuel,</p>
<p>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</p>
<p>If you list the contents of the jdk.compiler and
jdk.internal.opt jmod files (using jmod list), are these
resources listed?</p>
<p>Jorn<br>
</p>
<div>On 25/07/2023 21:44, Manuel Bleichenbacher wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">As part of upgrading <a href="https://urldefense.com/v3/__https://github.com/manuelbl/JavaDoesUSB__;!!ACWV5N9M2RV99hQ!LeVfvzO1SmSaGdm9YadRxM4_TOaqfusTlVSh9BiZsY2dqOD8jUoGZ8X45Mn-XRlR-rS9YuzKcl-Gfe1hE6IVS40Z0PBu$" target="_blank" moz-do-not-send="true">https://github.com/manuelbl/JavaDoesUSB</a>
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:
<div><br>
</div>
<div>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(180,36,25)"><span style="font-variant-ligatures:no-common-ligatures"><b>>
Task :createJextractImage</b> FAILED</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">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]}</span></p>
<br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Is this a known issue? Is there a workaround?</div>
<div><br>
</div>
<div>My environment is:</div>
<div>- JDK for gradle: <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">openjdk
version "17.0.1" 2021-10-19 LTS</span></div>
- JDK 21: <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">OpenJDK
64-Bit Server VM Zulu21+69-CA (build 21-ea+28, mixed
mode, sharing)</span>
<div>- jextract: head of "jdk21" branch</div>
<div>- Command line: <span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px">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</span></div>
<div><br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</body>
</html>