GNOME Software building with Snap support: snapd-glib isn't found, but it is installed


I’ve been trying to build the gnome-software package with Snappy support. I created a snapd-glib package to satisfy its dependency on this package, but it cannot detect it… My spec file for gnome-software includes both snapd-glib and snapd-glib-devel (which does depend on the former package but builddep’in it by itself gave this error so I thought I should add snapd-glib explicitly as a dep too) as build dependencies, yet it gives the error:

   35s] Native dependency json-glib-1.0 found: YES 1.4.2
   35s] Library m found: YES
   35s] Native dependency libsecret-1 found: YES 0.18.6
   35s] Native dependency libsoup-2.4 found: YES 2.62.1
   35s] Native dependency sqlite3 found: YES 3.23.1
   35s] Message: 0.45.0
   35s] Native dependency valgrind found: YES 3.13.0
   35s] Native dependency gnome-desktop-3.0 found: YES 3.28.1
   35s] Native dependency gspell-1 found: YES 1.8.0
   35s] Native dependency polkit-gobject-1 found: YES 0.114
   35s] Native dependency packagekit-glib2 found: YES 1.1.9
   35s] Native dependency fwupd found: YES 1.0.6
   35s] Native dependency flatpak found: YES 0.11.5
   35s] Native dependency gudev-1.0 found: YES 232
   35s] ERROR: Native dependency 'snapd-glib' not found
   35s] A full log can be found at /home/abuild/rpmbuild/BUILD/gnome-software-3.28.1/build/meson-logs/meson-log.txt
   35s] error: Bad exit status from /var/tmp/rpm-tmp.QXrari (%build)
   35s] RPM build errors:
   35s]     Bad exit status from /var/tmp/rpm-tmp.QXrari (%build)
   35s] fusion809-ot-pc failed "build gnome-software.spec" at Wed May  2 06:44:47 UTC 2018.

This is what I get locally on my 64-bit system, but the OBS server 64-bit build target gets the same error, for its log see Funny thing is that for i586 build target (instead of x86-64 which was used for the above build) it builds fine, likewise when I build locally with rpmbuild this spec file works until a ninja build failure. Any ideas why my x86-64 build fails?

Thanks for your time

Silly me, my snapd-glib OBS package is here:, my gnome-software package is here:

I think the problem relates to pkg-config not finding snapd-glib as there’s this line in the meson log:

Determining dependency 'snapd-glib' with pkg-config executable '/usr/bin/pkg-config' ERROR: Native dependency 'snapd-glib' not found

how do I get snapd-glib to be detectable by pkg-config. The RPMLint of snapd-glib does mention pkg-config files being present but no pkgconfig provides.

  100s] snapd-glib-devel.x86_64: E: no-pkg-config-provides (Badness: 300)
  100s] The package installs a .pc file but does not provide pkgconfig(..) provides.
  100s] The most likely reason for that is that it was built without BuildRequires:
  100s] pkg-config. Please double check your build dependencies.

I’ve tried adding pkg-config as a build dep and pkgconfig(snapd-glb) as provides for snapd-glib-devel (the one with .pc files in it) in the hope that meson would pick it up, but no luck.

.pc files should go into /usr/lib, not /usr/lib64.

They are in /usr/lib. If you look at the spec file ( they’re in %{_libexecdir}, which is /usr/lib.

Actually I was wrong. pkg-config is built with /usr/lib64 path on 64 bit systems (%_libdir to be specific).

Aha, your advice was gold, it worked! Thanks, now I’ve got Snappy packages being shown in GNOME Software. Took me several hours, but I got it.