[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1057391: cinnamon: FTBFS: dh_girepository: error: Could not find Clutter-0.gir dependency



On Fri, 08 Dec 2023 at 22:15:12 +0100, Fabio Fantoni wrote:
> > Package: cinnamon
> > Public GIR XML directory: debian/cinnamon/usr/share/gir-1.0
> > GIR XML: St-1.0.gir

Please could you (ask your upstream to) move this to a private directory,
perhaps /usr/share/cinnamon? It's a fork of GNOME Shell's St, which means
it's going to be confusing to have it in the default GIR XML search path,
the same way it would be confusing if muffin's fork of Clutter was in
the default GIR XML search path.

The general rule is that GIR XML and typelibs are a bit like C headers and
shared libraries, so if your shared libraries are in a non-default path
because they're private to a group of closely-cooperating packages (like
muffin and cinnamon in your case, or mutter and gnome-shell for GNOME),
then your GIR XML and typelibs should also be in a non-default path.
At the moment, your typelibs *are* in the non-default path
/usr/lib/$(DEB_HOST_MULTIARCH)/cinnamon, so that's fine; it's just your
GIR XML that isn't.

GNOME Shell's equivalent is that it has /usr/share/gnome-shell/St-12.gir,
/usr/lib/gnome-shell/St-12.typelib and /usr/lib/gnome-shell/libst-12.so
(again, none of those are on the default search path).

> About cinnamon I saw that add this fixed the build:
> 
> > override_dh_girepository:
> > dh_girepository --verbose /usr/lib/$(DEB_HOST_MULTIARCH)/muffin

That seems like a correct change. You can remove the --verbose argument
after you get it working, but it's good to leave it there while you're
experimenting.

The issue is that cinnamon provides a library (a fork of GNOME Shell's
St) which has a typelib (St-1.0.typelib) and GIR XML (St-1.0.gir), but
the library depends on muffin's fork of Clutter, which installs into a
private library directory, because it's only intended to be used by muffin
and cinnamon, and is not sufficiently stable for wider use. Now that
dh_girepository tries harder to generate appropriate dependencies for
public GIR XML, you need to either stop dh_girepository from doing this
(by moving the GIR XML to a private directory or using -X), or tell it
where to find muffin's fork of Clutter.

You might also need to add /usr/lib/$(DEB_HOST_MULTIARCH)/cinnamon
and /usr/share/cinnamon to this search path, to find the private libraries
shipped by cinnamon itself.

> About muffin I tried to add "Provides: ${gir:Provides}" to -dev package but
> it didn't added anything, I tried after saw https://salsa.debian.org/gnome-team/gobject-introspection/-/commit/d3611aaf3d8d98ca910b5f1e96f68a579538507f
> 
> I not understand what I should do about muffin as have only one packages
> with private gir, maintain one gir package will remain ok? I should add only
> a manual Provides in -dev package?

The stuff with ${gir:Provides} and ${gir:Depends} is really intended
for public libraries that are available for anyone to use, like GTK and
libsoup. For private libraries that are only intended for use within a
small, closely cooperating set of packages (like cinnamon and muffin,
or gnome-shell and mutter), you can do whatever makes the combination
of those packages work correctly. You don't necessarily need to use
${gir:Provides} or ${gir:Depends}.

> > dh_girepository: warning: libgtk-3-dev should have Provides:
> > gir1.2-gtk-3.0-dev (= ${binary:Version})

The GNOME team (most likely me) will fix this at some point. It's a
minor bug in the GTK 3 packaging, and you do not need to do anything
about this particular warning.

> seems it should add some -dev packages as cinnamon deps that I think not
> good, I suppose I should create a new package instead like
> gir1.2-cinnamon-0.1-dev, or I'm wrong?

I agree that cinnamon Depends: libmuffin-dev would be wrong. When I
can find more time to work on dh_girepository, I might add an option to
suppress generation of these -dev dependencies. You could probably use
dh_girepository -XCinnamon-0.1.gir -XSt-1.0.gir, or something like that.

In the long term, splitting GIR XML into -dev packages might be helpful
for bootstrapping and cross-compiling (that's parly why I made these
changes in gobject-introspection), but if nobody is actively trying
to cross-compile cinnamon then it isn't worth putting it through NEW
just for this. You could perhaps consider moving them to a cinnamon-dev
package next time you need to go through NEW for some other reason?

> on cinnamon full -dev package is not needed but only gir files for few cases
> (only developer I think) can be useful so was added in cinnamon package

If you install the GIR XML into a private directory, this should solve
itself. If other Debian packages load that GIR XML during their build,
they'll need adapting to search that private directory.

If no other Debian packages refer to this GIR XML (likely) then you can
definitely move it to a private directory.

    smcv


Reply to: