Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3
-
-
6d88fa12f (dev), a6fc5421a (dev), c091eb3fa (122-based), 0083a883b (dev), 09c09126e (dev), 98bd931a3 (118-based), 0cd5541a1 (6.8), cadafb3f1 (126-based), a8b975a21 (6.8)
Description
Case 1: libxkbfile
I just ran into the following while trying to build Qt WebEngine on Ubuntu 22.04. It was resolved with sudo apt install libxkbfile-dev
CMake Error at /home/USER/qt-everywhere-src-6.5.3/qtwebengine/cmake/Gn.cmake:75 (message): -- GN FAILED ERROR at //build/config/linux/pkg_config.gni:104:17: Script returned non-zero exit code. pkgresult = exec_script(pkg_config_script, args, "value") ^---------- Current dir: /home/USER/build-qtwebengine/src/core/RelWithDebInfo/x86_64/ Command: /usr/bin/python3 /home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/3rdparty/chromium/build/config/linux/pkg-config.py -p /usr/bin/pkg-config xkbcommon xkbfile Returned 1. stderr: Package xkbfile was not found in the pkg-config search path. Perhaps you should add the directory containing `xkbfile.pc' to the PKG_CONFIG_PATH environment variable No package 'xkbfile' found Could not run pkg-config. See /home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/core/ozone/BUILD.gn:8:3: whence it was called. pkg_config("xkb") { ^------------------ See /home/USER/build-qtwebengine/src/core/RelWithDebInfo/x86_64/BUILD.gn:611:15: which caused the file to be included. deps += [ "$_ozone_extra_directory:qt" ] ^---------------------------
Case 2: cups-config
Similarly, a customer tried to use a CUPS-less system to build Qt, using the -no-cups -no-webengine-printing-and-pdf options. Their configuration passed, but they still got the following failure:
CMake Error at cmake/Gn.cmake:75 (message): -- GN FAILED ERROR at //printing/BUILD.gn:406:14: Script returned non-zero exit code. libs = exec_script("cups_config_helper.py", ^---------- Current dir: /home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/pdf/Release/x86_64/ Command: /usr/bin/python3 /home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/3rdparty/chromium/printing/cups_config_helper.py --libs-for-gn Returned 1. stderr: Traceback (most recent call last): File "/home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/3rdparty/chromium/printing/cups_config_helper.py", line 108, in <module> sys.exit(main()) File "/home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/3rdparty/chromium/printing/cups_config_helper.py", line 92, in main flags = run_cups_config(cups_config, mode) File "/home/USER/qt-everywhere-src-6.5.3/qtwebengine/src/3rdparty/chromium/printing/cups_config_helper.py", line 35, in run_cups_config cups = subprocess.Popen([cups_config, '--cflags', '--ldflags', '--libs'], File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cups-config' See //BUILD.gn:274:15: which caused the file to be included. deps += [ "//printing:printing_unittests" ] ^------------------------------
Suggestions
- If these are hard requirements, they should be documented at https://doc.qt.io/qt-6/qtwebengine-platform-notes.html#linux and checked by the configure script.
- It would be good if we can avoid running cups_config_helper.py if printing was disabled.
Attachments
For Gerrit Dashboard: QTBUG-120248 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
538551,21 | CMake cleanup: Create QtConfigureHelpers | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
539855,18 | CMake cleanup: Improve configure checks | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
582928,5 | Fix xkbcomman and xkbfile dependencies check | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
582973,4 | Do not use cups | dev | qt/qtwebengine | Status: MERGED | +2 | 0 |
583113,4 | Add missing check for use_cups | 122-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
583347,7 | Fix xkbcommon and xkbfile dependencies check | 6.8 | qt/qtwebengine | Status: MERGED | +2 | 0 |
583348,2 | Do not use cups | 6.8 | qt/qtwebengine | Status: MERGED | +2 | 0 |
583526,2 | Add missing check for use_cups | 126-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
583816,2 | Add missing check for use_cups | 118-based | qt/qtwebengine-chromium | Status: MERGED | +2 | 0 |
583817,2 | Do not use cups | 6.7 | qt/qtwebengine | Status: ABANDONED | +2 | 0 |