Module: Mesa Branch: main Commit: 1cc26e8b6657b5097995470ced9ae9cc7b6f01b9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cc26e8b6657b5097995470ced9ae9cc7b6f01b9
Author: LingMan <18294-ling...@users.noreply.gitlab.freedesktop.org> Date: Tue Oct 24 05:47:06 2023 +0200 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 <kher...@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25859> --- 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',