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

Lwjgl-2 doesn't support Oracle-JDK-19 #1985

Closed
pavly-gerges opened this issue Mar 12, 2023 · 12 comments
Closed

Lwjgl-2 doesn't support Oracle-JDK-19 #1985

pavly-gerges opened this issue Mar 12, 2023 · 12 comments
Labels
duplicate This issue is a duplicate of a previously reported issue.

Comments

@pavly-gerges
Copy link
Contributor

pavly-gerges commented Mar 12, 2023

Today, i was randomly testing the behavior of a jMonkeyEngine desktop application using oracle-jdk-19 on a linux amd64 machine, and some native binaries have been removed from the jdk-19 libjawt.so or may be get merged into another shared object file, i have to look for this binary specifically on the JEPs, but later. i opened the issue for now to not mess this out...

here is the crashlogs:

└──╼ $./gradlew -Dorg.gradle.java.home="/home/twisted/GradleProjects/Serial4j-v1/jdk-19" run
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

> Task :desktop:run
Mar 12, 2023 8:26:20 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.4.0-stable
 * Branch: HEAD
 * Git Hash: cb5173b
 * Build Date: 2021-05-30
Exception in thread "jME3 Main" java.lang.UnsatisfiedLinkError: /home/pavl-machine/Music/CrossPlatformModule/desktop/liblwjgl64.so: /home/twisted/GradleProjects/Serial4j-v1/jdk-19/lib/libjawt.so: version `SUNWprivate_1.1' not found (required by /home/pavl-machine/Music/CrossPlatformModule/desktop/liblwjgl64.so)
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2404)
        at java.base/java.lang.Runtime.load0(Runtime.java:785)
        at java.base/java.lang.System.load(System.java:2009)
        at org.lwjgl.Sys$1.run(Sys.java:70)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
        at org.lwjgl.Sys.loadLibrary(Sys.java:87)
        at org.lwjgl.Sys.<clinit>(Sys.java:117)
        at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:220)
        at java.base/java.lang.Thread.run(Thread.java:1589)

BUILD SUCCESSFUL in 26s
7 actionable tasks: 4 executed, 3 up-to-date

EDIT:
Lwjgl-3 works fine when running the application using jdk-19.

@Ali-RS Ali-RS added the bug Something that is supposed to work, but doesn't. More severe than a "defect". label Mar 12, 2023
@pavly-gerges
Copy link
Contributor Author

If we know what had happened to libawt.so source code, we could redirect the call to the new binary, i cannot find anything related to awt on the jdk-19 JEPs, have anyone tried jdk-18 with lwjgl-2 ? Can you reproduce this issue with jdk-18 ?

@Ali-RS
Copy link
Member

Ali-RS commented Mar 12, 2023

Running on jMonkeyEngine 3.4.0-stable

Hehe! update to 3.6.0-beta3 and it should be fine I believe ;)

@Ali-RS
Copy link
Member

Ali-RS commented Mar 12, 2023

Duplicate of #1215

@Ali-RS Ali-RS marked this as a duplicate of #1215 Mar 12, 2023
@Ali-RS Ali-RS added duplicate This issue is a duplicate of a previously reported issue. and removed bug Something that is supposed to work, but doesn't. More severe than a "defect". labels Mar 12, 2023
@Ali-RS
Copy link
Member

Ali-RS commented Mar 12, 2023

@Scrappers-glitch please feel free to reopen this issue if it still happens with 3.6.0-beta3.

@Ali-RS Ali-RS closed this as completed Mar 12, 2023
@pavly-gerges
Copy link
Contributor Author

I tested it now and it happens with v3.6.0-beta3 (as long as the native core of lwjgl-2 hasn't changed then i suspected this).

@Ali-RS
Copy link
Member

Ali-RS commented Mar 12, 2023

Oops! going to test it now.

@Ali-RS Ali-RS reopened this Mar 12, 2023
@pavly-gerges
Copy link
Contributor Author

I am going to test it with open-jdk but later not now, but hey everything should support oracle jdk....

@pavly-gerges
Copy link
Contributor Author

I navigated to the root jdk-19 directory and found the libawt.so binary....

┌─[pavl-machine@pavl-machine]─[/home/twisted/GradleProjects/Serial4j-v1/jdk-19]
└──╼ $ls */* | grep libawt
lib/libawt_headless.so
lib/libawt.so
lib/libawt_xawt.so

The issue is related specifically to the SUNWprivate_1.1 version of libawt that it is not found or has changed, any ideas on what is this ???

@Ali-RS
Copy link
Member

Ali-RS commented Mar 12, 2023

@Scrappers-glitch did you remove old lwjgl2 natives before updating to jme 3.6.0-beta3?

Make sure to remove old lwjgl2 natives so the new ones get extracted.

@pavly-gerges
Copy link
Contributor Author

@Scrappers-glitch did you remove old lwjgl2 natives before updating to jme 3.6.0-beta3?

Make sure to remove old lwjgl2 natives so the new ones get extracted.

It ran fine now, thank you !

I see there was a change in the lwjgl-2 binaries on commit 3e1b823

@Ali-RS
Copy link
Member

Ali-RS commented Mar 12, 2023

Yes, natives for Linux are updated. They are built with java 11.

Edit:
See
jMonkeyEngine/lwjgl2@eb0c8dc

@MeFisto94
Copy link
Member

FWIW this is all exactly the reason "the old" jwlgl2 didn't run, "sun private" fields have been removed from existing .so's, causing a rebuild. Could have been that we'd need to re-build with 19, but luckily it's the same regression that we had on 11 already, albeit the symptom is now more explicit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate of a previously reported issue.
Projects
None yet
Development

No branches or pull requests

3 participants