Summary: | Requires mechanism broken | ||
---|---|---|---|
Product: | pkg-config | Reporter: | Ronald Wahl <rwahl> |
Component: | src | Assignee: | Tollef Fog Heen <tfheen> |
Status: | RESOLVED NOTABUG | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ronald Wahl
2005-04-18 13:16:24 UTC
This is a feature. On systems support inter-library linking (such as Linux), libraries should be linked with the libraries they need. If your system for some reason doesn't do that, you can get the previous behaviour by passing --enable-indirect-deps to pkg-config's configure script. Ok, I understand. But I do not see any real benefit of the new default behavior currently. What are the reasons for this change? There are some additional notes from my side: (1) AFAIK inter-library linking works only for dynamic libraries. So if you decide building a static binary of some package you'll still need to specify all the required libraries during linking. But pkg-config doesn't care about static or dynamic linking, does it? (2) If a system supports inter-library linking this doesn't necessarily mean that it is used in all cases. This depends on the authors of the packages that provide the libraries. There are still many old software packages around that need fixing to work with the new pkg-config as long as it is was configured with the defaults. As long as there is no real benefit I vote for restoring the old default. For static linking, pkg-config now has a --static flag which uses the old behaviour. (That won't add -static or anything to the gcc line, so it should be perfectly safe to use even if you are doing dynamic binaries or libraries) It has some real benefits; an example is the recent removal of libhowl from Debian (because of license issues). If we had a pkg-config which actually only linked against the libraries the applications needed, we'd have a lot less uploads and fixes to do, but since all applications which used libgnome (or libgnomevfs or some other gnome lib) were linked directly with it, they had to be rebuilt and uploaded anew. If inter-library linking is supported but not used, I'd argue that's a bug in the libraries and should be fixed. Fixing pkg-config to do the right thing while providing a mechanism for the old behaviour is a way to do that. Ah I see. So fixing the old packages is the right way to go - ok. I was not aware of the --static flag since it is not specified in the manual. Maybe it should be documented in the next version. :-) |
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.