linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [PATCH] pkg-config default search pathes
@ 2014-08-11 14:22 Silvio Fricke
  2014-08-11 14:22 ` [RFC] [PATCH] kconfig: menuconfig: pkg-config should base upon default configuration Silvio Fricke
  2014-08-11 17:23 ` [RFC] [PATCH] pkg-config default search pathes justin
  0 siblings, 2 replies; 6+ messages in thread
From: Silvio Fricke @ 2014-08-11 14:22 UTC (permalink / raw)
  To: Yann E . MORIN; +Cc: Silvio Fricke, linux-kbuild, Justin Lecher

Hi,

please review this patch.
I'm a little bit unsure if this patch is technicaly state-of-the-art because
kbuild does it right. The problem is that some cross-toolchains (on my box is
yocto installed) change the pkg-config search pathes to do some package-config
setups for cross compiling.
But the init of the toolchain manipulates PKG_CONFIG_SYSROOT_DIR and
PKG_CONFIG_PATH variables that a pkg-config call searches in the wrong place to
find the package and gives back the wrong values which we use to test the
availability of ncurses installation and this break the [x,g,menu]config.

Some recommendations for this?


Cheers and thx,
Silvio


Silvio Fricke (1):
  kconfig: menuconfig: pkg-config should base upon default configuration

 scripts/kconfig/lxdialog/check-lxdialog.sh | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.0.3


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

* [RFC] [PATCH] kconfig: menuconfig: pkg-config should base upon default configuration
  2014-08-11 14:22 [RFC] [PATCH] pkg-config default search pathes Silvio Fricke
@ 2014-08-11 14:22 ` Silvio Fricke
  2014-08-22 11:07   ` Michal Marek
  2014-08-11 17:23 ` [RFC] [PATCH] pkg-config default search pathes justin
  1 sibling, 1 reply; 6+ messages in thread
From: Silvio Fricke @ 2014-08-11 14:22 UTC (permalink / raw)
  To: Yann E . MORIN; +Cc: Silvio Fricke, linux-kbuild, Justin Lecher

Since fc9c6e0 "menuconfig: optionally use pkg-config to detect ncurses
libs" we use pkg-config, but some cross toolchains (like yocto tc)
change the search pathes for pc files with some PKG_CONFIG_* environment
variables.

With this patch we ensure that we only get the host config options for
ncurses and don't mix with others not relevant settings.

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
---
 scripts/kconfig/lxdialog/check-lxdialog.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 9d2a4c5..a067d3c 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -1,6 +1,9 @@
 #!/bin/sh
 # Check ncurses compatibility
 
+unset PKG_CONFIG_PATH
+unset PKG_CONFIG_SYSROOT_DIR
+
 # What library to link
 ldflags()
 {
-- 
2.0.3


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

* Re: [RFC] [PATCH] pkg-config default search pathes
  2014-08-11 14:22 [RFC] [PATCH] pkg-config default search pathes Silvio Fricke
  2014-08-11 14:22 ` [RFC] [PATCH] kconfig: menuconfig: pkg-config should base upon default configuration Silvio Fricke
@ 2014-08-11 17:23 ` justin
  2014-08-11 17:41   ` Silvio Fricke
  1 sibling, 1 reply; 6+ messages in thread
From: justin @ 2014-08-11 17:23 UTC (permalink / raw)
  To: Silvio Fricke, Yann E . MORIN; +Cc: linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

On 11/08/14 16:22, Silvio Fricke wrote:
> Hi,
> 
> please review this patch.
> I'm a little bit unsure if this patch is technicaly state-of-the-art because
> kbuild does it right. The problem is that some cross-toolchains (on my box is
> yocto installed) change the pkg-config search pathes to do some package-config
> setups for cross compiling.
> But the init of the toolchain manipulates PKG_CONFIG_SYSROOT_DIR and
> PKG_CONFIG_PATH variables that a pkg-config call searches in the wrong place to
> find the package and gives back the wrong values which we use to test the
> availability of ncurses installation and this break the [x,g,menu]config.
> 
> Some recommendations for this?
> 
> 

Hi Silvio,

What would happen in a real crosscompile case?

Justin



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

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

* Re: [RFC] [PATCH] pkg-config default search pathes
  2014-08-11 17:23 ` [RFC] [PATCH] pkg-config default search pathes justin
@ 2014-08-11 17:41   ` Silvio Fricke
  2014-08-11 18:04     ` justin
  0 siblings, 1 reply; 6+ messages in thread
From: Silvio Fricke @ 2014-08-11 17:41 UTC (permalink / raw)
  To: justin; +Cc: Yann E . MORIN, linux-kbuild

Hi Justin,


2014-08-11 19:23 GMT+02:00 justin <jlec@gentoo.org>:
>
> On 11/08/14 16:22, Silvio Fricke wrote:
> > please review this patch.
> > I'm a little bit unsure if this patch is technicaly state-of-the-art because
> > kbuild does it right. The problem is that some cross-toolchains (on my box is
> > yocto installed) change the pkg-config search pathes to do some package-config
> > setups for cross compiling.
> > But the init of the toolchain manipulates PKG_CONFIG_SYSROOT_DIR and
> > PKG_CONFIG_PATH variables that a pkg-config call searches in the wrong place to
> > find the package and gives back the wrong values which we use to test the
> > availability of ncurses installation and this break the [x,g,menu]config.
> >
> > Some recommendations for this?
>
> What would happen in a real crosscompile case?


In a real crosscompile case we don't have a "crosscompile" [x,g,menu]config.
This step is ever made with the host-toolchain. Or I miss something here?

Bye,
Silvio

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

* Re: [RFC] [PATCH] pkg-config default search pathes
  2014-08-11 17:41   ` Silvio Fricke
@ 2014-08-11 18:04     ` justin
  0 siblings, 0 replies; 6+ messages in thread
From: justin @ 2014-08-11 18:04 UTC (permalink / raw)
  To: Silvio Fricke; +Cc: Yann E . MORIN, linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On 11/08/14 19:41, Silvio Fricke wrote:
> Hi Justin,
> 
> 
> 2014-08-11 19:23 GMT+02:00 justin <jlec@gentoo.org>:
>>
>> On 11/08/14 16:22, Silvio Fricke wrote:
>>> please review this patch.
>>> I'm a little bit unsure if this patch is technicaly state-of-the-art because
>>> kbuild does it right. The problem is that some cross-toolchains (on my box is
>>> yocto installed) change the pkg-config search pathes to do some package-config
>>> setups for cross compiling.
>>> But the init of the toolchain manipulates PKG_CONFIG_SYSROOT_DIR and
>>> PKG_CONFIG_PATH variables that a pkg-config call searches in the wrong place to
>>> find the package and gives back the wrong values which we use to test the
>>> availability of ncurses installation and this break the [x,g,menu]config.
>>>
>>> Some recommendations for this?
>>
>> What would happen in a real crosscompile case?
> 
> 
> In a real crosscompile case we don't have a "crosscompile" [x,g,menu]config.
> This step is ever made with the host-toolchain. Or I miss something here?
> 

You are right, no need for using crosscompile to configure the kernel.
Looks good to me.

Justin



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

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

* Re: [RFC] [PATCH] kconfig: menuconfig: pkg-config should base upon default configuration
  2014-08-11 14:22 ` [RFC] [PATCH] kconfig: menuconfig: pkg-config should base upon default configuration Silvio Fricke
@ 2014-08-22 11:07   ` Michal Marek
  0 siblings, 0 replies; 6+ messages in thread
From: Michal Marek @ 2014-08-22 11:07 UTC (permalink / raw)
  To: Silvio Fricke, Yann E . MORIN; +Cc: linux-kbuild, Justin Lecher

Dne 11.8.2014 16:22, Silvio Fricke napsal(a):
> Since fc9c6e0 "menuconfig: optionally use pkg-config to detect ncurses
> libs" we use pkg-config, but some cross toolchains (like yocto tc)
> change the search pathes for pc files with some PKG_CONFIG_* environment
> variables.
> 
> With this patch we ensure that we only get the host config options for
> ncurses and don't mix with others not relevant settings.
> 
> Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
> ---
>  scripts/kconfig/lxdialog/check-lxdialog.sh | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
> index 9d2a4c5..a067d3c 100644
> --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
> +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
> @@ -1,6 +1,9 @@
>  #!/bin/sh
>  # Check ncurses compatibility
>  
> +unset PKG_CONFIG_PATH
> +unset PKG_CONFIG_SYSROOT_DIR

PKG_CONFIG_SYSROOT_DIR is clearly meant for cross-compiling and we are
never cross-compiling kconfig. However, PKG_CONFIG_PATH has valid use
cases even when not cross-compiling. Which variables exactly does yocto set?

It might also be a good idea for yocto to special case the kernel and do
not set the variables, because we are not cross-compiling any userspace
programs.

Michal

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

end of thread, other threads:[~2014-08-22 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-11 14:22 [RFC] [PATCH] pkg-config default search pathes Silvio Fricke
2014-08-11 14:22 ` [RFC] [PATCH] kconfig: menuconfig: pkg-config should base upon default configuration Silvio Fricke
2014-08-22 11:07   ` Michal Marek
2014-08-11 17:23 ` [RFC] [PATCH] pkg-config default search pathes justin
2014-08-11 17:41   ` Silvio Fricke
2014-08-11 18:04     ` justin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).