From patchwork Sun May 21 09:44:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 9738927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9E7DE6034C for ; Sun, 21 May 2017 09:45:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A12F286B2 for ; Sun, 21 May 2017 09:45:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AF51286BC; Sun, 21 May 2017 09:45:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9E47286B2 for ; Sun, 21 May 2017 09:45:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750993AbdEUJpB (ORCPT ); Sun, 21 May 2017 05:45:01 -0400 Received: from mail.skyhub.de ([5.9.137.197]:59122 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbdEUJpB (ORCPT ); Sun, 21 May 2017 05:45:01 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6TQYp2JGu30I; Sun, 21 May 2017 11:44:59 +0200 (CEST) Received: from pd.tnic (p2003008C2F2EA700D00117B391B7F7F2.dip0.t-ipconnect.de [IPv6:2003:8c:2f2e:a700:d001:17b3:91b7:f7f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 593681EC019F; Sun, 21 May 2017 11:44:59 +0200 (CEST) Date: Sun, 21 May 2017 11:44:47 +0200 From: Borislav Petkov To: Masahiro Yamada Cc: LKML , Linux Kbuild mailing list Subject: [PATCH v2] kconfig: Check for libncurses before menuconfig Message-ID: <20170521094447.m4thpavivflyqtf6@pd.tnic> References: <20170409130708.4753-1-bp@alien8.de> <20170520203323.6ug3gq2yoms6acsu@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, May 21, 2017 at 06:15:53PM +0900, Masahiro Yamada wrote: > Could you change line 199 > > $(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog > > to > > $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog > > and send v2, please? Here it is: Acked-by: Masahiro Yamada --- From: Borislav Petkov Date: Sun, 9 Apr 2017 15:07:08 +0200 Subject: [PATCH v2] kconfig: Check for libncurses before menuconfig There is a check and a nice user-friendly message when the curses library is not present on the system and the user wants to do "make menuconfig". It doesn't get issued, though. Instead, we fail the build when mconf.c doesn't find the curses.h header: HOSTCC scripts/kconfig/mconf.o In file included from scripts/kconfig/mconf.c:23:0: scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory #include CURSES_LOC ^ compilation terminated. Make sure dochecklxdialog gets run before mconf is compiled so that the user sees the error message instead: $ make menuconfig *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try again. *** scripts/kconfig/Makefile:203: recipe for target 'scripts/kconfig/dochecklxdialog' failed make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1 Makefile:548: recipe for target 'menuconfig' failed make: *** [menuconfig] Error 2 Signed-off-by: Borislav Petkov Cc: linux-kbuild@vger.kernel.org Link: http://lkml.kernel.org/r/20170409130708.4753-1-bp@alien8.de --- scripts/kconfig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 90a091b6ae4d..eb8144643b78 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -196,7 +196,7 @@ clean-files += config.pot linux.pot # Check that we have the required ncurses stuff installed for lxdialog (menuconfig) PHONY += $(obj)/dochecklxdialog -$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog +$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog $(obj)/dochecklxdialog: $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)