From patchwork Fri Apr 16 10:25:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12207371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 478FDC433ED for ; Fri, 16 Apr 2021 10:27:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B91CF61057 for ; Fri, 16 Apr 2021 10:27:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B91CF61057 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXLhJ-0008Vm-RM for qemu-devel@archiver.kernel.org; Fri, 16 Apr 2021 06:27:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXLg1-0007xC-Qi for qemu-devel@nongnu.org; Fri, 16 Apr 2021 06:26:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXLfx-0004L6-FI for qemu-devel@nongnu.org; Fri, 16 Apr 2021 06:26:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618568767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Bz7dvEtXv7kRZHszJJrWUdDNdKLJ6tHkj89SwVHHMfE=; b=DX5VAerfLwKMhHdH5AFFMwBl5jsYKlnY31h3wkn0mxM9KpO6DTm8ZqqHLCJ0p/LhnT/2JP jMtfAFCB1dk3RhXj//tb6iCv/2HJNbJ5SotTlRFMcP9Ym/nz0pWpr4i2vldBiXKn73Oisl KFVuxiCxpH2ZLf96RFWsKE9mr+ds8S0= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-505-xjZBZQRWOe-eYW7anj7__Q-1; Fri, 16 Apr 2021 06:26:03 -0400 X-MC-Unique: xjZBZQRWOe-eYW7anj7__Q-1 Received: by mail-wr1-f72.google.com with SMTP id o14-20020a5d474e0000b029010298882dadso4236836wrs.2 for ; Fri, 16 Apr 2021 03:26:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Bz7dvEtXv7kRZHszJJrWUdDNdKLJ6tHkj89SwVHHMfE=; b=I5zi/7cTq7+X+B0+Ho8UmdRKw6FFCfu0TtETtS+6KfXbjZAz7XximnqAl6UzRNbXcp vrFYnv4uJvublIhG0fr0ZPwTTbLCqRdXewFXAaKdUXbBNJ4JEhozmKuOZws4VjpNTZlN V7t1zYrs3+sMtBJ2aTBiQGu4qf2tmhKf+eQC3h49OzLsnSyuKIwoWuOxsIeGCF2Jr3fO hB+ui9L7jErI834fT4YVJGYWRM/CCI79lNPLXhGcdO7td3+hvpYBA5giAfH+Hyg5myow FW/RNTclm37coQpkXLbn0jYQ+IbVg21Bh3EymaJosubCS9uiT5STVVpkRdGpKNk4gOyq Gpzg== X-Gm-Message-State: AOAM533R5YuLOw7lKt2TZ8PEdcXCZUK2WKzI6FQg8wtwW13XnGJfJVuQ DfdA4/C7bKOiPlEBevuAqyMQO+huhcd0wWrIIQmE3zenDdmr6KgB0EEO6/BtG0Je8znt7ijUyvF lM0kmVXVSXvSUtuAKv8qxM5tRXiAoyrCwkaja+wblrFmOPRaP746d2RAi+L4TKbmI X-Received: by 2002:a5d:4fc7:: with SMTP id h7mr8338097wrw.23.1618568762278; Fri, 16 Apr 2021 03:26:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzM2wVtDrN4Z5vp9WwZvr1sUlibkfbtBK2Z9nvI9lzKeLxcSAT0VbpsixCtaelPoPs31T9YIw== X-Received: by 2002:a5d:4fc7:: with SMTP id h7mr8338068wrw.23.1618568762068; Fri, 16 Apr 2021 03:26:02 -0700 (PDT) Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id f1sm5179855wru.60.2021.04.16.03.26.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 03:26:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org 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 Message-Id: <20210416102559.213649-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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é Reviewed-by: Darren Kenny --- 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