This issue appears on jammy because /lib is a symbolic link, and the 
/lib/x86_64-linux-gnu entry in the loader search path is used to find 
libQt6Core.  
The cmake generated qconfig.cpp contains this line:
#define QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH "../../" 
So, prefixFromQtCoreLibraryHelper() computes prefixdir as 
/lib/x86_64-linux-gnu/../../
and returns /.
Note if /usr/lib/x86_64-linux-gnu had been used to find libQt6Core by the 
loader, then prefixFromQtCoreLibraryHelper() would have computed prefixdir as 
/usr/lib/x86_64-linux-gnu/../../, and returned /usr, which would have worked.

Instead of messing with the loader search path, or messing with cmake to
compute QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH correctly given the
loader search path, the attached patch just resolves any symbolic link
so libdir becomes /usr/lib/x86_64-linux-gnu instead of
/lib/x86_64-linux-gnu and prefixFromQtCoreLibraryHelper() returns /usr.


** Patch added: "qlibraryinfo_symlink.patch"
   
https://bugs.launchpad.net/ubuntu/+source/qt6-base/+bug/1970057/+attachment/5583206/+files/qlibraryinfo_symlink.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1970057

Title:
  Qt6 QLibraryInfo returns wrong paths

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qt6-base/+bug/1970057/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to