JOGL for Mac ARM Silicon

classic Classic list List threaded Threaded
64 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: JOGL for Mac ARM Silicon

BelalShareb
Thanks for investigating.
Here is what I got after adding the VM arguments,
getJarUri Default jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/com/jogamp/common/os/Platform.class
        -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/com/jogamp/common/os/Platform.class
getJarUri res: com.jogamp.common.os.Platform -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/com/jogamp/common/os/Platform.class -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/com/jogamp/common/os/Platform.class
JNILibLoaderBase: addNativeJarLibs(
  classesFromJavaJars   = [class jogamp.common.Debug]
  singleJarMarker       = null
)
getJarUri Default jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/jogamp/common/Debug.class
        -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/jogamp/common/Debug.class
getJarUri res: jogamp.common.Debug -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/jogamp/common/Debug.class -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/jogamp/common/Debug.class
getJarName res: gluegen-rt.jar
JNILibLoaderBase: jarBasename: gluegen-rt
JNILibLoaderBase: addNativeJarLibsImpl(
  classFromJavaJar  = class jogamp.common.Debug
  classJarURI       = jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar!/jogamp/common/Debug.class
  jarBasename       = gluegen-rt.jar
  os.and.arch       = macosx-universal
  nativeJarBasename = gluegen-rt-natives-macosx-universal.jar
)
JNILibLoaderBase: addNativeJarLibsImpl: initial: file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt.jar -> file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/
JNILibLoaderBase: addNativeJarLibsImpl: nativeLibraryPath: natives/macosx-universal/
JNILibLoaderBase: addNativeJarLibsImpl: module: gluegen-rt-natives-macosx-universal.jar -> jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt-natives-macosx-universal.jar!/
getJarFile.0: jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt-natives-macosx-universal.jar!/
getJarFile.1: jar:file:/Users/belalshareb/My%20Drive/Computer%20Graphics/Lib/gluegen-rt-natives-macosx-universal.jar!/
getJarFile res: /Users/belalshareb/My Drive/Computer Graphics/Lib/gluegen-rt-natives-macosx-universal.jar
JarUtil: extract: /Users/belalshareb/My Drive/Computer Graphics/Lib/gluegen-rt-natives-macosx-universal.jar -> /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430, extractNativeLibraries true (natives/macosx-universal/), extractClassFiles false, extractOtherFiles false
JarUtil: JarEntry : META-INF/MANIFEST.MF other-file skipped
JarUtil: JarEntry : jogamp/nativetag/common/macosx/universal/TAG.class class-file skipped
JarUtil: JarEntry : isNativeLib true, isClassFile false, isDir false, isRootEntry false
JarUtil: MKDIR (parent): natives/macosx-universal/libgluegen-rt.jnilib -> /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal
JarUtil.fixNativeLibAttribs: /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal/libgluegen-rt.jnilib - UnsatisfiedLinkError: 'boolean com.jogamp.common.util.JarUtil.fixNativeLibAttribs(java.lang.String)'
JarUtil: EXTRACT[1]: [gluegen-rt -> ] natives/macosx-universal/libgluegen-rt.jnilib -> /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal/libgluegen-rt.jnilib: 35184 bytes, addedAsNativeLib: true
JNILibLoaderBase: addNativeJarLibsImpl.X: gluegen-rt.jar / gluegen-rt-natives-macosx-universal.jar -> ok: true; duration: now 3 ms, total 3 ms (count 1, avrg 3.000 ms)
JNILibLoaderBase: addNativeJarLibsWhenInitialized: count 1, ok true
JNILibLoaderBase: loadLibraryInternal(gluegen-rt), TempJarCache: /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal/libgluegen-rt.jnilib
JNILibLoaderBase: System.load(/var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal/libgluegen-rt.jnilib) - mode 2
java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal/libgluegen-rt.jnilib
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408)
        at java.base/java.lang.Runtime.load0(Runtime.java:785)
        at java.base/java.lang.System.load(System.java:2011)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:603)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:106)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:487)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:421)
        at com.jogamp.common.os.Platform$1.run(Platform.java:317)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:287)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:147)
        at HSV2RGB.main(HSV2RGB.java:341)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/2v/3dmc82v53rv9lb3rgkhgpc940000gn/T/jogamp_0000/file_cache/jln9923810561479307621/jln1928061346834399430/natives/macosx-universal/libgluegen-rt.jnilib
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2408)
        at java.base/java.lang.Runtime.load0(Runtime.java:785)
        at java.base/java.lang.System.load(System.java:2011)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:603)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:106)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:487)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:421)
        at com.jogamp.common.os.Platform$1.run(Platform.java:317)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:287)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:147)


I only found the libgluegen-rt.jnilib file in the folder in question.
I called the method 'GLProfile.initSingleton()' at the beginning of my main method. It didn't solve the problem sadly.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL for Mac ARM Silicon

Martin
Thanks,
As your problem seams to be able to load gluegen and as the logs say it was properly extracted (and you confirmed in appears on your hard drive), I would say you did not use the release that was made for M1 (which is not provided by Jogamp server but only by mine).

FYI, I summarized the possible reasons and solutions for not being able to load gluegen here.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL for Mac ARM Silicon

BelalShareb
Oh indeed you're right. Yours just worked fine. Sorry, I thought the macOS universal package did support support all architectures, including M1 arm, and I'm not sure if I made a mistake thinking that way. But now it's finally working. Thank you!

Regards,
Reply | Threaded
Open this post in threaded view
|

Re: JOGL for Mac ARM Silicon

Martin
In reply to this post by Manu
Hi Manu,

The Gephi team is using your patch. They are discussing remaining issues on ARM + macOS 12. You probably want to read and discuss this here :

https://github.com/jzy3d/jogl/issues/28#issuecomment-1368391168

Additionally, did you explore the effect of changing the kickNSApp flag value?

Thanks!
1234