Open asarubbo opened 2 years ago
here scanelf returns
TYPE NEEDED FILE
ET_DYN libX11.so.6,libQt5WebEngine.so.5,libQt5WebEngineWidgets.so.5,libQt5WebEngineCore.so.5,libQt5Quick.so.5,libQt5PrintSupport.so.5,libQt5Widgets.so.5,libQt5Gui.so.5,libQt5QmlModels.so.5,libQt5WebChannel.so.5,libQt5Qml.so.5,libQt5Network.so.5,libQt5Positioning.so.5,libQt5Xml.so.5,libQt5Core.so.5,libGL.so.1,libstdc++.so.6,libm.so.6,libgcc_s.so.1,libc.so.6,ld-linux-x86-64.so.2 /usr/bin/whatsie
as you can see /usr/lib/libQt5QmlModels.so is required. judging from you lib path you're on a debian based distro, I suppose. On top of this if I move that library like you suggest it will fail with
whatsie: error while loading shared libraries: libQt5QmlModels.so.5: cannot open shared object file: No such file or directory
So maybe it depends on compile flags used by the distro and related to Qt5 toolkit. For precaution I would leave as is
I'm on gentoo, not any debian-based distro.
as you can see /usr/lib/libQt5QmlModels.so is required.
Please forget for a second the scanelf output. Is the whatsie code using something from libQt5QmlModels.so ? I don't guess so because,if yes, I'd expect runtime problems on my side, but I may be wrong.
In the way it is atm, who wants to build whatsie needs to have a lot of depends that aren't really required and that's a bit a nosense.
From my understanding, those are the required libraries:
-lX11
/usr/lib64/libQt5WebEngineWidgets.so
/usr/lib64/libQt5WebEngineCore.so
/usr/lib64/libQt5Widgets.so
/usr/lib64/libQt5Gui.so
/usr/lib64/libQt5Network.so
/usr/lib64/libQt5Positioning.so
/usr/lib64/libQt5Core.so
In other words I'm able to link with only the mentioned libraries. If you remove one of them from the command line link, you will get undefined reference to..
because the code is using something provided by those libraries. If you remove the rest, you have a working whatsie ELF.
Hope is clear now.
When it will be sorted out / fixed, I'll put it in the gentoo tree official repository.
This is what I can see on my side at link time:
while scanelf -n reports:
So, in the practice it forces me to have /usr/lib64/libQt5QmlModels.so (there are more examples above), but in the practice whatsie is not linked against it.
If I don't have /usr/lib64/libQt5QmlModels.so at build time it fails (expected) in that way:
While if I don't have it at runtime it works as expected.
You can test this behavior by temporarily move the affected libraries, e.g: