From: Sam Ravnborg <sam@ravnborg.org>
To: Frans Pop <elendil@planet.nl>
Cc: linux-kernel@vger.kernel.org,
linux-kbuild <linux-kbuild@vger.kernel.org>
Subject: Re: menuconfig: fail with clearer error if curses.h N/A
Date: Sun, 9 Dec 2007 20:13:17 +0100 [thread overview]
Message-ID: <20071209191317.GA8496@uranus.ravnborg.org> (raw)
In-Reply-To: <200710142323.21139.elendil@planet.nl>
On Sun, Oct 14, 2007 at 11:23:20PM +0200, Frans Pop wrote:
> It would be nice if 'make menuconfig' could fail earlier or with a clearer
> error if curses.h is not available. The actual error is currently rather
> buried in a huge amount of indirect errors.
It worked some time ago but I did not bother to check it out
when it broke.
With following patch it fails like this:
$ make menuconfig
*** Unable to find the ncurses libraries
*** or the required header files.
*** make menuconfig require the ncurses libraries
***
*** Install ncurses (ncurses-devel) and try again
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2
This is much better.
Sam
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 1ad6f7f..8091435 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -93,12 +93,6 @@ HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
HOST_EXTRACFLAGS += -DLOCALE
-PHONY += $(obj)/dochecklxdialog
-$(obj)/dochecklxdialog:
- $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES)
-
-always := dochecklxdialog
-
# ===========================================================================
# Shared Makefile for the various kconfig executables:
@@ -145,6 +139,14 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
.tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
clean-files += mconf qconf gconf
+# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
+PHONY += $(obj)/dochecklxdialog
+$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
+$(obj)/dochecklxdialog:
+ $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
+
+always := dochecklxdialog
+
# Add environment specific flags
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 9681476..451297f 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -36,9 +36,10 @@ trap "rm -f $tmp" 0 1 2 3 15
# Check if we can link to ncurses
check() {
- echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
+ echo " \#include CURSES_LOC main() {}" | $cc -xc - -o $tmp 2> /dev/null
if [ $? != 0 ]; then
- echo " *** Unable to find the ncurses libraries." 1>&2
+ echo " *** Unable to find the ncurses libraries" 1>&2
+ echo " *** or the required header files." 1>&2
echo " *** make menuconfig require the ncurses libraries" 1>&2
echo " *** " 1>&2
echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
next prev parent reply other threads:[~2007-12-09 19:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-14 21:23 menuconfig: fail with clearer error if curses.h N/A Frans Pop
2007-12-09 19:13 ` Sam Ravnborg [this message]
2007-12-09 19:35 ` Frans Pop
2007-12-09 19:55 ` Sam Ravnborg
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=20071209191317.GA8496@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=elendil@planet.nl \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.