After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679852 - build failure: Package gio-2.0 was not found in the pkg-config search path
build failure: Package gio-2.0 was not found in the pkg-config search path
Status: RESOLVED FIXED
Product: libsecret
Classification: Other
Component: General
unspecified
Other All
: Normal major
: ---
Assigned To: libsecret maintainer(s)
libsecret maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-07-13 12:40 UTC by Craig Keogh
Modified: 2012-07-13 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Various introspection-related build fixes (2.47 KB, patch)
2012-07-13 13:14 UTC, Colin Walters
committed Details | Review

Description Craig Keogh 2012-07-13 12:40:57 UTC
I am building libsecret git master via JHBuild on Fedora 17. The build fails with log below.

I do have Package gio-2.0 installed. I noticed in the log below libsecret is overriding PKG_CONFIG_PATH to '.', hence why libsecret can't find my gio-2.0.

Making all in .
make[4]: Entering directory `/home/oxyde/gnome/build/libsecret/libsecret'
PKG_CONFIG_PATH=. /opt/gnome/bin/g-ir-scanner   --warn-all --add-include-path=. --add-include-path=. --namespace=Secret --nsversion=1 --libtool="/bin/sh ../libtool" --pkg=gobject-2.0 --pkg=gio-2.0 --include=GObject-2.0 --include=Gio-2.0 --pkg-export=libsecret-1  --library=libsecret-1.la --c-include "libsecret/secret.h" -I.. -I.. -DSECRET_COMPILATION  secret-attributes.h secret-attributes.c secret-password.h secret-password.c secret-schema.h secret-schema.c secret-types.h libsecret-1.la --output Secret-1.gir
Package gio-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gio-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gio-2.0' found
Package gio-unix-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gio-unix-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gio-unix-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found
In file included from <stdin>:4:0:
/home/oxyde/gnome/build/libsecret/libsecret/secret-attributes.h:22:18: fatal error: glib.h: No such file or directory
compilation terminated.
Error while processing the source.
make[4]: *** [Secret-1.gir] Error 1
make[4]: Leaving directory `/home/oxyde/gnome/build/libsecret/libsecret'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/oxyde/gnome/build/libsecret/libsecret'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/oxyde/gnome/build/libsecret/libsecret'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/oxyde/gnome/build/libsecret'
make: *** [all] Error 2
Comment 1 Stef Walter 2012-07-13 12:46:43 UTC
Hmmm, $PKG_CONFIG_PATH doesn't override the default search directory of pkg-config. At least that's what the man page says. Does g-ir-scanner have the same behavior Colin?
Comment 2 Colin Walters 2012-07-13 13:05:45 UTC
(In reply to comment #1)
> Hmmm, $PKG_CONFIG_PATH doesn't override the default search directory of
> pkg-config. At least that's what the man page says.

That's true, but jhbuild sets PKG_CONFIG_PATH, and this bit will break it.  It's true it won't break dpkg/rpm/ostree style builds which are in chroots, and don't rely on PKG_CONFIG_PATH being set.

I'm not sure why commit 1b84a1ad42fdb9bf40cf8d3c9cd8b76ae798bd98 added this line, but it is broken.
Comment 3 Colin Walters 2012-07-13 13:08:17 UTC
Ah, you want to use --include-uninstalled=B when you have two shared libraries inside a module, where A depends on B.  Patch coming.
Comment 4 Colin Walters 2012-07-13 13:14:40 UTC
Created attachment 218723 [details] [review]
build: Various introspection-related build fixes

Don't set PKG_CONFIG_PATH, this breaks jhbuild; instead, use
--include-uninstalled to tell the scanner where to find internal
libraries.

Don't set _PACKAGES = gio-2.0; we already pick that up from the
Gio-2.0.gir.
Comment 5 Colin Walters 2012-07-13 13:15:05 UTC
(Tested via jhbuild uninstall libsecret; git clean -dfx; jhbuild make -a)
Comment 6 Stef Walter 2012-07-13 14:00:08 UTC
Thanks! Merged into master.