diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py index 18a3d29ab50..675623e4f4d 100644 --- a/lib/spack/spack/build_systems/meson.py +++ b/lib/spack/spack/build_systems/meson.py @@ -48,6 +48,9 @@ class MesonPackage(spack.package_base.PackageBase): variant("strip", default=False, description="Strip targets on install") depends_on("meson", type="build") depends_on("ninja", type="build") + # Meson uses pkg-config for dependency detection, and this dependency is + # often overlooked by packages that use meson as a build system. + depends_on("pkgconfig", type="build") # Python detection in meson requires distutils to be importable, but distutils no longer # exists in Python 3.12. In Spack, we can't use setuptools as distutils replacement, # because the distutils-precedence.pth startup file that setuptools ships with is not run