Error during opening a native lib on Apple M1
Clemens Lanthaler
clemens.lanthaler at itarchitects.at
Sun Sep 4 17:13:55 UTC 2022
Hello everyone,
I have just ported over LibrawFX to JDK19 and have used the latest bin
release of jextract on OSX/win for porting it over to the JDK19 lang
features. The code is working under JDK18 (1.8.0 release branch).
When I execute the new code under an Apple M1 I am getting always on the
init method / first call to the native lib the error message:
java.lang.ExceptionInInitializerError: Exception
java.lang.UnsupportedOperationException: Call type not supported on this
platform [in thread "Thread-6"]
at
java.base/jdk.internal.foreign.abi.aarch64.CallArranger$StorageCalculator.stackAlloc(CallArranger.java:206)
at
java.base/jdk.internal.foreign.abi.aarch64.CallArranger$StorageCalculator.stackAlloc(CallArranger.java:217)
at
java.base/jdk.internal.foreign.abi.aarch64.CallArranger$StorageCalculator.nextStorage(CallArranger.java:244)
at
java.base/jdk.internal.foreign.abi.aarch64.CallArranger$UnboxBindingCalculator.getBindings(CallArranger.java:395)
at
java.base/jdk.internal.foreign.abi.aarch64.CallArranger.getBindings(CallArranger.java:146)
at
java.base/jdk.internal.foreign.abi.aarch64.CallArranger.arrangeDowncall(CallArranger.java:153)
at
java.base/jdk.internal.foreign.abi.aarch64.macos.MacOsAArch64Linker.arrangeDowncall(MacOsAArch64Linker.java:56)
at
java.base/jdk.internal.foreign.abi.AbstractLinker.lambda$downcallHandle$0(AbstractLinker.java:52)
at
java.base/jdk.internal.foreign.abi.SoftReferenceCache$Node.get(SoftReferenceCache.java:52)
at
java.base/jdk.internal.foreign.abi.SoftReferenceCache.get(SoftReferenceCache.java:38)
at
java.base/jdk.internal.foreign.abi.AbstractLinker.downcallHandle(AbstractLinker.java:50)
at java.base/java.lang.foreign.Linker.downcallHandle(Linker.java:221)
at
org.librawfx at 1.8.1-SNAPSHOT/org.libraw.linuxosx.RuntimeHelper.lambda$downcallHandle$5(RuntimeHelper.java:60)
at java.base/java.util.Optional.map(Optional.java:260)
at
org.librawfx at 1.8.1-SNAPSHOT/org.libraw.linuxosx.RuntimeHelper.downcallHandle(RuntimeHelper.java:60)
at
org.librawfx at 1.8.1-SNAPSHOT/org.libraw.linuxosx.constants$3.<clinit>(constants$3.java:52)
The code is on Github under https://github.com/lanthale/librawfx. The
JDK19 stuff is checked into the master branch. Just clone it and run it
via maven.
The same I have done for LibheifFX and all is working. There must be
some difference how Libraw is handling all the stuff. Therefore I would
appreciate if you can help me.
best regards,
Clemens
--
ITArchitects
CEO: B.Sc. Clemens Lanthaler
Forchachstrasse 3
A-6166 Fulpmes
Tel.: +43 (0)650 855 2954
email: office at itarchitects.at
homepage: http://www.itarchitects.at
-------------------------------------------------
Notice: This e-mail and any attachments are confidential and may be privileged.
If you are not the intended recipient, notify the sender immediately, destroy all
copies from your system and do not disclose or use the information for any purpose.
Diese E-Mail inklusive aller Anhaenge ist vertraulich und koennte bevorrechtigtem
Schutz unterliegen. Wenn Sie nicht der beabsichtigte Adressat sind, informieren Sie
bitte den Absender unverzueglich, loeschen Sie alle Kopien von Ihrem System und
veroeffentlichen Sie oder nutzen Sie die Information keinesfalls, gleich zu welchem Zweck.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x94A919BE276C7EA1.asc
Type: application/pgp-keys
Size: 2476 bytes
Desc: OpenPGP public key
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20220904/afd40bf2/OpenPGP_0x94A919BE276C7EA1.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 665 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20220904/afd40bf2/OpenPGP_signature.sig>
More information about the panama-dev
mailing list