Received: by 10.213.65.16 with SMTP id m16csp28756imf; Sun, 11 Mar 2018 13:14:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELuTdZzaCIPG2XQuEFLkpgjictPLnzo99nWOb1q9KO19CpLUf5Iz+HdOgp3hfq8zV6UMMtoP X-Received: by 10.101.89.6 with SMTP id f6mr4698169pgu.22.1520799260427; Sun, 11 Mar 2018 13:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520799260; cv=none; d=google.com; s=arc-20160816; b=B+cjlq8f+hwu0VczzUgP10fQJrdHL6DZdLVQ0ZrTN/tHaAUTwEc6ibwWYemWiEG807 QhQCTBlVwsCVnjEoP4Fn51YhZcFxZGabf2dCaYRBZBBIQHd96mpTSifzK6Zmaf1SPlHs 7tuHMp2Mn4GvFEJzNsePNyC4wu6KrrNmViH328VGTdbubau8SHrop5HAA/kGgoAkiNTs wAN5Kr/nmBmFaCnTB3JLtQapqes5EJ43fTRYJXdz52khB1DdtCJW4Yr4bdjZCLhWRz8L MeUO6qKg3ajJTHDmEuP/RuO9aDwLl+RH7VOm3J/ttGXVcwycHAaQcCPpJx/b+FtylYVR wS/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature:arc-authentication-results; bh=73dGU6PEOlofS0RPrHZERP4BMOp+0w+H1WqYqhsPpZk=; b=EBTUuOmqlLTieiz+k6QEdj6CKCorMc5phwBwg6/07ww6yD9K/gjL6XwaWKxjXj+q7Y SFgmX8vD9L6YTSA0sTJBwt//zvQejN5ruuAzDLYlh9J8WwB1Vpz5YBCLHzsMkCdlhr+N LA7TqLPgYYBWgLD8/KxGTK+cFVS0nyL1J89vN1VaQkWNMRueSUoVQmwg2spdD37Rs/Fw n+xHj1zQ377VTkpICCDksjOEsBysRL4vhlPbsPYpvW02racI/8b+aTEMu+a6vquGRMzs od2jMmBbOceG6QmkWMIKik4NRViQxUMg9elPPPSD99H+PVi54v/Uup7CU8GUijkV08+e r9OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=k5rq4yDZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k185si4584978pfc.277.2018.03.11.13.14.06; Sun, 11 Mar 2018 13:14:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=k5rq4yDZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932258AbeCKUM6 (ORCPT + 99 others); Sun, 11 Mar 2018 16:12:58 -0400 Received: from merlin.infradead.org ([205.233.59.134]:35512 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932144AbeCKUM5 (ORCPT ); Sun, 11 Mar 2018 16:12:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=73dGU6PEOlofS0RPrHZERP4BMOp+0w+H1WqYqhsPpZk=; b=k5rq4yDZmNXFNa4hrWJnfr5t5X JiCNsr1EIQzFmZ6aNpf8g5ahvTnH+JXwkYz5ohQwc0HLHFlctLLzhjMqTzV+ZWELimHqhdUzjS1Fl 0LXo5edbUuzjdAwPfKCEpk4k2EmlSpiIztGHVHQnjfhBvG3BEBe2XsjBnjkqgk5t+mzsD2tyB3gyn DRJwgXeJQrY1VutymyK+G83CLqn+5rOwp2u8cujHaIrmeOPBjjAREQTOfS0rQlUmSlCRa/fbT6dt/ eMi7C5tTszbfAqk/Gn7fT3pIMcfJ5XWpCHAeKJ8qStheVHTY0y7JclEM61mtUOWzAFReIL4eSSXAm 9GW+7Tmw==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1ev7Kx-0002pp-63; Sun, 11 Mar 2018 20:12:55 +0000 To: linux-kbuild , Masahiro Yamada Cc: LKML From: Randy Dunlap Subject: [PATCH] kbuild: check for pkg-config on make menu/n/g/xconfig Message-ID: <09cf5537-b2d7-5bf5-0c0b-d0b765e1e75b@infradead.org> Date: Sun, 11 Mar 2018 13:12:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap Each of 'make {menu,n,g,x}config' uses (needs) pkg-config to make sure that other required files are present, but none of these check that pkg-config itself is present. Add a check for all 4 of these targets. Fixes kernel bugzilla #77511: https://bugzilla.kernel.org/show_bug.cgi?id=77511 Signed-off-by: Randy Dunlap --- I'm also OK with just documenting the pkg-config requirement in Documentation/Changes (= Documentation/process/changes.rst). + chmod +x scripts/kconfig/check-pkgconfig.sh scripts/kconfig/Makefile | 15 ++++++++++++++- scripts/kconfig/check-pkgconfig.sh | 13 +++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) --- lnx-416-rc3.orig/scripts/kconfig/Makefile +++ lnx-416-rc3/scripts/kconfig/Makefile @@ -160,6 +160,9 @@ help: @echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support' @echo ' tinyconfig - Configure the tiniest possible kernel' +# pkg-config check +check-pkgconfig := $(srctree)/$(src)/check-pkgconfig.sh + # lxdialog stuff check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh @@ -205,7 +208,17 @@ $(addprefix $(obj)/, mconf.o $(lxdialog) $(obj)/dochecklxdialog: $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) -always := dochecklxdialog +# Check that we have pkg-config (used by each of menu/n/g/xconfig) +PHONY += $(obj)/docheckpkgconfig +$(addprefix $(obj)/, mconf.o): $(obj)/docheckpkgconfig +$(addprefix $(obj)/, nconf.o): $(obj)/docheckpkgconfig +$(addprefix $(obj)/, gconf.o): $(obj)/docheckpkgconfig +$(addprefix $(obj)/, qconf.o): $(obj)/docheckpkgconfig + +$(obj)/docheckpkgconfig: + $(Q)$(CONFIG_SHELL) $(check-pkgconfig) + +always := docheckpkgconfig dochecklxdialog # Add environment specific flags HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) --- /dev/null +++ lnx-416-rc3/scripts/kconfig/check-pkgconfig.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Check for pkg-config presence + +pkgcfg=`which pkg-config >/dev/null 2>&1` +found=$? + +if [ $found -ne 0 ]; then + echo "'make *config' requires 'pkg-config'. Please install it." 1>&2 + exit 1 # error +fi + +exit 0