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

Does not work on Apple M1 arm ? #141

Closed
herve-ch opened this issue Aug 9, 2022 · 5 comments
Closed

Does not work on Apple M1 arm ? #141

herve-ch opened this issue Aug 9, 2022 · 5 comments
Labels
bug Something isn't working gradle Related to Gradle scripts
Milestone

Comments

@herve-ch
Copy link

herve-ch commented Aug 9, 2022

Hello does this work on M1 apple arm?

I have this error

[LWJGL] Platform/architecture mismatch detected for module: org.lwjgl
JVM platform:
macOS aarch64 17.0.3.1
Java HotSpot(TM) 64-Bit Server VM v17.0.3.1+2-LTS-6 by Oracle Corporation
Platforms available on classpath:
linux/x64
macos/x64
windows/x64
[LWJGL] Failed to load a library. Possible solutions:
a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
b) Add the JAR that contains the shared library to the classpath.

@LeHaine
Copy link
Member

LeHaine commented Aug 9, 2022

Looks like MacOS Arm natives need to be added to the dependencies for LWJGL.

@LeHaine LeHaine added bug Something isn't working gradle Related to Gradle scripts labels Aug 9, 2022
@LeHaine LeHaine added this to the 0.4 milestone Aug 9, 2022
@LeHaine LeHaine linked a pull request Aug 10, 2022 that will close this issue
@LeHaine LeHaine removed a link to a pull request Aug 10, 2022
@LeHaine LeHaine linked a pull request Aug 10, 2022 that will close this issue
LeHaine added a commit that referenced this issue Aug 10, 2022
* gradle: add additional lwjgl natives for arm64 (#141)

* gradle: update lwjgl version from 3.3.0 to 3.3.1
@LeHaine
Copy link
Member

LeHaine commented Aug 10, 2022

@herve-ch arm64 dependencies have been added in the latest 0.4.0-SNAPSHOT. Feel free to try it out again. If it fails then we can reopen this issue.

@herve-ch
Copy link
Author

herve-ch commented Aug 11, 2022

@LeHaine Hello I tried snapshot 0.4.0.6adde7e-SNAPSHOT I have an error:
Exception in thread "main" java.lang.ExceptionInInitializerError at org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:1046) at com.lehaine.littlekt.LwjglContext$start$1.invokeSuspend(LwjglContext.kt:75) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284) at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59) at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38) at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) at com.lehaine.littlekt.LwjglContext.start$core(LwjglContext.kt:69) at com.lehaine.littlekt.LittleKtApp.start(LittleKtApp.kt:14) at com.game.template.LwjglAppKt.main(LwjglApp.kt:12) at com.game.template.LwjglAppKt.main(LwjglApp.kt) Caused by: java.lang.IllegalStateException: GLFW may only be used on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0. at org.lwjgl.glfw.EventLoop.<clinit>(EventLoop.java:30) ... 14 more

@herve-ch
Copy link
Author

@LeHaine
Using VM -XstartOnFirstThread option works but I have another error in console:
[LWJGL] GLFW_FEATURE_UNAVAILABLE error Description : Cocoa: Regular windows do not have icons on macOS Stacktrace : org.lwjgl.glfw.GLFW.nglfwSetWindowIcon(GLFW.java:2336) org.lwjgl.glfw.GLFW.glfwSetWindowIcon(GLFW.java:2368) com.lehaine.littlekt.LwjglContext$start$1.invokeSuspend(LwjglContext.kt:184) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284) kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59) kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38) kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) com.lehaine.littlekt.LwjglContext.start$core(LwjglContext.kt:69) com.lehaine.littlekt.LittleKtApp.start(LittleKtApp.kt:14) com.game.template.LwjglAppKt.main(LwjglApp.kt:12) com.game.template.LwjglAppKt.main(LwjglApp.kt)

@LeHaine
Copy link
Member

LeHaine commented Aug 11, 2022

@herve-ch Thanks for trying. I am glad it works now. Looks like that MacOS icon features are not available. I'll open a separate issue for that to handle that feature check. (#143). Closed in #144.

@LeHaine LeHaine removed a link to a pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gradle Related to Gradle scripts
Projects
None yet
Development

No branches or pull requests

2 participants