[Bug 1970057] Re: Qt6 QLibraryInfo returns wrong paths
Brian Murray
1970057 at bugs.launchpad.net
Tue Dec 6 21:35:28 UTC 2022
Hello tom, or anyone else affected,
Accepted qt6-base into jammy-proposed. The package will build now and be
available at
https://launchpad.net/ubuntu/+source/qt6-base/6.2.4+dfsg-2ubuntu1.1 in a
few hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
** Changed in: qt6-base (Ubuntu Jammy)
Status: Confirmed => Fix Committed
** Tags added: verification-needed verification-needed-jammy
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1970057
Title:
Qt6 QLibraryInfo returns wrong paths
Status in Stellarium:
New
Status in qt6-base package in Ubuntu:
Fix Released
Status in qt6-base source package in Jammy:
Fix Committed
Bug description:
[Impact]
1. QLibraryInfo can return non-existent paths.
2. This results in Qt6 QWebEngine being unusable.
[Test Plan]
1. Check the output of qtdiag from qt6-tools-dev-tools, and verify the paths exist.
a) Run "qtdiag --no-vulkan --no-rhi --no-gl | grep Path"
b) verify that the paths actually exist, in particular DataPath: /share/qt6 does not exist on jammy.
2. Build the Qt supplied simplebrowser example, and verify it launches without error
a) apt-get source libqt6webenginecore6
b) cd qt6-webengine-6.2.4+dfsg/examples/webenginewidgets/simplebrowser
c) mkdir bld
d) cd bld
e) cmake -DCMAKE_BUILD_TYPE=Release ..
f) cmake --build .
g) ./simplebrowser
An example of output from a failure is attached as faillog.txt. In particular note the failure to find resources at /share:
Qt WebEngine resources not found at /share/qt6/resources. Trying parent directory...
Qt WebEngine resources not found at /share/qt6. Trying application directory...
and the resulting segmentation fault:
Segmentation fault (core dumped)
[Where problems could occur]
The change in 6.2.4+dfsg-8 restores the configuration settings that
were used to build qtbase-opensource-src (5.14.2+dfsg-3) through
qtbase-opensource-src (5.15.3+dfsg-2). The setting was lost on the
transition from the Qt5 qmake build to the Qt6 cmake build.
The change causes QLibraryInfo to use paths known at build time
instead of trying to dynamically establish the paths. This will fail
if the package is relocated to a different location from that which it
is build for. Since the package isn't relocatable this shouldn't be a
problem.
[Other Info]
The change is currently in The Kinetic Kudu.
[Original Description]
The qtdiag program can be used to find the paths returned by
QLibraryInfo:
qtdiag --no-vulkan --no-rhi --no-gl
In this output on jammy (22.04) with qt6-base-dev (6.2.4+dfsg-2ubuntu1) I see:
Library info:
PrefixPath: /
DocumentationPath: /share/qt6/doc
HeadersPath: /include/x86_64-linux-gnu/qt6
LibrariesPath: /lib/x86_64-linux-gnu
LibraryExecutablesPath: /lib/qt6/libexec
BinariesPath: /lib/qt6/bin
PluginsPath: /lib/x86_64-linux-gnu/qt6/plugins
QmlImportsPath: /lib/x86_64-linux-gnu/qt6/qml
ArchDataPath: /lib/x86_64-linux-gnu/qt6
DataPath: /share/qt6
TranslationsPath: /share/qt6/translations
ExamplesPath: /lib/x86_64-linux-gnu/qt6/examples
TestsPath: /tests
SettingsPath: /etc/xdg
This is problematic. For example, the DataPath /share/qt6 does not
exist. This can lead to various failures. For example a Qt
application using the Qt WebEngine might report:
Qt WebEngine resources not found at /share/qt6/resources. Trying parent directory...
Qt WebEngine resources not found at /share/qt6. Trying application directory...
Qt WebEngine resources not found at /app/gpsbabel/gui/GPSBabelFE. Trying fallback directory... The application MAY NOT work.
Path override failed for key base::DIR_QT_LIBRARY_DATA and path '/home/tsteven4/.GPSBabel'
Installed Qt WebEngine locales directory not found at location /share/qt6/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /app/gpsbabel/gui/GPSBabelFE/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/home/tsteven4/.GPSBabel'
[0423/194717.040426:ERROR:resource_bundle.cc(911)] Failed to load /home/tsteven4/.GPSBabel/qtwebengine_resources_100p.pak
Some features may not be available.
[0423/194717.041440:ERROR:resource_bundle.cc(911)] Failed to load /home/tsteven4/.GPSBabel/qtwebengine_resources_200p.pak
Some features may not be available.
[0423/194717.041481:ERROR:resource_bundle.cc(911)] Failed to load /home/tsteven4/.GPSBabel/qtwebengine_resources.pak
Some features may not be available.
[0423/194717.042243:WARNING:resource_bundle_qt.cpp(119)] locale_file_path.empty() for locale
[3004:3004:0423/194717.389096:ERROR:extension_system_qt.cpp(121)] Failed to parse extension manifest.
Segmentation fault (core dumped)
I note that qtdiag reports the correct paths on debian sid and
qt6-base-dev (6.2.4+dfsg-4):
Library info:
PrefixPath: /usr
DocumentationPath: /usr/share/qt6/doc
HeadersPath: /usr/include/x86_64-linux-gnu/qt6
LibrariesPath: /usr/lib/x86_64-linux-gnu
LibraryExecutablesPath: /usr/lib/qt6/libexec
BinariesPath: /usr/lib/qt6/bin
PluginsPath: /usr/lib/x86_64-linux-gnu/qt6/plugins
QmlImportsPath: /usr/lib/x86_64-linux-gnu/qt6/qml
ArchDataPath: /usr/lib/x86_64-linux-gnu/qt6
DataPath: /usr/share/qt6
TranslationsPath: /usr/share/qt6/translations
ExamplesPath: /usr/lib/x86_64-linux-gnu/qt6/examples
TestsPath: /usr/tests
SettingsPath: /etc/xdg
It is not clear to me if this is because of the difference in package
versions, or some issue with ubuntu packaging.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libqt6core6 6.2.4+dfsg-2ubuntu1
ProcVersionSignature: Ubuntu 5.13.0-40.45~20.04.1-generic 5.13.19
Uname: Linux 5.13.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Sat Apr 23 19:40:12 2022
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: qt6-base
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/stellarium/+bug/1970057/+subscriptions
More information about the Ubuntu-sponsors
mailing list