• Will Thompson's avatar
    filebrowser: fix build order for enum-types.h · 79ff20c4
    Will Thompson authored
    On Endless's package build server, building gedit on x86_64 failed as
    follows:
    
        [  194s] [97/147] /usr/bin/meson --internal exe /usr/src/packages/BUILD/obj-x86_64-linux-gnu/meson-private/meson_exe_gedit-tool-merge.pl_cd41154a78cf16ac2c5a9a58261cb6418b36427a.dat
        [  195s] [98/147] /usr/bin/msgfmt --desktop --keyword=Name --keyword=Description --template=../plugins/externaltools/externaltools.plugin.desktop.in -d /usr/src/packages/BUILD/po --output=plugins/externaltools/externaltools.plugin
        [  195s] [99/147] /usr/bin/meson --internal exe /usr/src/packages/BUILD/obj-x86_64-linux-gnu/meson-private/meson_exe_glib-mkenums_ea0cb1ece8d7fa2e9a3e7c5a57f45df212823d0f.dat
        [  195s] [100/147] cc -Iplugins/filebrowser/5f8d977@@filebrowser@sha -Iplugins/filebrowser -I../plugins/filebrowser -I. -I../ -Isubprojects/libgd -I../subprojects/libgd -Iplugins/filebrowser/resources -Igedit -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtksourceview-4 -I/usr/include/libxml2 -I/usr/include/libpeas-1.0 -I/usr/include/gobject-introspection-1.0 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DLIBGD_TAGGED_ENTRY=1 -DHAVE_CONFIG_H  -MD -MQ 'plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o' -MF 'plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o.d' -o 'plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o' -c ../plugins/filebrowser/gedit-file-browser-plugin.c
        [  195s] FAILED: plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o
        [  195s] cc -Iplugins/filebrowser/5f8d977@@filebrowser@sha -Iplugins/filebrowser -I../plugins/filebrowser -I. -I../ -Isubprojects/libgd -I../subprojects/libgd -Iplugins/filebrowser/resources -Igedit -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/libdrm -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtksourceview-4 -I/usr/include/libxml2 -I/usr/include/libpeas-1.0 -I/usr/include/gobject-introspection-1.0 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DLIBGD_TAGGED_ENTRY=1 -DHAVE_CONFIG_H  -MD -MQ 'plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o' -MF 'plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o.d' -o 'plugins/filebrowser/5f8d977@@filebrowser@sha/gedit-file-browser-plugin.c.o' -c ../plugins/filebrowser/gedit-file-browser-plugin.c
        [  195s] ../plugins/filebrowser/gedit-file-browser-plugin.c:35:10: fatal error: gedit-file-browser-enum-types.h: No such file or directory
        [  195s]  #include "gedit-file-browser-enum-types.h"
        [  195s]           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        [  195s] compilation terminated.
    
    I couldn't reproduce this locally, perhaps because I have the wrong number
    of cores. However, exploring the build graph with:
    
        ninja -t browse plugins/filebrowser/5f8d977@@filebrowser@sha/libfilebrowser.so.symbols
    
    showed that there was no dependency between
    gedit-file-browser-plugin.c.o and gedit-file-browser-enum-types.h.
    Adding the generated gedit-file-browser-enum-types.h to the sources for
    this shared_library() causes an (order-only) dependency to be added,
    ensuring that gedit-file-browser-enum-types.h is generated before
    gedit-file-browser-plugin.c is compiled.
    79ff20c4
Name
Last commit
Last update
..
messages Loading commit data...
resources Loading commit data...
filebrowser.plugin.desktop.in Loading commit data...
gedit-file-bookmarks-store.c Loading commit data...
gedit-file-bookmarks-store.h Loading commit data...
gedit-file-browser-enum-register.c.template Loading commit data...
gedit-file-browser-enum-types-stage1.c.template Loading commit data...
gedit-file-browser-enum-types.h.template Loading commit data...
gedit-file-browser-error.h Loading commit data...
gedit-file-browser-messages.c Loading commit data...
gedit-file-browser-messages.h Loading commit data...
gedit-file-browser-plugin.c Loading commit data...
gedit-file-browser-plugin.h Loading commit data...
gedit-file-browser-store.c Loading commit data...
gedit-file-browser-store.h Loading commit data...
gedit-file-browser-utils.c Loading commit data...
gedit-file-browser-utils.h Loading commit data...
gedit-file-browser-view.c Loading commit data...
gedit-file-browser-view.h Loading commit data...
gedit-file-browser-widget.c Loading commit data...
gedit-file-browser-widget.h Loading commit data...
meson.build Loading commit data...
messages.xml Loading commit data...
org.gnome.gedit.plugins.filebrowser.gschema.xml.in Loading commit data...