-
-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg-config Requires.private and removal of static libraries #1880
Comments
It's unclear to me why/how would pkgconfig files be useful to conda package users. Do we have any guideline that those must be retained? I don't think we have any pkgconfig test infrastructure set up to test their validity? |
Taking
Generating the output:
is inherently useful to me. |
The problem is that
whereas I think that for conda-forge, where we encourage dynamic linking, we should encourage the removal of the line Editing the file
makes the flags provided by
|
Removal of static libraries is policy. https://github.com/conda-forge/cfep/blob/main/cfep-18.md We already patch packages in order to devendor dependencies and ensure that artifacts are installed into the conda-environment correctly and avoid building static libs. Patching pc files to prevent static/unused linkages seems like a routine and reasonable thing. There is probably an easy call to sed -i '/Requires.private:/d' ./example.pc |
3 challenges:
|
1.2. https://github.com/uutils/coreutils is promising, but they haven't implemented
|
This is a bug in pkg-config, but See also https://fedoraproject.org/wiki/Changes/pkgconf_as_system_pkg-config_implementation |
Just following up on this question
Would use Would also note this behavior works fine on Linux. So can be used on all Unix-y platforms. Lots of examples of this in conda-forge including the build scripts of |
I'm not sure what exact bug @isuruf is referring to, but I am not sure if removing the Specifically, the example given above uses the Ultimately, as long as we are compiling C/C++ code, the development files for libraries will have to depend on the development files for their dependents. (And I think that you can argue that this is really the essence of what it means to be a "library" regardless of language/OS/whatever, but that's beyond the scope here ...) The real issue here, in my view, is that there are still many cases where we don't (or don't properly) separate libraries and development files into different subpackages. You can't get rid of the dependency graph, but you can at least do a better job of partitioning it into runtime/dev components. Unfortunately, Conda didn't include this distinction when it was first developed, so all of this separation has to be applied retroactively. (Which is a bit frustrating as Linux distros have been getting this right for 30 years, but there is also a reason that Conda has achieved the level of success that it has ...) |
So in other words, resolve this issue correctly, we would need to really create
I think may be we should have a place where we can write why we chose to use conda(-forge). It is easy to forget sometimes. |
That's my belief, yes. But as @isuruf correctly points out, the current implementation of pkg-config does have bugs regarding this stuff, and there may be individual cases where it's correct to tweak the pkg-config file. But if the upstream developers have done things right, I think that in general the dependencies induced by |
Your question:
There has been a trend at conda-forge to remove static libraries and to split off runtime libraries from build time dependencies in order to save download space.
There has also been a combined trend to add
pkgconfig
files to enable more packages that were historically built only for linux, be able to get built for windows.However, the inclusion of the
Requires.private
flag in the pkgconfig files makes it necessary to add back build time dependencies in order to "help the static builds" (see the last FAQ question in https://people.freedesktop.org/~dbn/pkg-config-guide.html)I'm really not sure what to do about this. For example, many users have had to add back zlib as a host dependency (when their software doesn't link to it directly).
Second, the glib -> harfbuzz dependency is also a tough one to manage.
Thank you for your advice.
xref: conda-forge/zlib-feedstock#69
The text was updated successfully, but these errors were encountered: