[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-6.0?] configure: Improve error message with specified meson p
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-6.0?] configure: Improve error message with specified meson path is not found |
Date: |
Fri, 16 Apr 2021 12:25:59 +0200 |
When building on a system where meson isn't available,
but installed manually as user pip package, we get:
$ ../configure --meson=~/.local/bin/meson
qemu/configure: line 6387: --version: command not found
You are attempting to run "setup" which requires administrative
privileges, but more information is needed in order to do so.
Authenticating as "root"
Password:
Improve the error message to something less scary:
$ ../configure --meson=~/.local/bin/meson
ERROR: Meson not found. Use --meson=/path/to/meson (absolute path)
Actually in this case the fix is to use $HOME, not unexpanded ~:
$ ../configure --meson=$HOME/.local/bin/meson
The Meson build system
Version: 0.56.99
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
configure | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 4f374b48890..088a82e3d86 100755
--- a/configure
+++ b/configure
@@ -1987,7 +1987,12 @@ case "$meson" in
git | internal)
meson="$python ${source_path}/meson/meson.py"
;;
- *) meson=$(command -v "$meson") ;;
+ *)
+ meson=$(command -v "$meson")
+ if test -z "$meson"; then
+ error_exit "Meson not found. Use --meson=/path/to/meson (absolute
path)"
+ fi
+ ;;
esac
# Probe for ninja
--
2.26.3
- [PATCH-for-6.0?] configure: Improve error message with specified meson path is not found,
Philippe Mathieu-Daudé <=