<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi,<br>
this issue seems to be related to the fact that the jextract
gradle build did not fail, despite the LLVM path being used not
containing all the bells and whistles that the jextract build
requires.</p>
<p>So, a possible quality of life improvement here would be to add
some more sanity checks on the build, to check that the structure
of the LLVM folder is as expected. IIRC, the structure of the
apt-installed LLVM does not 100% match that of a LLVM binary
snapshot.</p>
<p>Cheers<br>
Maurizio<br>
</p>
<div class="moz-cite-prefix">On 28/12/2022 17:23, Maurizio Casciano
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAO7O_xi=e_XQo-Q=oTH1f4_oFdoC=9+=2GP7JhYF9b_+EoQ8Aw@mail.gmail.com">
<div dir="ltr">Thanks to Jorn Vernee, who suggested me to try
with the GitHub LLVM+CLang build archive
<div>I was able to generate the Java bindings for the YARA
headers using this build</div>
<div><a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz" moz-do-not-send="true">https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz<br>
</a></div>
<div>A more detailed answer is also available on SO <a href="https://stackoverflow.com/questions/74931278/jextract-yara-headers-throws-unknown-type-name-intmax-t" moz-do-not-send="true" class="moz-txt-link-freetext">https://stackoverflow.com/questions/74931278/jextract-yara-headers-throws-unknown-type-name-intmax-t</a></div>
<div><br>
</div>
<div>Best,</div>
<div>Maurizio</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Il giorno mar 27 dic 2022 alle
ore 16:53 Maurizio Casciano <<a href="mailto:mauriziocasciano7@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">mauriziocasciano7@gmail.com</a>>
ha scritto:<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 dir="ltr">Dear All,
<div>I'm trying to generate Java bindings for the yara
library but I'm getting</div>
<div>
<pre style="margin-top:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit">error: unknown type name <span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">'intmax_t'
when running the jextract command:</span></code></pre>
<pre style="margin-top:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">build/jextract/bin/jextract --source --output java-yara --target-package com.virustotal.yara /usr/include/yara.h
</span></code></pre>
<div>even if I include the relevant additional paths:</div>
<div><br>
</div>
<div>
<pre style="margin-top:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit">-I /usr/include
-I /usr/include/yara
-I /usr/lib/llvm-<span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">15</span>/lib/clang/<span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">15.0</span><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">.6</span>/include</code></pre>
</div>
<div>Here is my question on Stack-Overflow <a href="https://stackoverflow.com/questions/74931278/jextract-usr-include-yara-h-throws-unknown-type-name-intmax-t" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://stackoverflow.com/questions/74931278/jextract-usr-include-yara-h-throws-unknown-type-name-intmax-t</a></div>
<div>and my GitHub repository <a href="https://github.com/MaurizioCasciano/jextract/tree/unknown_type_name_intmax_t" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/MaurizioCasciano/jextract/tree/unknown_type_name_intmax_t</a></div>
<div><br>
</div>
<div>What may be missing in the command?</div>
<div><br>
</div>
<div>Best,</div>
<div>Maurizio</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><span>
<p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Maurizio Casciano</span></p>
</span></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>