Bug 9132 - [PENDING] When using private libs, parse.c reverses the order
Summary: [PENDING] When using private libs, parse.c reverses the order
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-22 21:57 UTC by J. Scott Berg
Modified: 2009-12-06 13:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Example .pc file demonstrating the problem (437 bytes, text/plain)
2006-11-22 22:00 UTC, J. Scott Berg
Details
Patch that fixes the problem for me (1.48 KB, patch)
2006-11-22 22:09 UTC, J. Scott Berg
Details | Splinter Review

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.