Build may fail due to bad task ordering
I've had a build of mutter master fail on Fedora Copr because a C file including meta-dbus-remote-desktop.h
(generated at build time by gdbus-codegen
) was compiled before the header had been generated.
[270/874] /usr/bin/gdbus-codegen --c-generate-autocleanup all --interface-prefix org.gnome.Mutter. --c-namespace MetaDBus --header --output src/meta-dbus-display-config.h ../src/org.gnome.Mutter.DisplayConfig.xml
[271/874] /usr/bin/gdbus-codegen --c-generate-autocleanup all --interface-prefix org.gnome.Mutter. --c-namespace MetaDBus --c-generate-object-manager --body --output src/meta-dbus-idle-monitor.c ../src/org.gnome.Mutter.IdleMonitor.xml
[272/874] /usr/bin/gdbus-codegen --c-generate-autocleanup all --interface-prefix org.gnome.Mutter. --c-namespace MetaDBus --c-generate-object-manager --header --output src/meta-dbus-idle-monitor.h ../src/org.gnome.Mutter.IdleMonitor.xml
[273/874] /usr/bin/glib-genmarshal --prefix meta_marshal --internal --valist-marshallers --output src/meta-marshal.c --body ../src/meta-marshal.list --include-header meta-marshal.h
INFO: Reading ../src/meta-marshal.list...
[274/874] /usr/bin/msgfmt --desktop --template ../data/mutter.desktop.in -d /builddir/build/BUILD/mutter-3.38.0/po -o data/mutter.desktop
[275/874] /usr/bin/gdbus-codegen --c-generate-autocleanup all --interface-prefix org.gnome.Mutter. --c-namespace MetaDBus --body --output src/meta-dbus-display-config.c ../src/org.gnome.Mutter.DisplayConfig.xml
[276/874] /usr/bin/meson --internal exe --capture src/meta-private-enum-types.c -- /usr/bin/glib-mkenums --template /builddir/build/BUILD/mutter-3.38.0/x86_64-redhat-linux-gnu/../src/meta-private-enum-types.c.in /builddir/build/BUILD/mutter-3.38.0/x86_64-redhat-linux-gnu/../src/backends/meta-screen-cast.h
[277/874] gcc -Isrc/tests/clutter/conform/actor-clone.p -Isrc/tests/clutter/conform -I../src/tests/clutter/conform -Iclutter -I../clutter -Iclutter/clutter -I../clutter/clutter -Icogl -I../cogl -Icogl/cogl -I../cogl/cogl -Isrc -I../src -I. -I.. -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libxml2 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/json-glib-1.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libwacom-1.0 -I/usr/include/gudev-1.0 -I/usr/include/graphene-1.0 -I/usr/lib64/graphene-1.0/include -I/usr/include/sysprof-4 -I/usr/include/gsettings-desktop-schemas -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/gnome-desktop-3.0 -I/usr/include/gnome-settings-daemon-3.0 -I/usr/include/startup-notification-1.0 -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/gobject-introspection-1.0 -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -D_REENTRANT -pthread -mfpmath=sse -msse -msse2 '-DG_LOG_DOMAIN="Clutter-Conform"' -DCOGL_DISABLE_DEPRECATION_WARNINGS '-DGETTEXT_PACKAGE="mutter"' -MD -MQ src/tests/clutter/conform/actor-clone.p/actor-clone.c.o -MF src/tests/clutter/conform/actor-clone.p/actor-clone.c.o.d -o src/tests/clutter/conform/actor-clone.p/actor-clone.c.o -c ../src/tests/clutter/conform/actor-clone.c
FAILED: src/tests/clutter/conform/actor-clone.p/actor-clone.c.o
gcc -Isrc/tests/clutter/conform/actor-clone.p -Isrc/tests/clutter/conform -I../src/tests/clutter/conform -Iclutter -I../clutter -Iclutter/clutter -I../clutter/clutter -Icogl -I../cogl -Icogl/cogl -I../cogl/cogl -Isrc -I../src -I. -I.. -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libxml2 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/json-glib-1.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libwacom-1.0 -I/usr/include/gudev-1.0 -I/usr/include/graphene-1.0 -I/usr/lib64/graphene-1.0/include -I/usr/include/sysprof-4 -I/usr/include/gsettings-desktop-schemas -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/gnome-desktop-3.0 -I/usr/include/gnome-settings-daemon-3.0 -I/usr/include/startup-notification-1.0 -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -I/usr/include/gobject-introspection-1.0 -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -D_REENTRANT -pthread -mfpmath=sse -msse -msse2 '-DG_LOG_DOMAIN="Clutter-Conform"' -DCOGL_DISABLE_DEPRECATION_WARNINGS '-DGETTEXT_PACKAGE="mutter"' -MD -MQ src/tests/clutter/conform/actor-clone.p/actor-clone.c.o -MF src/tests/clutter/conform/actor-clone.p/actor-clone.c.o.d -o src/tests/clutter/conform/actor-clone.p/actor-clone.c.o -c ../src/tests/clutter/conform/actor-clone.c
In file included from ../src/backends/meta-backend-private.h:46,
from ../src/backends/x11/meta-backend-x11.h:31,
from ../src/backends/x11/nested/meta-backend-x11-nested.h:25,
from ../src/tests/clutter-test-utils.h:36,
from ../src/tests/clutter/conform/actor-clone.c:6:
../src/backends/meta-remote-desktop.h:30:10: fatal error: meta-dbus-remote-desktop.h: No such file or directory
30 | #include "meta-dbus-remote-desktop.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
The full build log is available here: https://download.copr.fedorainfracloud.org/results/pp3345/gnome-with-patches/fedora-33-x86_64/01694283-mutter/builder-live.log.gz
Probably the easiest solution would be to execute all pending gdbus-codegen
tasks before compiling any C code.
Edited by Yussuf Khalil