OmixVisualization / qtjambi

QtJambi is a wrapper for using Qt in Java.
http://www.qtjambi.io
Other
365 stars 43 forks source link

[BUG] #190

Closed akashKarmakar02 closed 8 months ago

akashKarmakar02 commented 8 months ago

Describe the bug QT_6_PRIVATE_API not found

Project:

Error Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/QtJambi6.5.5_73236/lib/libQtJambi.so.6.5.5: /usr/lib64/libQt6Core.so.6.6.2: version 'Qt_6_PRIVATE_API' not found (required by /tmp/QtJambi6.5.5_73236/lib/libQtJambi.so.6.5.5) 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)

System (please complete the following information):

omix commented 8 months ago

This is a typical issue when running QtJambi with system-specific Qt on Linux. Maven-published QtJambi binaries for Linux have been built with Qt from official installer (www.qt.io). Either use Qt from installer or build QtJambi from Github sources on your Linux system.

omix commented 8 months ago

Sorry, I misinterpreted you post. In fact you are trying to run QtJambi 6.5 with Qt 6.6. Try again with QtJambi 6.6.2. If you face further linking issues consider my previous answer.

akashKarmakar02 commented 8 months ago

changed the version from 6.5.5 to 6.6.2

got an extra error:

Exception in thread "main" java.lang.LinkageError: Cannot run QtJambi 6.6.2 (x86_64-little_endian-lp64 release build; by GCC 9.4.0) with Qt 6.6.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 13.2.1 20231205 (Red Hat 13.2.1-6)). at io.qt.internal.LibraryUtility.analyzeUnsatisfiedLinkError(LibraryUtility.java:3606) at io.qt.internal.LibraryUtility.loadQtJambiLibrary(LibraryUtility.java:1805) at io.qt.internal.QtJambi_LibraryUtilities.<clinit>(QtJambi_LibraryUtilities.java:260) at io.qt.internal.NativeUtility$Object.<clinit>(NativeUtility.java:445) at org.akash.MainKt.main(Main.kt:8) Caused by: java.lang.UnsatisfiedLinkError: /tmp/QtJambi6.6.2_79777/lib/libQtJambi.so.6.6.2: /usr/lib64/libQt6Core.so.6.6.2: version 'Qt_6_PRIVATE_API' not found (required by /tmp/QtJambi6.6.2_79777/lib/libQtJambi.so.6.6.2) 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:2418) at java.base/java.lang.Runtime.load0(Runtime.java:852) at java.base/java.lang.Runtime.load(Runtime.java:838) at io.qt.internal.LibraryUtility.loadNativeLibrary(LibraryUtility.java:2408) at io.qt.internal.LibraryUtility.loadQtJambiLibrary(LibraryUtility.java:1990) at io.qt.internal.LibraryUtility.loadQtJambiLibrary(LibraryUtility.java:1713) ... 3 more

omix commented 8 months ago

What does this print?

strings /usr/lib64/libQt6Core.so.6.6.2 | grep Qt_6
akashKarmakar02 commented 8 months ago

strings /usr/lib64/libQt6Core.so.6.6.2 | grep Qt_6 Qt_6.6_PRIVATE_API Qt_6 Qt_6.0 Qt_6.1 Qt_6.2 Qt_6.3 Qt_6.4 Qt_6.5 Qt_6.6

omix commented 8 months ago

And here are the symbols in Qt from installer: strings /opt/Qt/6.6.2/gcc_64/lib/libQt6Core.so.6.6.2 | grep Qt_6 Qt_6_PRIVATE_API Qt_6 Qt_6.0 Qt_6.1 Qt_6.2 Qt_6.3 Qt_6.4 Qt_6.5 Qt_6.6 Both compilations use different symbols and so, QtJambi binaries are incompatible.