jextract on Windows

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Feb 14 19:05:37 UTC 2024


Hi Duncan,
thanks for the report. I think the problem here is that we have updated 
jextract to use libclang directly for generating these comment.

Now, in libclang 13, we get something like "unnamed union ...". We look 
for that string in the jextract code, and if we see that, we generate a 
more succinct comment.

But you are running either a newer, or an older version, and it seems 
like instead of saying "unnamed" you get "anonymous" instead, which 
jextract is not looking for :-)

So... we should probably make that logic/regex more robust.

Maurizio

On 14/02/2024 16:42, Duncan Gittins wrote:
> I've just pulled the latest jextract master branch (I think!), and 
> re-run my build for JDK22 on Windows.
>
> Please ignore if you are mid-way though any fixes or already known 
> issue. There appears to be a glitch with the snippet generation. If 
> any component of an include file starts with "u", it is treated as an 
> invalid \uXXXX character sequence by javac
>
>     /**      * Setter for field:      * {@snippet lang=c :      * 
> union (anonymous union at C:\Program Files (x86)\Windows 
> Kits\10\include\10.0.18362.0\um\winnt.h:16446:5) Flags      * }      */
>
> PROCESSOR_IDLESTATE_POLICY.java:222: error: illegal unicode escape     
> [javac]      * union (anonymous union at C:\Program Files 
> (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h:16446:5) Flags   
>   [javac]
>
> It's from jextract without symbol filters, but not on any definitions 
> I use:
>
>     #include <shlobj_core.h>
>     #include <objbase.h>
>
> Kind regards
>
> Duncan
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20240214/71e6c328/attachment.htm>


More information about the jextract-dev mailing list