Closed micocube closed 3 months ago
That could be related to #687 and wrong constant values on M1. I should soon have access to a M1 to perform further tests.
I've disabled JNA support on Apple/M1 with https://github.com/jline/jline3/pull/721 until this can be fixed.
Hi,
I also stumbled over this issue today on M1 in combination with spring boot shell. After finding this thread I thought of overriding the constants as 'quick hack'.
➜ tmp cat <<EOF >TIOCGWINSZ.c
#include <stdio.h>
#include <sys/ioctl.h>
int main() {
printf("TIOCGWINSZ: 0x%lx\n", TIOCGWINSZ);
printf("TIOCSWINSZ: 0x%lx\n", TIOCSWINSZ);
return 0;
}
➜ tmp make TIOCGWINSZ
cc TIOCGWINSZ.c -o TIOCGWINSZ
➜ tmp ./TIOCGWINSZ
TIOCGWINSZ: 0x40087468
TIOCSWINSZ: 0x80087467
➜ tmp file TIOCGWINSZ
TIOCGWINSZ: Mach-O 64-bit executable arm64
Ooops - the values are the same as for x64... Interesting.
After some further investigation: It seems to be related to the JRE used. Some initial test results: (done with JLine 3.4 as this is the current version from the 'original' dependency)
Yes, it's working for Arm and X86 running in emulation. It seems just (at least for me) the dcevm enabled JetBrains JDK-11 is producing this stacktrace....
Closing as won't fix. JNA support is not the way to go and has been deprecated in favour of FFM .
jline-jna error
Code
Environment