From Panama 17 to 19, ability to get M1?

Martin Pernollet martin.pernollet at protonmail.com
Thu Dec 29 12:22:35 UTC 2022


Hi Maurizio,

I indeed tried to find that branch, but only found jdk18 and jdk20 branches here : https://github.com/openjdk/jextract/branches/all

Is this a forgotten push? Or maybe I should refer to the branch named "panama"?

Regards,

Martin

Envoyé avec la messagerie sécurisée [Proton Mail](https://proton.me/).

------- Original Message -------
Le mercredi 28 décembre 2022 à 22:55, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> a écrit :

> Hi Martin,
> jextract has multiple branches - you should switch to the jdk19 branch, and then you will find all the samples working against jdk19.
>
> I suggest you do that first before doing jdk20 (for which there's no available downloadable jextract binaries yet).
>
> A binary build for jextract is available here:
>
> https://jdk.java.net/jextract/
>
> Note that this page contains links to the correct bits of the documentation (including jextract branch and samples).
>
> This should be enough to get started with 19. As soon as Java 20 ships, the same will be available for Java 20.
>
> Maurizio
>
> On 28/12/2022 16:01, Martin Pernollet wrote:
>
>> Thank you. I know these documents and rather lacks complete exemples that can work for an identified JDK version.
>>
>> I went back to JExtract samples, especially the opengl [teapot](https://urldefense.com/v3/__https://github.com/openjdk/jextract/blob/master/samples/opengl/Teapot.java__;!!ACWV5N9M2RV99hQ!Kerbjc2UKkc4goX1QR-WkkEnACuyafoEWQ0nochEnCQ0VbVq_Ro15__pJVthqwsrTgatzLaSx9ddWt-hfVVYruFAS-H77hIGI1Mhfg$), but I can't compile it with JDK 19... seamingly the [imports refer to the JDK 20 package names](https://urldefense.com/v3/__https://github.com/openjdk/jextract/blob/master/samples/opengl/Teapot.java*L32__;Iw!!ACWV5N9M2RV99hQ!Kerbjc2UKkc4goX1QR-WkkEnACuyafoEWQ0nochEnCQ0VbVq_Ro15__pJVthqwsrTgatzLaSx9ddWt-hfVVYruFAS-H77hL2GhS8mg$).
>>
>> What I still miss is
>>
>> import static jdk.incubator.foreign.CLinker.C_INT
>>
>> and other C_TYPE.
>>
>> They where static constants in JDK17 but then have gone. Where should we find this as of JDK19?
>>
>> Thanks in advance!
>>
>> ------- Original Message -------
>> Le mercredi 28 décembre 2022 à 14:34, Maurizio Cimadamore [<maurizio.cimadamore at oracle.com>](mailto:maurizio.cimadamore at oracle.com) a écrit :
>>
>>> Hi,
>>> I suggest you start looking at some of the documents we have available to get started - for JDK 19 you can look here:
>>>
>>> [https://github.com/openjdk/panama-foreign/blob/21452ec32b27ba906ec06253e4a7af9037728174/doc/panama_memaccess.md](https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/blob/21452ec32b27ba906ec06253e4a7af9037728174/doc/panama_memaccess.md__;!!ACWV5N9M2RV99hQ!Kerbjc2UKkc4goX1QR-WkkEnACuyafoEWQ0nochEnCQ0VbVq_Ro15__pJVthqwsrTgatzLaSx9ddWt-hfVVYruFAS-H77hJVqw6NUw$)
>>>
>>> In short, you always need to provide a layout constant of the right kind when doing allocation using an allocator (and also when doing dereference).
>>>
>>> Value layout constants are provided in the ValueLayout class (e.g. ValueLayout.JAVA_DOUBLE).
>>>
>>> If you use jextract, additional constants (e.g. C_INT, C_LONG, ...) will be provided.
>>>
>>> On 23/12/2022 16:20, Martin Pernollet wrote:
>>>
>>>> Hi,
>>>>
>>>> Would anyone suggest examples showing how to use Panama 19 instead of 17? A couple of things have changed ( e.g. how to use the new
>>>>
>>>> locator
>>>>
>>>> .allocateArray(
>>>>
>>>> new
>>>>
>>>> ValueLayout.OfDouble(
>>>>
>>>> , and deal with all other datatypes, strings, etc).
>>>>
>>>> One additional question : when will ARM be supported to run panama on Apple M1?
>>>
>>> Apple M1 is mostly supported on JDK 19 - modulo few corner cases which have been addressed in Java 20.
>>>
>>> Maurizio
>>>
>>>> Regards,
>>>>
>>>> Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20221229/a6f58c92/attachment-0001.htm>


More information about the panama-dev mailing list