From 1cc26e8b6657b5097995470ced9ae9cc7b6f01b9 Mon Sep 17 00:00:00 2001 From: LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org> Date: Tue, 24 Oct 2023 05:47:06 +0200 Subject: [PATCH] rusticl: Show an error message if the build is attempted with an outdated bindgen version Ideally the build system would fetch the correct bindgen version automatically like cargo does. Until then, provide an error message that is hopefully more helpful than whatever cryptic error the build runs into otherwise. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9457 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10029 Reviewed-by: Karol Herbst Part-of: --- src/gallium/frontends/rusticl/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build index d7aee75240c..6cff319f780 100644 --- a/src/gallium/frontends/rusticl/meson.build +++ b/src/gallium/frontends/rusticl/meson.build @@ -114,6 +114,10 @@ rusticl_bindgen_args = [ '--anon-fields-prefix', 'anon_', ] +if find_program('bindgen').version().version_compare('< 0.62') + error('rusticl requires bindgen 0.62 or newer. If your distribution does not ship a recent enough version, you can install the latest version for your user with `cargo install bindgen-cli`.') +endif + if find_program('bindgen').version().version_compare('< 0.65') rusticl_bindgen_args += [ '--size_t-is-usize',