Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Globally disable PKG_CONFIG_PATH? [was: Re: Buildroot fails to build when selecting build packages]
Date: Mon, 7 May 2012 16:36:05 +0200	[thread overview]
Message-ID: <20120507163605.2b3b5a27@skate> (raw)
In-Reply-To: <4F9D564A.8000602@mind.be>

Le Sun, 29 Apr 2012 16:55:06 +0200,
Arnout Vandecappelle <arnout@mind.be> a ?crit :

>   Buildroot devels: should we globally unset PKG_CONFIG_PATH with an
> 
> PKG_CONFIG_PATH =
> export PKG_CONFIG_PATH
> 
> in the top-level Makefile?
> 
>   Or should we add PKG_CONFIG_PATH="" to TARGET_CONFIGURE_OPTS?
> 
>   The former has the advantage that it also works for packages that 
> don't use TARGET_CONFIGURE_OPTS.  But I'm not sure if maybe we _want_ 
> host packages to use the system's PKG_CONFIG_PATH...

Well, for the moment, what we do is:

 (1) For target packages, we don't pass any PKG_CONFIG_PATH variable,
     because our host-pkg-config is hardcoded to search
     $(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig.
     However, having PKG_CONFIG_PATH in the environment will lead to
     pkg-config also searching in the paths listed in PKG_CONFIG_PATH
     before searching for the hardcoded paths.

 (2) For host packages: we only pass a PKG_CONFIG_LIBDIR variable,
     which overrides the default list of directories, but still comes
     in addition to the directories listed in the PKG_CONFIG_PATH
     variables (from a quick reading of pkg-config-0.25/main.c). Since
     we used PKG_CONFIG_LIBDIR, I guess our intention was to completely
     limit the search of .pc to the $(HOST_DIR) and not look inside the
     ones offered by the distribution. So if we want to preserve this
     behavior, we have do not something against the PKG_CONFIG_PATH
     being passed in the environment.

Therefore, in order to workaround environments where PKG_CONFIG_PATH is
set, we would have to pass PKG_CONFIG_PATH="" in both the host and
target package cases in order to get the desired effect.

Another solution is to add a check in
support/dependencies/dependencies.sh to verify that PKG_CONFIG_PATH is
not set, and otherwise abort and tell the user to do something about
this. Probably not as nice as the previous solution, though, but we
already do this for PERL_MM_OPT for example.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  parent reply	other threads:[~2012-05-07 14:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 23:49 [Buildroot] Buildroot fails to build when selecting build packages Nigel Sollars
2012-04-27 21:23 ` Arnout Vandecappelle
     [not found] ` <CAG6aBkUJAnhhWH1jF2yPLRHrk_+w3xOeSFwxS6K8U4_Pzu26sw@mail.gmail.com>
     [not found]   ` <CAG6aBkVRsBJtcBSf_ZQ84Bf7SffptL7-h9RrJqc8TYLPbef-_A@mail.gmail.com>
2012-04-28 16:01     ` Arnout Vandecappelle
2012-04-28 19:09       ` Arnout Vandecappelle
2012-04-29  7:25         ` Nigel Sollars
2012-04-29  9:44 ` Arnout Vandecappelle
2012-04-29 13:27   ` Nigel Sollars
2012-04-29 14:10     ` Arnout Vandecappelle
2012-04-29 14:36       ` Nigel Sollars
2012-04-29 14:44         ` Arnout Vandecappelle
2012-04-29 14:47           ` Nigel Sollars
2012-04-29 14:55             ` [Buildroot] Globally disable PKG_CONFIG_PATH? [was: Re: Buildroot fails to build when selecting build packages] Arnout Vandecappelle
2012-04-29 20:28               ` Nigel Sollars
2012-05-07 14:36               ` Thomas Petazzoni [this message]
2012-05-11 22:18                 ` [Buildroot] [PATCH] Globally disable PKG_CONFIG_PATH Arnout Vandecappelle

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=20120507163605.2b3b5a27@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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