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

OPENAL does't work with Mac M1 #2

Closed
maheshkurmi opened this issue Dec 25, 2021 · 6 comments
Closed

OPENAL does't work with Mac M1 #2

maheshkurmi opened this issue Dec 25, 2021 · 6 comments

Comments

@maheshkurmi
Copy link

on MAcbook pro M1, opegl is running absolutely fine but when I try to use openAL, it gives error in loading library


com.jogamp.openal.ALException: java.lang.ExceptionInInitializerError
	at com.jogamp.openal.ALFactory.initialize(ALFactory.java:102)
	at com.jogamp.openal.ALFactory.getALC(ALFactory.java:137)
	at com.jogamp.openal.util.ALut.alutInit(ALut.java:64)
	at org.shikhar.simphy.audio.impl.SoundManager.initialize(SoundManager.java:59)
	at org.shikhar.simphy.Simphy.<init>(Simphy.java:1777)
	at org.shikhar.simphy.SplashWindow.invokeMain(SplashWindow.java:135)
	at org.shikhar.simphy.SplashWindow.main(SplashWindow.java:85)
Caused by: java.lang.ExceptionInInitializerError
	at com.jogamp.openal.ALFactory.initialize(ALFactory.java:91)
	... 6 more
Caused by: java.lang.RuntimeException: Couln't load native AL/JNI glue library
	at jogamp.openal.ALImpl$1.run(ALImpl.java:1618)
	at jogamp.openal.ALImpl$1.run(ALImpl.java:1608)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at jogamp.openal.ALImpl.<clinit>(ALImpl.java:1608)
	... 7 more

I have added jogl-all, gluegen-rt, joal and all3 corressponding mac universal native jars in classpath. Do i need to add dylibs somewhere?

@jzy3d
Copy link
Owner

jzy3d commented Dec 25, 2021

I only worked on JOGL, so JOAL and JOCL should be upgraded the same way I did. Have you seen the howto where I explain how I did it ?
The thing I do not understand is that I only built and deployed JOGL (and Gluegen) as RC4 maven artifact, so I wonder how you could even compile your project with these versions.

@maheshkurmi
Copy link
Author

The thing I do not understand is that I only built and deployed JOGL (and Gluegen) as RC4 maven artifact, so I wonder how you could even compile your project with these versions.
I just downloaded jar files and added to classpath and placed native library jars in same folder as the jar files, it worked.
i also tried placing "dylib" files instead of native jars, it still worked.

I think I am using joal from joal-android-natives-macosx-universal.jar which may not be compiled for arm version. By the way I downloaded files from https://download.jzy3d.org/jogl/ since my java project is not a maven project.

Have you compiled joal for Mac arm64? If yes please share, else guide me how to do that?

@jzy3d
Copy link
Owner

jzy3d commented Dec 26, 2021

I did not build JOAL for ARM64. If you want to do it, this documentation on enabling JOGL for ARM64 can help you.

You are welcome to do it on this mirror repository, so that I can later bundle it with JOGL. Using a branch name similar to the one I used for JOGL could help (feature/macosx-arm64).

Hope this helps!

@maheshkurmi
Copy link
Author

I tried following documentation but I could't find the guide to be usable for building joal(May be it was't obvious for me only).
In case you decide to build joal, please let me know.

@jzy3d
Copy link
Owner

jzy3d commented Dec 26, 2021

Yes this is normal, it only documents how to patch JOGL, but I think you can use it to patch JOAL.

@maheshkurmi
Copy link
Author

Thanyou very much for the help...
Following your guide I managed to build joal native libs for mac arm64. You can find the native builds at https://github.com/maheshkurmi/jogl-macarm64-builds.
You may update your maven repo with joal natives for arm64.

@jzy3d jzy3d closed this as completed Mar 6, 2022
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

No branches or pull requests

2 participants