Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV
@ 2015-07-02 14:41 Tal Zilcer
  2015-07-02 15:59 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Tal Zilcer @ 2015-07-02 14:41 UTC (permalink / raw)
  To: buildroot

From: Tal Zilcer <talz@ezchip.com>

When building a configuration editor we assume its for the HOST.
However some packages might define MAKE_ENV as TARGET_MAKE_NEV.
Using this variable adds to beginning of $(PATH),
the directory $(HOST_DIR)/usr/bin.

This cause us to not use pkg-config from our host machine but the one
from $(HOST_DIR)/usr/bin. This pkg-config does not support QT.
Now when we try to run for example linux-xconfig we fail since QT is not found.

To overcome this we defined a dedicated variable for the configuration editors

Signed-off-by: Tal Zilcer <talz@ezchip.com>
---
 package/pkg-kconfig.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index c86c340..48ab6ff 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -109,7 +109,7 @@ endif
 #
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR)
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
-	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
+	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
 		$$($(2)_KCONFIG_OPTS) $$(subst $(1)-,,$$@)
 	rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built}
 	rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV
  2015-07-02 14:41 [Buildroot] [PATCH 1/1] package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV Tal Zilcer
@ 2015-07-02 15:59 ` Thomas Petazzoni
  2015-07-02 21:20   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-07-02 15:59 UTC (permalink / raw)
  To: buildroot

Dear Tal Zilcer,

On Thu, 2 Jul 2015 17:41:40 +0300, Tal Zilcer wrote:

>  $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR)
>  $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
> -	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> +	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \

I actually don't think adding a KCONFIG_EDITORS_MAKE_ENV variable is
really useful here. Since it's a bunch of host tools, maybe we should
just:

	$$(HOST_MAKE_ENV) $$(MAKE) -C ...

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV
  2015-07-02 15:59 ` Thomas Petazzoni
@ 2015-07-02 21:20   ` Yann E. MORIN
  2015-07-04 12:30     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2015-07-02 21:20 UTC (permalink / raw)
  To: buildroot

Tal, All,

On 2015-07-02 17:59 +0200, Thomas Petazzoni spake thusly:
> On Thu, 2 Jul 2015 17:41:40 +0300, Tal Zilcer wrote:
> 
> >  $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR)
> >  $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
> > -	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> > +	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> 
> I actually don't think adding a KCONFIG_EDITORS_MAKE_ENV variable is
> really useful here. Since it's a bunch of host tools, maybe we should
> just:
> 
> 	$$(HOST_MAKE_ENV) $$(MAKE) -C ...

I do agree with Thomas here.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV
  2015-07-02 21:20   ` Yann E. MORIN
@ 2015-07-04 12:30     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-07-04 12:30 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Thu, 2 Jul 2015 23:20:32 +0200, Yann E. MORIN wrote:

> On 2015-07-02 17:59 +0200, Thomas Petazzoni spake thusly:
> > On Thu, 2 Jul 2015 17:41:40 +0300, Tal Zilcer wrote:
> > 
> > >  $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): @D=$$($(2)_DIR)
> > >  $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $$($(2)_DIR)/.stamp_kconfig_fixup_done
> > > -	$$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> > > +	$$($(2)_KCONFIG_EDITORS_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
> > 
> > I actually don't think adding a KCONFIG_EDITORS_MAKE_ENV variable is
> > really useful here. Since it's a bunch of host tools, maybe we should
> > just:
> > 
> > 	$$(HOST_MAKE_ENV) $$(MAKE) -C ...
> 
> I do agree with Thomas here.

Except that it doesn't work: HOST_MAKE_ENV defines:

        PKG_CONFIG_SYSROOT_DIR="/" \
        PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"

So this is perfectly OK to force pkg-config to find libraries built for
the host instead of the target. However, since we're passing
PKG_CONFIG_LIBDIR, we completely override the default pkg-config search
path, so it does not even check for libraries installed system-wide, it
only searches for libraries we have installed in $(HOST_DIR). And since
Qt is not built by us, it doesn't work.

Using PKG_CONFIG_PATH would allow to search for the host installed
libraries. However, our pkg-config wrapper enforces the use of the
cross-PKG_CONFIG_LIBDIR if no PKG_CONFIG_LIBDIR value is passed.

Bottom line, using $(HOST_MAKE_ENV) is clearly not sufficient to solve
the problem.

So we have to decide whether we want to use the system-provided
pkg-config, or our own pkg-config. But since linux does not depend on
host-pkgconf, maybe we should simply just use the one available on the
system, since we anyway don't build ncurses/qt/gtk ourselves for the
configuration interfaces. If that's what we want to do, I would then
suggest to do pass any variable in the make environment.

Yann, what do you think?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-04 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 14:41 [Buildroot] [PATCH 1/1] package/pkg-kconfig: define KCONFIG_EDITORS_MAKE_ENV Tal Zilcer
2015-07-02 15:59 ` Thomas Petazzoni
2015-07-02 21:20   ` Yann E. MORIN
2015-07-04 12:30     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox