Bug 78077

Summary: System library paths not stripped correctly
Product: pkg-config Reporter: Andrew Oakley <andrew>
Component: srcAssignee: pkg-config
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: freedesktop-bugs, ssuominen
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to fix this

Description Andrew Oakley 2014-04-29 12:29:05 UTC
Created attachment 98179 [details] [review]
Patch to fix this

If a package has (for example) "Libs: -L/usr/lib -L/usr/lib" then only the first of these is stripped.  This is because the iterator is advanced twice when we are removing the unnecessary options.

The zlib pc file can be used to quickly check this.

Note that this does not seem to be an issue for the include directories (which has similar code).
Comment 1 Samuli Suominen 2014-06-22 12:03:48 UTC
*** Bug 79613 has been marked as a duplicate of this bug. ***
Comment 2 Samuli Suominen 2014-06-22 12:06:03 UTC
Duplicate of this issue,
http://bugs.freedesktop.org/show_bug.cgi?id=79613
http://bugs.gentoo.org/show_bug.cgi?id=512336

And not sure if this got fixed properly,
https://bugs.freedesktop.org/show_bug.cgi?id=58363
Since users are still hitting the issue with,
https://bugs.gentoo.org/show_bug.cgi?id=445796#c6 (As in, #58363 got reopened at downstream #445796)

Trying to make sense of this all...
Comment 3 Daniel Serpell 2014-06-26 22:39:15 UTC
I was hitting this bug today, and realized it has already a patch up since april.

The patch is trivially correct, so please apply.
Comment 4 Mike Frysinger 2014-07-29 05:47:34 UTC
patch works for me
Comment 5 Samuli Suominen 2014-07-29 08:08:34 UTC
thanks. please get this committed to git :)

added the patch to gentoo's pkg-config package distribution package version 0.28-r2 for larger audience to test... i don't expect problems, but i'll
poke here if there is an regression of somekind
Comment 6 Dan Nicholson 2014-09-27 23:22:21 UTC
Yikes. Thanks for catching this and sorry for the super slow reply. Applied in ce1a241.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.