testsuite/tools/validate fails with newer Mesa and no hardware GPU
GTK version: 4.12.5, distro: Debian unstable (rolling release/development branch)
Newer versions of Mesa provide the Zink driver, which implements GL by calling into a Vulkan driver. Unfortunately, if no compatible Vulkan driver or GPU is available, it logs to stderr before falling back to the next-best driver (in practice llvmpipe or softpipe): https://gitlab.freedesktop.org/mesa/mesa/-/issues/10293. In practice, this will frequently happen when running build-time tests on distro autobuilders, which generally do not have access to a hardware GPU.
This causes testsuite/tools/validate
to fail, because that test runs gtk-builder-tool validate
against some known inputs and asserts that the output on stderr matches an expected result, and the expected result does not expect these messages from Zink.
This worked OK in Debian unstable as of 2024-01-29 (Mesa 23.3.4, with automatic fallback to Zink temporarily disabled), but was failing as of 2024-02-25 (Mesa 24.0.1 with Zink re-enabled).
I think this is really a Mesa bug, and I've asked whether Zink's output to stderr can be reconsidered; but I think GTK could avoid this being an issue by forcing LIBGL_ALWAYS_SOFTWARE=true
in testsuite/tools/validate
.