Bug 9132

Summary: [PENDING] When using private libs, parse.c reverses the order
Product: pkg-config Reporter: J. Scott Berg <jsberg>
Component: srcAssignee: Tollef Fog Heen <tfheen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Example .pc file demonstrating the problem
Patch that fixes the problem for me

Description J. Scott Berg 2006-11-22 21:57:51 UTC
When using libs.private, the order of the libraries within a given package gets
reversed when you do 
pkg-config --libs --static
The problem lies in parse.c: if there is both a libs line and a libs.private
line, whichever line is first gets reversed a second time at the end of
_do_parse_libs.  I would propose deferring the reversal.  Example and patch follow.
Comment 1 J. Scott Berg 2006-11-22 22:00:46 UTC
Created attachment 7872 [details]
Example .pc file demonstrating the problem

pkg-config --libs-only-other --static should make it clear why this is a
problem
Comment 2 J. Scott Berg 2006-11-22 22:09:54 UTC
Created attachment 7873 [details] [review]
Patch that fixes the problem for me

Defer the reversals to the end of parse_package_file.  I did everything, not
just the libs, for the sake of symmetry.  Well, not everything, only the easy
ones.  Not thoroughly tested...
Comment 3 Tollef Fog Heen 2007-02-21 13:21:24 UTC
2007-02-21  Tollef Fog Heen  <tfheen@err.no>

	* parse.c (parse_package_file and others): Move the reversal of
	the _libs lists to the end to avoid double-reversing either.
	Thanks to J. Scott Berg for both the bug and the fix.  Freedesktop
	#9132
Comment 4 Tollef Fog Heen 2009-12-06 13:47:19 UTC
This was fixed for 0.23

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.