As of version 2.30.0 glib does not bundle pkg-config, but instead depends on external package and fails if pkg-config is not provided (most probably dev-libs/pkgconfig should be added as a dependency for dev-libs/glib). But the dev-libs/pkgconfig needs glib.h to compile, making this in fact a circular dependency. This is normally not a problem on a working Gentoo system - I've stumbled on it while installing Gentoo on a fresh machine. Workaround: emerge "<dev-libs/glib-2.30"; emerge dev-libs/pkgconfig; emerge glib Reproducible: Always Steps to Reproduce: 1. emerge -C glib pkg-config 2. try "emerge =glib-2.30.0" or "emerge =pkgconfig-0.26"
Any build logs of a failure ? Cause you seem to be reading a different ebuild than the one in the tree. As of now pkg-config 0.26 must depend on glib and as such glib *can't* depend on pkg-config in turn. There are hacks in the glib ebuild that should allow glib to build in case pkg-config is not present yet.
Created attachment 288735 [details] build.log I've got files with these checksums: root@sysresccd /mnt/gentoo/usr/portage/dev-libs/glib % sha1sum glib-2.30.0.ebuild Manifest metadata.xml 59934a4dd1fa86d8b067f0f64dc259dc5534a53f glib-2.30.0.ebuild 3ae11a0d02fd967b61be4fa5c99a52d235f4b9fd Manifest db51ce81497f12112e03bb5812ea734e1e15b44e metadata.xml I'll try syncing the portage tree and reporting back.
Syncing didn't fix the problem. I can reproduce this error consistently.
OK, that's a different thing and there's a simple explanation: libffi is a new dependency in 2.30 and somebody failed to update the hack in this regard. On the other hand, I'm not sure the current hack is complete (regarding dbus) is complete.
I can confirm this bug. I was building fresh from stage3-i686, results were the same. This sequence worked: emerge -1 \<dev-libs/glib-2.30 emerge -1 pkgconfig emerge -1 dev-libs/glib
Installing libffi should be enough as I can see in build.log, have you tried that instead?
I've had libffi installed at the time of build failure so this is not a workaround.
I suppose we need the following ugly hack in src_configure() then: # Avoid circular depend with dev-util/pkgconfig if ! has_version dev-util/pkgconfig; then export DBUS1_CFLAGS="-I/usr/include/dbus-1.0 -I/usr/$(get_libdir)/dbus-1.0/include" export DBUS1_LIBS="-ldbus-1" export ZLIB_CFLAGS="" export ZLIB_LIBS="-lz" # includes for dev-libs/libffi-X.Y.Z-rW are in /usr/lib/libffi-X.Y.Z/include export LIBFFI_CFLAGS="-I/usr/$(get_libdir)/$(best_version dev-libs/libffi | sed -e 's:dev-libs/::' -e 's:-r[0-9]\+$::')/include" export LIBFFI_LIBS="-lffi" fi Note that this means we will have to depend on dev-libs/libffi, not virtual/libffi (no way to know where the virtual's includes are in advance).
The ZLIB should fallback and get detected properly without those lines. So drop them. if ! has_version dev-util/pkgconfig; then export LIBFFI_CFLAGS="-I$(realpath /usr/$(get_libdir)/libffi-*/include)" export LIBFFI_LIBS="-lffi" fi
grep ^includedir /usr/$(get_libdir)/pkgconfig/libffi.pc | sed -e "s:\${libdir}:/usr/$(get_libdir):" -e 's:.*=::'
The realpath version needs app-misc/realpath in DEPEND
+ 06 Oct 2011; Samuli Suominen <ssuominen@gentoo.org> glib-2.30.0.ebuild: + export LIBFFI_CFLAGS and LIBFFI_LIBS if dev-util/pkgconfig is not installed + wrt #385561 by Bartosz Szreder
(In reply to comment #12) > + 06 Oct 2011; Samuli Suominen <ssuominen@gentoo.org> glib-2.30.0.ebuild: > + export LIBFFI_CFLAGS and LIBFFI_LIBS if dev-util/pkgconfig is not installed > + wrt #385561 by Bartosz Szreder http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/glib/glib-2.30.0.ebuild?r1=1.2&r2=1.3
*** Bug 368301 has been marked as a duplicate of this bug. ***
*** Bug 374775 has been marked as a duplicate of this bug. ***
*** Bug 415093 has been marked as a duplicate of this bug. ***
*** Bug 387811 has been marked as a duplicate of this bug. ***
*** Bug 392017 has been marked as a duplicate of this bug. ***
*** Bug 389239 has been marked as a duplicate of this bug. ***
For anyone ending up in this bug looking for a workaround: If you have broken your dev-util/pkgconfig installation by uninstalling dev-libs/glib, you should recover your system like this: # emerge -C dev-util/pkgconfig virtual/pkgconfig # emerge -1 dev-util/pkgconfig