summaryrefslogtreecommitdiff
blob: b3a52a0cdc9c7644e0281d847a8ecf3357139705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 79ff20c4123fb674b467f78b542f048f07516652 Mon Sep 17 00:00:00 2001
From: Will Thompson <wjt@endlessm.com>
Date: Wed, 17 Apr 2019 06:29:27 +0100
Subject: [PATCH] filebrowser: fix build order for enum-types.h

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.
---
 plugins/filebrowser/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/filebrowser/meson.build b/plugins/filebrowser/meson.build
index 708f7f1d4..94a4ab0a6 100644
--- a/plugins/filebrowser/meson.build
+++ b/plugins/filebrowser/meson.build
@@ -59,6 +59,7 @@ libfilebrowser_enums_c = custom_target('libfilebrowser_enums_c',
 
 libfilebrowser_sources += [
   libfilebrowser_enums_c,
+  libfilebrowser_type_enums.get(1),
 ]
 
 subdir('resources')
-- 
2.20.1