meson
meson copied to clipboard
Confusing error on missing Qt module
Describe the bug When using Qt modules as decency, but a module is missing. Meson does not clearly communicate that only a module is missing. It will throw a error that Qt itself is missing.
To Reproduce
project('qtdemo', 'cpp')
qt6_dep = dependency('qt6', modules: ['Core', 'Gui', 'Widgets', 'Charts'])
executable('qtdemo', 'main.cpp', dependencies : qt6_dep)
When running meson setup without Qt6Charts installed you will get the follwing output:
The Meson build system
Version: 1.7.2
Source dir: /home/jakob/tmp/test
Build dir: /home/jakob/tmp/test/build
Build type: native build
Project name: qtdemo
Project version: undefined
C++ compiler for the host machine: c++ (gcc 14.2.1 "c++ (GCC) 14.2.1 20250207")
C++ linker for the host machine: c++ ld.bfd 2.44
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/bin/pkg-config) 2.4.3
qmake6 found: YES (/usr/bin/qmake6) 6.9.0
Could not find: Charts Qt6Charts in /usr/lib
Run-time dependency qt6 (modules: Charts, Core, Gui, Widgets) found: NO (tried pkgconfig and config-tool)
../meson.build:3:10: ERROR: Dependency "qt6" not found, tried pkgconfig and config-tool
A full log can be found at /home/jakob/tmp/test/build/meson-logs/meson-log.txt
While the log contains the info that QtCharts is missing, the error, which gets the most attention from the user says qt6 itself is missing, which could lead to confusion.
Expected behavior
The Error should say something like QtCharts is missing.
system parameters
- OS: ArchLinux
- Python: 3.13.2
- Meson: 1.7.2
- Ninja: 1.12.1