system include dirs are not removed when Cflags contains excess whitespace #99

Closed
opened 2016-10-24 03:49:25 +00:00 by floppym · 2 comments
floppym commented 2016-10-24 03:49:25 +00:00 (Migrated from github.com)

pkgconf version: 1.0.1

I am noticing inconsistent behavior when invoking pkgconf --cflags when Cflags contains extra white-space.

% export PKG_CONFIG_PATH=.

% cat foo.pc 
Name: foo
Version: 1.0
Cflags: -I/usr/include  -I/usr/include/foo

% pkgconf --cflags foo
-I/usr/include  -I/usr/include/foo  

% cat foo2.pc
Name: foo2
Version: 1.0
Cflags: -I/usr/include -I/usr/include/foo

% pkgconf --cflags foo2
-I/usr/include/foo  

Note the extraneous /usr/include in the first example out put. This should have been removed as a "system" directory.

Normally this would be no big deal, but when combined with some strange behavior in Qt/qmake [1] and a behavior change in GCC 6 [2], it leads to odd build failures in several software packages [3].

[1] https://bugreports.qt.io/browse/QTBUG-53367
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
[3] https://bugs.gentoo.org/show_bug.cgi?id=597912

pkgconf version: 1.0.1 I am noticing inconsistent behavior when invoking `pkgconf --cflags` when Cflags contains extra white-space. ``` % export PKG_CONFIG_PATH=. % cat foo.pc Name: foo Version: 1.0 Cflags: -I/usr/include -I/usr/include/foo % pkgconf --cflags foo -I/usr/include -I/usr/include/foo % cat foo2.pc Name: foo2 Version: 1.0 Cflags: -I/usr/include -I/usr/include/foo % pkgconf --cflags foo2 -I/usr/include/foo ``` Note the extraneous `/usr/include` in the first example out put. This should have been removed as a "system" directory. Normally this would be no big deal, but when combined with some strange behavior in Qt/qmake [1] and a behavior change in GCC 6 [2], it leads to odd build failures in several software packages [3]. [1] https://bugreports.qt.io/browse/QTBUG-53367 [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 [3] https://bugs.gentoo.org/show_bug.cgi?id=597912

Hmm! Seems the fragment list for -I/usr/include -I/usr/include/foo is something like:

{
    {'I', "/usr/include "},
    {'I', "/usr/include/foo"},
}

Okay. We'll get a fix out ASAP.

Hmm! Seems the fragment list for `-I/usr/include -I/usr/include/foo` is something like: ``` c { {'I', "/usr/include "}, {'I', "/usr/include/foo"}, } ``` Okay. We'll get a fix out ASAP.

pkgconf 1.0.2 contains a fix for this issue. Thanks for reporting!

[pkgconf 1.0.2](https://distfiles.dereferenced.org/pkgconf/pkgconf-1.0.2.tar.xz) contains a fix for this issue. Thanks for reporting!
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#99
There is no content yet.