You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm fixing some native-image related issues for Jansi.
Jansi uses FFM or JNI by default, but they do not work in statically linked native images. Therefore, I provide a slower but working implementation. The specific implementation to be used is determined at build time.
However, there seems to be no way for me to know at build time whether the native image is statically linked, so users has to add options manually to make it work.
Can you add some system properties to tell whether the program is statically linked and whether the libc used is musl or glibc?
The text was updated successfully, but these errors were encountered:
Jansi uses FFM or JNI by default, but they do not work in statically linked native images. Therefore, I provide a slower but working implementation.
Some more detailed information:
On Linux/macOS, we need to call two native methods: isatty and ioctl.
Symbol.loaderLookup() cannot find these symbols in statically linked native images, so the only way to call them is the Native Image C API. Unfortunately, ioctl is a variadic function, and the Native Image C API does not yet support variadic functions (#7507), so we have to use a slower way around this limitation.
Also we cannot use Native Image C API on Windows due to #1760, this makes me depressed.
wirthi
changed the title
Get whether it is a static link when building a native image
[GR-50345] Get whether it is a static link when building a native image
Nov 19, 2024
I'm fixing some native-image related issues for Jansi.
Jansi uses FFM or JNI by default, but they do not work in statically linked native images. Therefore, I provide a slower but working implementation. The specific implementation to be used is determined at build time.
However, there seems to be no way for me to know at build time whether the native image is statically linked, so users has to add options manually to make it work.
Can you add some system properties to tell whether the program is statically linked and whether the libc used is musl or glibc?
The text was updated successfully, but these errors were encountered: