Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Windows on ARM #238

Closed
rubin55 opened this issue May 9, 2022 · 5 comments · May be fixed by gnodet/jansi#1
Closed

Support Windows on ARM #238

rubin55 opened this issue May 9, 2022 · 5 comments · May be fixed by gnodet/jansi#1
Milestone

Comments

@rubin55
Copy link

rubin55 commented May 9, 2022

When jansi is invoked on Windows (11) on ARM64, I get an exception, probably due to the os.arch and os.name combination not being anticipated:

jshell> System.getProperty("os.name");
$2 ==> "Windows 11"
jshell> System.getProperty("os.arch");
$3 ==> "aarch64"

Could you add support for Windows on ARM in Jansi?

PS: the exception I got (through sbt 1.6.2, which uses Jansi 2.1.0):

sbt
May 09, 2022 10:13:54 PM org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32
        at sbt.internal.util.WindowsSupport$.getConsoleMode(WindowsInputStream.scala:20)
        at sbt.internal.util.JLine3$.setEnableProcessInput(JLine3.scala:234)
        at sbt.internal.util.JLine3$.enterRawMode(JLine3.scala:244)
        at sbt.internal.util.Terminal$ConsoleTerminal.enterRawMode(Terminal.scala:861)
        at sbt.internal.util.Terminal$ConsoleTerminal.<init>(Terminal.scala:820)
        at sbt.internal.util.Terminal$.newConsoleTerminal(Terminal.scala:758)
        at sbt.internal.util.Terminal$.withStreams(Terminal.scala:346)
        at sbt.xMain$.withStreams$1(Main.scala:87)
        at sbt.xMain$.run(Main.scala:121)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:57)
        at sbt.xMain.run(Main.scala:46)
        at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
        at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
        at xsbt.boot.Launch$.run(Launch.scala:149)
        at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
        at xsbt.boot.Launch$.launch(Launch.scala:159)
        at xsbt.boot.Launch$.apply(Launch.scala:44)
        at xsbt.boot.Launch$.apply(Launch.scala:21)
        at xsbt.boot.Boot$.runImpl(Boot.scala:78)
        at xsbt.boot.Boot$.run(Boot.scala:73)
        at xsbt.boot.Boot$.main(Boot.scala:21)
        at xsbt.boot.Boot.main(Boot.scala)
[error] [launcher] error during sbt launcher: java.lang.NoClassDefFoundError: Could not initialize class org.fusesource.jansi.internal.Kernel32

Note: I'm not 100% sure if the os.name/os.arch combination is at play here, or if sbt itself is doing something funny on this platform. A relevant issue on the sbt project is: sbt/sbt#5495

@gnodet
Copy link
Member

gnodet commented Jun 1, 2022

There's a windows-arm64 cross build platform that we should be able to use in the makefile.

gnodet added a commit to gnodet/jansi that referenced this issue Jun 2, 2022
@gnodet
Copy link
Member

gnodet commented Jun 2, 2022

@rubin55 could you build jansi with #240 and see if that works for you ? I don't have access to such a platform...

@rubin55
Copy link
Author

rubin55 commented Aug 5, 2022

@gnodet I would like to, but not sure how; Do you have a quick howto build Jansi on Windows? Do I understand correctly that a Jansi release would contain binary artifacts (dll's, so's) and that other projects would include a version of Jansi that then supports X number of platforms by way of such a binary artifact?

@imkiva
Copy link

imkiva commented Mar 20, 2023

could you build jansi with #240 and see if that works for you ? I don't have access to such a platform...

I tried #240 on my Windows ARM device. It works like a charm! Here's what I do to build the project:

$ make native-all # or just make win-arm64
$ mvn install

Would like to see #240 get merged so I won't need a maven local repository to use jansi with Windows ARM support! Thank you for the port! ❤️

@gnodet
Copy link
Member

gnodet commented Mar 20, 2023

could you build jansi with #240 and see if that works for you ? I don't have access to such a platform...

I tried #240 on my Windows ARM device. It works like a charm! Here's what I do to build the project:

$ make native-all # or just make win-arm64
$ mvn install

Would like to see #240 get merged so I won't need a maven local repository to use jansi with Windows ARM support! Thank you for the port! ❤️

Awesome, that PR needed a confirmation !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants