JOGL works on JDK 17 but not on JDK 18

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

JOGL works on JDK 17 but not on JDK 18

stefanreich
What the topic says. I have a demo program that I am running on Linux Mint 19. JDK 17 works fine, JDK 18 gives:

FAIL: java.lang.UnsatisfiedLinkError: /tmp/jogamp_0000/file_cache/jln5860679930746491415/jln3657902754341439289/natives/linux-amd64/libnativewindow_awt.so: /home/stefan/dev/jdk-18/lib/libjawt.so: version `SUNWprivate_1.1' not found (required by /tmp/jogamp_0000/file_cache/jln5860679930746491415/jln3657902754341439289/natives/linux-amd64/libnativewindow_awt.so)

What to do?

Also... is the last released version really from 2015? Is anything newer available?

PS: I'm making an image recognizer in Java and I want to throw in some GPU calculations/renderings, that's why JOGL interests me.

Many greetings,
Stefan
Gaz.AI
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

Martin
Hi Stefan,

The last version is from 2021 and number is 2.4-rc4.

I encountered something similar to you on Ubuntu 18 and haven't seen it again on Ubuntu 20 (but maybe my evaluation was not reliable and the problem came from varying JDK version as you mention).

Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

gouessej
Administrator
In reply to this post by stefanreich
Hello

I had the same problem:
https://forum.jogamp.org/Oracle-Java-13-Linux-version-SUNWprivate-1-1-not-found-td4040172.html

You're already using Temurin, I don't reproduce your problem :s
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

Martin
This problem is a bit mysterious but seams to be out of JOGL : it occurs on LWJGL, SWT, and other software.

The JDK has references to this keyword but not as java nor native source file.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

Martin
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
In reply to this post by Martin
Hey Martin, thanks for your input... but why exactly are we talking about JDK 13?

Actually I might ask the JVM devs if they have any idea why JOGL breaks on JDK 18. It did work before after all...
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

gouessej
Administrator
The problem you reported already occured with Java 13 and as far as I know, I succeed in running JOGL with Java 18 under GNU Linux, I don't think your problem has something to do with Java 18.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
OK I see what you're saying. But on my machine, the exact same program runs without error with JDK 17 but produces the error on JDK 18. I'd say that pretty much means it's gotta be a change in the JDK, no?
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

Martin
There is this Oracle doc mentioning SUNWprivate_1.1, the .1 part of the name being possibly a datastructure or library versioning. I agree that discussing this with OpenJDK team is a good idea. Let us know what they suggest!
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
I did a few more tests, and the problem is actually not in the JDK major version (17 vs 18) - but rather in the JDK distribution.

-Temurin 17 works (OpenJDK Runtime Environment Temurin-17.0.1+12-202201132255)
-Oracle JDK 17 produces the SUNWprivate error (Java(TM) SE Runtime Environment (build 17.0.3.1+2-LTS-6))
-Oracle JDK 18 produces the SUNWprivate error (Java(TM) SE Runtime Environment (build 18.0.1.1+2-6))
-OpenJDK 17 produces the SUNWprivate error (OpenJDK Runtime Environment (build 17.0.2+8-86))
-OpenJDK 18 produces the SUNWprivate error (OpenJDK Runtime Environment (build 18+36-2087))

So it seems only Temurin gets the job done...
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

Martin
Hi,

Thanks for your feedback!

What you say conforms to what is said in this Oracle doc about symbol versioning.

I haven't found other info discussing this SUNPrivate / SUNW_1.1 symbols up to now.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
I don't really have a clue about all the linking stuff...

Could it help to recompile JOGL on Linux?
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

gouessej
Administrator
I'm not sure that it would help. Is there anything wrong with using Temurin in the meantime?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
For me personally, using Temurin is completely fine. I also would like my software to be usable by others though, so it would be nice to not depend on one specific JDK distribution. But yeah I guess you're right, I'm worrying too much, lol. Linux users are far fewer than Win/Mac users and I could even ship a bundle with Temurin and my Java code.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

gouessej
Administrator
Your feedback is valuable and I still would appreciate this problem to be fixed in other JDKs. Yes you can ship a bundle with Temurin; if you need some help to do it, let me know. You can either use JPackage and/or JNDT depending on the licence of your own code.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

stefanreich
Guyyys... I think I just messed up. It appears I was actually using an older version of Jogamp.

I'm now using this: https://jogamp.org/deployment/archive/rc/v2.4.0-rc-20210111/fat/jogamp-fat.jar

...and it runs fine on all the JDKs.

ioi.lam@oracle.com helped me out to notice the problem. If you unpack the jar and run this:

for i in $(find . -name \*.so); do echo $i; strings $i | grep SUNWprivate ; done

It should show no references to SUNWprivate. If it does, you have a very old library on your hands and should just update.

Hey, even geniuses mess up sometimes, right... ^^

So, from my POV, everything seems solved. Jogamp is ready to use :)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

Martin
Thanks for the good news about geniuses :)

I fear the problem may however happen on 2.4 as Julien already faced it as mentioned here.

I haven't found your discussion with the Oracle developer. Beside explaining how to detect that SUNWPrivate is in the jar or not, did he explained what the purpose of SUNWPrivate, why JOGL may have embed it in the past, why still having it in the jar may prevent the libraries ?

I unpacked jogamp 2.3.2 fat jar and haven't found any SUNWprivate*.so inside, although I did encounter this problem on Ubuntu 18 with jogl 2.3.2 in the past.

Reply | Threaded
Open this post in threaded view
|

Re: JOGL works on JDK 17 but not on JDK 18

hharrison
The jogl jars don't ship the sunprivate library, if you read the script above, the .so libraries shipped with jogl used to reference symbols in the sunprivate lib, which it no longer does in 2.4.

Fyi.