Hi,
A while ago, pkg-config 0.26 got released and the main change in there is that it depends on an external glib (instead of an internal copy).
We can easily drop the pkg-config BuildRequires in glib by setting some environment variable so that glib knows how to use pcre & friends. (Of course, we lose the automatic pkgconfig() Provides/Requires, but okay, let's ignore that).
However, things get ugly:
+ if we want glib2 to build with the external pcre library, we need pcre-devel to be installed
+ pcre-devel has a Requires for /usr/bin/pkg-config, and hence on the pkg-config package (automatically added at the same time as the pkgconfig() Provides, I guess)
=> to build pkg-config, I need glib2, for which I still need pkg-config. Loops are fun.
The issue here is that to fix the loop, we'd need to eradicate the pkg-config dependency on everything that is below glib2. This includes at least libffi-devel, libselinux-devel, pcre-devel and zlib-devel. And libraries that might be below those.
This sounds annoying, as it's easy to re-introduce a build loop. On the other hand, I don't really see what else we can do.
Any opinion?
Vincent
Vincent Untz wrote:
[...] The issue here is that to fix the loop, we'd need to eradicate the pkg-config dependency on everything that is below glib2. This includes at least libffi-devel, libselinux-devel, pcre-devel and zlib-devel. And libraries that might be below those.
This sounds annoying, as it's easy to re-introduce a build loop. On the other hand, I don't really see what else we can do.
Would it be possible to build a special, minimal bootstrap glib that is only used for building pkg-config? A trick like that is used by other packages too (krb5-mini, ghostscript-mini, etc ...).
cu Ludwig
Le jeudi 12 janvier 2012, à 09:05 +0100, Ludwig Nussel a écrit :
Vincent Untz wrote:
[...] The issue here is that to fix the loop, we'd need to eradicate the pkg-config dependency on everything that is below glib2. This includes at least libffi-devel, libselinux-devel, pcre-devel and zlib-devel. And libraries that might be below those.
This sounds annoying, as it's easy to re-introduce a build loop. On the other hand, I don't really see what else we can do.
Would it be possible to build a special, minimal bootstrap glib that is only used for building pkg-config? A trick like that is used by other packages too (krb5-mini, ghostscript-mini, etc ...).
Unfortunately, glib2 has hard dependencies on zlib and libffi, so as long as the devel packages for those bring pkg-config in, it's not possible.
For reference, this is what depends on pkg-config in a glib2 build root:
pkg-config is needed by (installed) libsepol-devel-2.0.41-14.19.i586 /usr/bin/pkg-config is needed by (installed) libbz2-devel-1.0.6-16.6.i586 /usr/bin/pkg-config is needed by (installed) udev-173-7.1.i586 /usr/bin/pkg-config is needed by (installed) pcre-devel-8.20-2.2.i586 /usr/bin/pkg-config is needed by (installed) zlib-devel-1.2.5.2_git201109121534-19.1.i586 /usr/bin/pkg-config is needed by (installed) libffi46-devel-4.6.2_20111212-1.1.i586 /usr/bin/pkg-config is needed by (installed) libsepol-devel-2.0.41-14.19.i586 /usr/bin/pkg-config is needed by (installed) libselinux-devel-2.0.91-17.13.i586
We can remove the deps on libselinux-devel, libsepol-devel and pcre-devel. As to libbz2-devel and udev, I think they're part of the packages that get installed in all build roots -- but we can at least fix udev by moving the .pc file to a devel subpackage.
Cheers,
Vincent
Le jeudi 12 janvier 2012, à 09:05 +0100, Ludwig Nussel a écrit :
Vincent Untz wrote:
[...] The issue here is that to fix the loop, we'd need to eradicate the pkg-config dependency on everything that is below glib2. This includes at least libffi-devel, libselinux-devel, pcre-devel and zlib-devel. And libraries that might be below those.
This sounds annoying, as it's easy to re-introduce a build loop. On the other hand, I don't really see what else we can do.
Would it be possible to build a special, minimal bootstrap glib that is only used for building pkg-config? A trick like that is used by other packages too (krb5-mini, ghostscript-mini, etc ...).
Actually, we could do this with pkg-config, and that would be similar to the idea I had a few months ago: just keep the old pkg-config as pkg-config-mini, and use this one for libffi, zlib, etc.
Vincent
On Thu, 12 Jan 2012, Vincent Untz wrote:
Le jeudi 12 janvier 2012, à 09:05 +0100, Ludwig Nussel a écrit :
Vincent Untz wrote:
[...] The issue here is that to fix the loop, we'd need to eradicate the pkg-config dependency on everything that is below glib2. This includes at least libffi-devel, libselinux-devel, pcre-devel and zlib-devel. And libraries that might be below those.
This sounds annoying, as it's easy to re-introduce a build loop. On the other hand, I don't really see what else we can do.
Would it be possible to build a special, minimal bootstrap glib that is only used for building pkg-config? A trick like that is used by other packages too (krb5-mini, ghostscript-mini, etc ...).
Actually, we could do this with pkg-config, and that would be similar to the idea I had a few months ago: just keep the old pkg-config as pkg-config-mini, and use this one for libffi, zlib, etc.
Why not provide the ability do to the Requires/Provides detection without requiring an installed pkg-config? It looks doable even with a shell script!
Anyway, that pkg-config uses glib sounds totally useless to me, given its simple tasks. So why not rip out that requirement from pkg-config?
Richard.
Le jeudi 12 janvier 2012, à 10:31 +0100, Richard Guenther a écrit :
On Thu, 12 Jan 2012, Vincent Untz wrote:
Le jeudi 12 janvier 2012, à 09:05 +0100, Ludwig Nussel a écrit :
Vincent Untz wrote:
[...] The issue here is that to fix the loop, we'd need to eradicate the pkg-config dependency on everything that is below glib2. This includes at least libffi-devel, libselinux-devel, pcre-devel and zlib-devel. And libraries that might be below those.
This sounds annoying, as it's easy to re-introduce a build loop. On the other hand, I don't really see what else we can do.
Would it be possible to build a special, minimal bootstrap glib that is only used for building pkg-config? A trick like that is used by other packages too (krb5-mini, ghostscript-mini, etc ...).
Actually, we could do this with pkg-config, and that would be similar to the idea I had a few months ago: just keep the old pkg-config as pkg-config-mini, and use this one for libffi, zlib, etc.
Why not provide the ability do to the Requires/Provides detection without requiring an installed pkg-config? It looks doable even with a shell script!
We could do that, yes. Michael, do you think this could go upstream if we do it?
Anyway, that pkg-config uses glib sounds totally useless to me, given its simple tasks. So why not rip out that requirement from pkg-config?
Because upstream wants to use glib...
Vincent
Am Donnerstag, 12. Januar 2012, 08:39:32 schrieb Vincent Untz:
Hi,
A while ago, pkg-config 0.26 got released and the main change in there is that it depends on an external glib (instead of an internal copy).
We can easily drop the pkg-config BuildRequires in glib by setting some environment variable so that glib knows how to use pcre & friends. (Of course, we lose the automatic pkgconfig() Provides/Requires, but okay, let's ignore that).
However, things get ugly:
if we want glib2 to build with the external pcre library, we need pcre-devel to be installed
pcre-devel has a Requires for /usr/bin/pkg-config, and hence on the pkg-config package (automatically added at the same time as the pkgconfig() Provides, I guess)
I think the easiest would be to change the detection to work also without pkg-config to avoid the loop ... Or even hardcode the pcre support via a patch, because we can ensure that the right one is installed via a versioned BuildRequires.
Le jeudi 12 janvier 2012, à 09:16 +0100, Adrian Schröter a écrit :
Am Donnerstag, 12. Januar 2012, 08:39:32 schrieb Vincent Untz:
Hi,
A while ago, pkg-config 0.26 got released and the main change in there is that it depends on an external glib (instead of an internal copy).
We can easily drop the pkg-config BuildRequires in glib by setting some environment variable so that glib knows how to use pcre & friends. (Of course, we lose the automatic pkgconfig() Provides/Requires, but okay, let's ignore that).
However, things get ugly:
if we want glib2 to build with the external pcre library, we need pcre-devel to be installed
pcre-devel has a Requires for /usr/bin/pkg-config, and hence on the pkg-config package (automatically added at the same time as the pkgconfig() Provides, I guess)
I think the easiest would be to change the detection to work also without pkg-config to avoid the loop ... Or even hardcode the pcre support via a patch, because we can ensure that the right one is installed via a versioned BuildRequires.
You missed the point: we don't need pkg-config to build glib2 as you point out, and it's already fixed in my local checkout. But packages that are needed to build glib2 depend on pkg-config. Hence the loop.
Vincent