From alan.coopersmith at oracle.com Sat Aug 2 11:06:51 2014 From: alan.coopersmith at oracle.com (Alan Coopersmith) Date: Sat, 02 Aug 2014 11:06:51 -0700 Subject: [PATCH 2/2] Update .pc file Requires lines to express full dependencies In-Reply-To: <86vbwjy5qa.fsf@miki.keithp.com> References: <1392236041-23029-1-git-send-email-keithp@keithp.com> <1392236041-23029-3-git-send-email-keithp@keithp.com> <52FC2483.8060508@oracle.com> <86vbwjy5qa.fsf@miki.keithp.com> Message-ID: <53DD28BB.1060603@oracle.com> On 02/12/14 08:52 PM, Keith Packard wrote: > Alan Coopersmith writes: > >> Dependencies via libraries should be tracked via linking the libraries so >> the ELF data records them correctly. > > Yeah, that's not the problem these changes are trying to solve. > >> If the headers are required, the dependencies should appear on the >> Requires.private: line, not the Requires: line - for most X software, >> the Requires line should be nearly empty, and most things expressed >> on Requires.private (which also handles static linking if needed). > > As the referenced modules almost always provide part of the relevant API > (especially datatypes), I'm not sure this is correct. These requirements > aren't hidden behind the API, they're part of the API. > > My understanding of Requires.private was that it was for hidden > implementation details (like the XML library used to parse fontconfig > configuration files) so that static linking would know to pull in the > dependency. > > But, I'm probably just not understanding the subtle difference between > Requires and Requires.private... Sorry, I failed to answer months ago, and was just reminded on IRC. See points #2 & #3 of http://people.freedesktop.org/~dbn/pkg-config-guide.html#faq and Tollef's post at http://err.no/personal/blog/2008/Mar/25 . Requires.privates are used for both header files & static linking, Requires are for the rare cases where callers need to directly dynamically link to the other libraries. -- -Alan Coopersmith- alan.coopersmith at oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc