Bug 473509 - pkgconfig 0.23 has wrong behavior with PKG_CONFIG_SYSROOT, makes cross compiling difficult
pkgconfig 0.23 has wrong behavior with PKG_CONFIG_SYSROOT, makes cross compil...
Product: Fedora
Classification: Fedora
Component: pkgconfig (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Clasen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-28 18:49 EST by Jon Dufresne
Modified: 2010-05-23 21:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-05-23 21:23:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jon Dufresne 2008-11-28 18:49:29 EST
See the following:


the PKG_CONFIG_SYSROOT environment variable is used when cross compiling. If I don't use this environment variable all the -I's and -L's are the wrong path. If I do use the environment variable the paths are right, but the bug mentioned in the link strips all the cflags and -l's. Either way it isn't very build friendly.

The link above provides a small patch which fixes the problem.
Comment 1 Jon Dufresne 2009-06-01 11:35:21 EDT
Updating version, this bug is still present in F11.

See the output for an explicit example:

$ pkg-config glib-2.0 --cflags
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
$ PKG_CONFIG_SYSROOT_DIR="/home" pkg-config glib-2.0 --cflags
-I/home/usr/include/glib-2.0 -I/home/usr/lib/glib-2.0/include  
$ pkg-config glib-2.0 --libs
$ PKG_CONFIG_SYSROOT_DIR="/home" pkg-config glib-2.0 --libs

Notice the environment variable PKG_CONFIG_SYSROOT_DIR will correctly modify paths, but incorrectly removes flags, such as -lglib-2.0 in the example.
Comment 2 Bug Zapper 2009-06-09 05:59:07 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 3 Wolfi 2009-10-12 08:37:59 EDT
I got bitten by this one as well.

It has been fixed upstream already:

However, pkgconfig maintainer has not yet released a stable version which includes this fix. Nevertheless, a fix for the Fedora 11 pkgconfig package would really be helpful...
Comment 4 Bug Zapper 2010-04-27 08:23:42 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 5 Jon Dufresne 2010-05-03 02:25:04 EDT
Bug still present in fedora 13.
Comment 6 Matthias Clasen 2010-05-03 23:01:27 EDT
I've asked upstream to finally get 0.24 released.
Comment 7 Matthias Clasen 2010-05-23 21:23:49 EDT
I've just built 0.24 in rawhide

Note You need to log in before you can comment on or make changes to this bug.