-
Notifications
You must be signed in to change notification settings - Fork 67
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
Unable to load libsteamworks4j.dylib on Apple Silicon M1 (new MAC hardware) #117
Comments
The latest version on
Would be cool if you give this a try, esp you with access to a Silicon M1. I don't have one in reach for testing myself. |
I also have an M1 mac and would be happy to test this, but it doesn't look like 1.10.0-SNAPSHOT has been uploaded to sonatype. Should I build it from source or copy the newly built natives directly? |
You should be fine to just build the Maven packages from source. The prebuilt libraries are up to date. |
I built 1.10.0-SNAPSHOT and used it in an internal release on Steam (jpackage with an arm64 JDK). My game doesn't make extensive use of the steamworks APIs, but the game does launch and change the location of the notification popup correctly. |
This seems to still be an issue for the latest builds available on gradle. Is there any way to include a version of this that works on the M1 in my build script? |
You can run |
I try building locally with mvn and add manually the .jar and i have the next issue:
Anyone knows if i have to add another dependency? This is my
|
Nevermind, it was a problem with my repositories declarations. I follow the steps of run |
@code-disaster Do we need to do anything else? I installed arm64 versions of both Java and Maven and built the current state of the repo using In Version 1.10.0 there seems to be a major change in that the loaders were put into separate libraries. Since I'm using libGDX I used the GDX loader like this: For it to work I had to add these artifacts into the gradle file (even though I'm not using the lwjgl3 loader, but not having it leads to the error message posted by sebaber):
However, the arm64 machine code seems to still not be included in the jar files:
|
Also, what libGDX version are you on? Might be worth a look to step into |
Hi, thanks for the fast reply. I am using libGDX version 1.11.0. Since I cannot do much about them here are the jna files: In terms of stepping it fails in SharedLibraryLoader because libsteam_api.dylib doesn't exist in |
Oh this got me an idea. Please try building with |
Ah, I apparently forgot to put the Steamworks SDK's files into the project folder. Loading of However, after steam_api was loaded from
I wonder if it is supposed to search for libsteam_api.dylib after it was loaded successfully (if yes it has to fail due to the changed path). Edit: Actually, it runs just fine after copying libsteam_api.dylib manually into the folder where libsteamworks4j.dylib gets copied to. |
Well, it really seems to be related to the Gdx library loader as using SteamLibraryLoaderLwjgl3 solves the issue completely. In case someone needs the built jar files: steamworks4j-1.10.0-SNAPSHOT_fixed.zip I continued to encounter the |
Want to add that this affects intel Macs as well. I tried building my own loaders, based on the gdx-jnigen-loader, like in master, but I could not get it to work. The only way I was able to get it working with the 1.57 SDK was to branch at |
The following error occurs when attempting to run SteamAPI.loadLibraries() on MACs with Apple Silicon M1 chips (newer MAC hardware). I've attempted to rebuild the native libraries but still receive the same error while using them:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/steamworks4j/1.9.0/libsteamworks4j.dylib
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.codedisaster.steamworks.SteamSharedLibraryLoader.loadLibrary(SteamSharedLibraryLoader.java:124)
at com.codedisaster.steamworks.SteamAPI.loadLibraries(SteamAPI.java:27)
Operating System: Mac OS X
Architecture: aarch64
The text was updated successfully, but these errors were encountered: