-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Part fix for M1 support #5211
Part fix for M1 support #5211
Conversation
fix: part fix for build on MacOS M1
would it be ok to update to same protobuf version everywhere?
|
@soloturn I have updated protobuf and protoc versions to 3.22.0 instead of 3.18.0 because I found some vulnerabilities on the 3.18.0 version of protobuf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could run gradlew compileJava
just fine on my M1 Mac - not sure whether that's new with this PR or not, though.
Upon running gradlew game
I run into the same error as mentioned above:
Exception in thread "splashscreen-loop" java.lang.IllegalStateException: GLFW may only be used on the main thread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0.
at org.lwjgl.glfw.EventLoop.check(EventLoop.java:33)
at org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:1078)
at org.terasology.engine.GLFWSplashScreen.run(GLFWSplashScreen.java:58)
at java.base/java.lang.Thread.run(Thread.java:833)
20:26:36.783 [main] INFO c.b.gdx.physics.bullet.NativeSupport - Loading JNBullet Library:bullet
java.lang.UnsatisfiedLinkError: /Users/skaldarnar/movingblocks/ts-iota/natives/macosx/libbullet-darwin-amd64.dylib: dlopen(/Users/skaldarnar/movingblocks/ts-iota/natives/macosx/libbullet-darwin-amd64.dylib, 0x0001): tried: '/Users/skaldarnar/movingblocks/ts-iota/natives/macosx/libbullet-darwin-amd64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/skaldarnar/movingblocks/ts-iota/natives/macosx/libbullet-darwin-amd64.dylib' (no such file), '/Users/skaldarnar/movingblocks/ts-iota/natives/macosx/libbullet-darwin-amd64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.badlogic.gdx.physics.bullet.NativeSupport.load(NativeSupport.java:117)
at com.badlogic.gdx.physics.bullet.Bullet.<clinit>(Bullet.java:28)
at org.terasology.engine.core.TerasologyEngine.<init>(TerasologyEngine.java:149)
at org.terasology.engine.core.TerasologyEngineBuilder.build(TerasologyEngineBuilder.java:31)
at org.terasology.engine.Terasology.call(Terasology.java:169)
at org.terasology.engine.Terasology.call(Terasology.java:69)
at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
at picocli.CommandLine.access$1200(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
at picocli.CommandLine.execute(CommandLine.java:2058)
at org.terasology.engine.Terasology.main(Terasology.java:138)
As these changes don't look like this could break anything that is not yet broken I guess we can approve and merge.
Not sure what to do about JNBullet libraries in the long run - I believe that we had discussions about getting rid of it, but I'm by no means knowledgable enough to make a good call here...
Also doesn't seem to break anything obvious on non-mac. |
For JNBullet, somebody may want to revive MovingBlocks/JNBullet#16. |
Failing test is known sporadic and not expected to be related to this change. |
Partly fixes #5055 . Adds support for lwjgl for macOS-arm64, and updates protoc version from 3.17.0 to 3.18.0 (3.17.0 has no arm64 support).
Still doesnt resolve the build issue due to JNBullet as follows
EDIT: Updated protobuf and protoc to 3.22.0 instead of 3.18.0, as protobuf 3.18.0 has vulnerabilities.