jzy3d / jogl-maven-deployer

Scripts to make a maven distribution out of JOGL 2.4
6 stars 2 forks source link

This JOGL version Is not working on Linux Mint 20, 20.1, 20.2 20.3 #4

Closed AstroPixelProcessor closed 2 years ago

AstroPixelProcessor commented 2 years ago

When I build my application with this jogl version (that also works on macOS M1 hardware), I get the following issue when OpenGl is initialized on Linux Mint 20:

Warning: Caught Exception while retrieving executable temp base directory: java.io.IOException: Could not determine a temporary executable directory at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1336) at com.jogamp.common.util.cache.TempFileCache.(TempFileCache.java:84) at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:96) at com.jogamp.common.os.Platform$1.run(Platform.java:313) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at com.jogamp.common.os.Platform.(Platform.java:290) at com.jogamp.opengl.GLProfile.(GLProfile.java:154) at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117) at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7222) at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.(AstroPixelProcessor.java:1482) at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1090) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load library: /opt/astropixelprocessor/natives/linux-amd64/libgluegen_rt.so at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source) at java.base/java.lang.Runtime.load0(Unknown Source) at java.base/java.lang.System.load(Unknown Source) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:625) at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64) at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488) at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427) at com.jogamp.common.os.Platform$1.run(Platform.java:321) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at com.jogamp.common.os.Platform.(Platform.java:290) at com.jogamp.opengl.GLProfile.(GLProfile.java:154) at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)

So the loading of libraries is not working for some reason. It does work on Fedora 28 and Windows 10 and macOS Big Sur.

If I package my application with these jars: https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/fat/ all works on all the platforms, except on the M1 hardware.

It seems like a very weird issue, I can see that /tmp folders are created to copy and then load the libraries, But somehow the libraries are not copied. And why it does work on the regular JOGL release and not in your maven M1 release is the question I think.

Please let me know if you need more info to solve this issue and thank you very much for your maven deployer and macOS M1 compiled version.

Mabula

AstroPixelProcessor commented 2 years ago

After more investigation this issue is not correctly formulated and it can be closed.

I was also switching to Temurin JDK17 and with this JDK your JOGL M1 version does not work on Linux Mint, but also the regular JOGL from https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/fat/ does not work...

So I will report it on the JOGL forum.

jzy3d commented 2 years ago

Thank you for reporting and clarifying the issue. I’ll read your feedback on jogamp forum and close this issue.

do not hesitate to open other issues or modify a bit this one and reopen it.

For jogl related issues, I rather tend to use the issue tracker in jzy3d/jogl, a clone of jogl into which I add enhancements and bug fixes.