From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
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 [thread overview]
Message-ID: <20210416102559.213649-1-philmd@redhat.com> (raw)
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
next reply other threads:[~2021-04-16 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 10:25 Philippe Mathieu-Daudé [this message]
2021-04-16 11:09 ` [PATCH-for-6.0?] configure: Improve error message with specified meson path is not found Darren Kenny
2021-04-16 11:14 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210416102559.213649-1-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).