Hi,
Thanks for sharing this!
Cătălin George Feștilă <catalinfest(a)gmail.com> writes:
I try a basic example with QML -
https://github.com/qmlnet/qmlnet
And I need to fix this error , any idea ?
I think this is a bug in
Qml.Net.
---> System.Exception: Library could not be loaded:
/lib64/libQt5Core.so.5: version `Qt_5_PRIVATE_API' not found (required by
/home/mythcat/CSharpProjects/QMLProjects/QML001/bin/Debug/net6.0/runtimes/linux-x64/native/libQmlNet.so):
/home/mythcat/CSharpProjects/QMLProjects/QML001/bin/Debug/net6.0/runtimes/linux-x64/native/libQmlNet.so
This says that libQmlNet.so is trying to open libQt5Core.so.5 but
couldn't find (symbols with?) version Qt_5_PRIVATE_API. That's the
version in the libQt5Core.so that ships with Ubuntu.
I grabbed Ubuntu's libQt5core5a package [1] and looked at it locally:
$ eu-readelf -V ./usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5
...
Version definition section [ 6] '.gnu.version_d' contains 13 entries:
Addr: 0x0000000000062630 Offset: 0x062630 Link to section: [ 4] '.dynstr'
000000: Version: 1 Flags: BASE Index: 1 Cnt: 1 Name: libQt5Core.so.5
0x001c: Version: 1 Flags: none Index: 2 Cnt: 1 Name: Qt_5_PRIVATE_API
...
Fedora's libQt5Core.so.5 uses a different version: Qt_5.15.2_PRIVATE_API
$ eu-readelf -V /usr/lib64/libQt5Core.so.5
...
Version definition section [ 7] '.gnu.version_d' contains 19 entries:
Addr: 0x0000000000074e70 Offset: 0x074e70 Link to section: [ 5] '.dynstr'
000000: Version: 1 Flags: BASE Index: 1 Cnt: 1 Name: libQt5Core.so.5
0x001c: Version: 1 Flags: none Index: 2 Cnt: 1 Name: Qt_5.15.2_PRIVATE_API
...
It looks like that
Qml.Net has built their library in such a way that it
requires an exact version which makes it only work on Ubuntu (and
probably Debian). You should report this as a bug to them so they can
fix this and make
Qml.Net work on Fedora (and other Linux distributions)
too.
[1]
http://security.ubuntu.com/ubuntu/pool/main/q/qtbase-opensource-src/libqt...
Omair
--
PGP Key: B157A9F0 (
http://pgp.mit.edu/)
Fingerprint = 9DB5 2F0B FD3E C239 E108 E7BD DF99 7AF8 B157 A9F0