Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package: correct usage of PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH
Date: Tue, 28 Dec 2010 13:30:08 +0100	[thread overview]
Message-ID: <87oc86krlb.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <dfd500e8d6ee6be7e90583199314956adcce265f.1293535143.git.thomas.petazzoni@free-electrons.com> (Thomas Petazzoni's message of "Tue, 28 Dec 2010 12:19:09 +0100")

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

 Thomas> In TARGET_CONFIGURE_OPTS (used to build packages for the target), we
 Thomas> were doing:

 Thomas>  PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)"

 Thomas> This is incorrect for two reasons:

 Thomas>  * Adding $(PKG_CONFIG_PATH) to the PKG_CONFIG_PATH is useless, as
 Thomas>    PKG_CONFIG_PATH only *adds* new paths to the existing search paths.

 Thomas>  * PKG_CONFIG_PATH keeps default path (/usr/lib/pkgconfig) in the
 Thomas>    search path, which is incorrect for target packages: we should only
 Thomas>    look in $(STAGING_DIR)/usr/lib/pkgconfig. Lionel was hit by an
 Thomas>    issue caused by this: while compiling packages for the target, it
 Thomas>    was looking at .pc files in /usr/lib/pkgconfig on his host machine.

Hmm, but we compile a dedicated (host) pkg-config for this, where we
have set --pc-path=staging, so none of this should be needed, right?
(with the possible exception of ensuring PKG_CONFIG_PATH isn't set in
the environment).

 Thomas>    PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig"

 Thomas> But there's no real reason to use PKG_CONFIG_LIBDIR here: as we are
 Thomas> compiling for the host, we may well have some interesting libraries in
 Thomas> /usr/lib/pkgconfig. So searching through them after
 Thomas> $(HOST_DIR)/usr/lib/pkgconfig sounds like the right thing to do.

That seems wrong as our pkg-config looks in staging by default, and
random host libraries shouldn't get picked up if that then breaks the
build for people without those libs.

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2010-12-28 12:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28 11:19 [Buildroot] [pull request] Pull request for branch for-2011.02/pkg-config-fix Thomas Petazzoni
2010-12-28 11:19 ` [Buildroot] [PATCH 1/1] package: correct usage of PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH Thomas Petazzoni
2010-12-28 12:30   ` Peter Korsgaard [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=87oc86krlb.fsf@macbook.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --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