From: Mauro Condarelli <mc5686@mclink.it>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] core/pkg-kconfig: fix configurators
Date: Mon, 24 Aug 2015 15:46:13 +0200 [thread overview]
Message-ID: <55DB2025.9030102@mclink.it> (raw)
In-Reply-To: <1440265993-31292-1-git-send-email-yann.morin.1998@free.fr>
I can confirm the patch solves the problem for me.
I did a simple test issuing "make linux-menuconfig" right before and after applying the patch, nothing else changed.
The first one failed:
HOSTCC scripts/kconfig/mconf.o
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
The second worked Ok.
Tested-by: Mauro Condarelli <mc5686@mclink.it>
Il 22/08/2015 19:53, Yann E. MORIN ha scritto:
> Currently, the configurators are using $($(2)_MAKE_ENV) , often derived
> from $(TARGE_MAKE_ENV) , as the environment to be set when calling the
> various configurators.
>
> This means that our host tools are used first, most notably pkg-config
> (from host-pkgconf).
>
> However, this is inherently flawed. Our pkg-config, when set for the
> host, only searches .pc files in $(HOST_DIR) and never ever uses the
> ones from the host. For example, since we do not build a host-qt, our
> pkg-config would not find the host's QtCore.pc et al.
>
> Consequently, on some systems (but not on others?) most of the
> configurators fail to build, especially the latest kernel versions, as
> they have been starting to use pkg-config two years ago.
>
> Fix that by filtering-out sensible values out of the environment, but
> only when calling the configurators.
>
> Reported-by: Mauro Condarelli <mc5686@mclink.it>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Mauro Condarelli <mc5686@mclink.it>
> ---
> package/pkg-kconfig.mk | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
> index 375607f..158c386 100644
> --- a/package/pkg-kconfig.mk
> +++ b/package/pkg-kconfig.mk
> @@ -96,6 +96,15 @@ $$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
> endif
> endif
>
> +# For the configurators, we do want to use the system-provided host tools, not
> +# the ones we build. This is particularly true for pkg-config; if we use our
> +# pkg-config (from host-pkgconf), then it would not look for the .pc from the
> +# host, but we do need them, especially to find ncurses, GTK+, Qt (resp. for
> +# menuconfig and nconfig, gconfig, xconfig).
> +# So we simply remove our PATH and PKG_CONFIG_* variables.
> +$(2)_CONFIGURATOR_MAKE_ENV = \
> + $$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV))
> +
> # Configuration editors (menuconfig, ...)
> #
> # We need to apply the configuration fixups right after a configuration
> @@ -112,7 +121,7 @@ endif
> #
> $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_%
> $$($(2)_DIR)/.kconfig_editor_%: $$($(2)_DIR)/.stamp_kconfig_fixup_done
> - $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> + $$($(2)_CONFIGURATOR_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> $$($(2)_KCONFIG_OPTS) $$(*)
> rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built}
> rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed
prev parent reply other threads:[~2015-08-24 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-22 17:53 [Buildroot] [PATCH] core/pkg-kconfig: fix configurators Yann E. MORIN
2015-08-24 12:26 ` Mauro Condarelli
2015-08-24 13:46 ` Mauro Condarelli [this message]
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=55DB2025.9030102@mclink.it \
--to=mc5686@mclink.it \
--cc=buildroot@busybox.net \
/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