<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thanks for the swift reply Sundararajan,<div><br></div><div>Running this seems to produce one output, it looks like something is there:</div><div><br></div><div><div>[user@MSI] $ /usr/lib/jvm/java-19-openjdk-19.0.0.0.36-2.rolling.fc38.x86_64/bin/java --list-modules | grep jdk.compiler</div><div>jdk.compiler@19</div></div><div><br></div><div>Where the output line is "jdk.compiler@19"</div><div><br></div><div><img src="cid:ii_l8b36ysr0" alt="image.png" width="563" height="38"><br></div><div><br></div><div>It's not so much a big deal, I installed JDK 17 and used that as the Gradle compiler and it worked</div><div>Probably it is something I am doing wrong and not worth investing time into</div><div><br></div><div>I have written a Dockerfile that builds jextract from source and allows you to use it without installing anything</div><div>It is late here so I haven't had time to test it yet, but I will double-check it tomorrow and submit it as a PR to repo so folks can use this if they want:</div><div><br></div><div><div><a href="https://gist.github.com/GavinRay97/45365bf3b7d49ae335c525ffd51605c4">https://gist.github.com/GavinRay97/45365bf3b7d49ae335c525ffd51605c4</a></div></div><div><br></div><div>Then anyone can run jextract like:<br>docker run --rm -it jextract:v0.x <flags></div><div><br></div><div>=)</div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 20, 2022 at 11:36 PM Sundararajan Athijegannathan <<a href="mailto:sundararajan.athijegannathan@oracle.com">sundararajan.athijegannathan@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4657122873208550122">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I just checked with Oracle jdk19 installation + jextract repo's master branch<span style="color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">. Build/verify worked as expected on mac. </span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
>From the error message you posted, it seems "jdk.compiler" module is missing in your jdk19 installation. jextract needs jdk.compiler module to compile the extracted Java sources to produce .class files.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Will you please check if the following command prints "jdk.compiler"?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline">/usr/lib/jvm/java-19-openjdk-19.0.0.0.36-2.rolling.fc38.x86_64/bin/java
--list-modules | grep jdk.compiler</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline">For
example, in my case</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline">
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">$ /Library/Java/JavaVirtualMachines/jdk-19.jdk/Contents/Home/bin/java \<span> </span></span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">>
<span> </span>--list-modules | grep jdk.compiler</span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">jdk.compiler@19</span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">If not, that installation may be missing compiler module (perhaps generated by jlink invocation). Solution is to install a full
JDK 19.</span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br>
</span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Hope this helps,</span></p>
<p style="margin:0px;font:14px Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">-Sundar</span></p>
<br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(32,31,30);font-size:15px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_4657122873208550122appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_4657122873208550122divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> panama-dev <<a href="mailto:panama-dev-retn@openjdk.org" target="_blank">panama-dev-retn@openjdk.org</a>> on behalf of Gavin Ray <<a href="mailto:ray.gavin97@gmail.com" target="_blank">ray.gavin97@gmail.com</a>><br>
<b>Sent:</b> 21 September 2022 07:35<br>
<b>To:</b> <a href="mailto:panama-dev@openjdk.org" target="_blank">panama-dev@openjdk.org</a> <<a href="mailto:panama-dev@openjdk.org" target="_blank">panama-dev@openjdk.org</a>><br>
<b>Subject:</b> Trying to build j-extract on Linux throws "java.lang.module.FindException: Module jdk.compiler not found"</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>I'm trying to generate jextract types for io_uring (I didn't find any non-JNI/JNA libraries to use it from JVM)</div>
<div>Unfortunately, following the instructions I've hit a snag.<br>
</div>
<div><br>
</div>
<div>Building it with JDK 19, I get:</div>
<div>=============================================</div>
<div>
<div>[user@MSI jextract]$ sh ./gradlew \</div>
<div><span style="white-space:pre-wrap"></span>-Pjdk19_home=/usr/lib/jvm/java-19-openjdk-19.0.0.0.36-2.rolling.fc38.x86_64 \</div>
<div><span style="white-space:pre-wrap"></span>-Pllvm_home=/home/user/downloads/clang+llvm-15.0.0-aarch64-linux-gnu clean verify</div>
<div><br>
</div>
<div>> Task :compileJava</div>
<div>Note: Some input files use preview features of Java SE 19.</div>
<div>Note: Recompile with -Xlint:preview for details.</div>
<div><br>
</div>
<div>> Task :createJextractImage FAILED</div>
<div>Error: Module jdk.compiler not found</div>
<div>java.lang.module.FindException: Module jdk.compiler not found</div>
<div> at java.base/java.lang.module.Resolver.findFail(Resolver.java:892)</div>
<div> at java.base/java.lang.module.Resolver.resolve(Resolver.java:129)</div>
<div> at java.base/java.lang.module.Configuration.resolve(Configuration.java:420)</div>
<div> at java.base/java.lang.module.Configuration.resolve(Configuration.java:254)</div>
<div> at jdk.jlink/jdk.tools.jlink.internal.Jlink$JlinkConfiguration.resolve(Jlink.java:217)</div>
<div> at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:536)</div>
<div> at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:424)</div>
<div> at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:276)</div>
<div> at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:56)</div>
<div> at jdk.jlink/jdk.tools.jlink.internal.Main.main(Main.java:34)</div>
</div>
<div>
<div>=============================================</div>
<div><br>
</div>
</div>
<div>Would it make sense to add a Dockerfile for Linux to the repo that can reliably build the latest version?</div>
<div>That way folks don't have to mess around with finding and installing LLVM and whatnot.</div>
<div><br>
</div>
<div>I'm happy to submit a PR for this if someone can tell me why the regular build command is failing, ha.</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div></blockquote></div>