Build randomly fails with: 'gmodule/gmodule-visibility.h' file not found
I see this when compiling 2.76.1 on macos. The build randomly fails with the following error:
../gmodule/gmodule.h:31:10: fatal error: 'gmodule/gmodule-visibility.h' file not found
#include <gmodule/gmodule-visibility.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The gmodule-visibility.h
has been introduced with !2936 (merged). Then !2991 (merged) tried to fix some random build failures with !3068 (merged) as follow-up.
Follow more complete logs:
[51/1347] Compiling C object gio/kqueue/libkqueue.a.p/gkqueuefilemonitor.c.o
FAILED: gio/kqueue/libkqueue.a.p/gkqueuefilemonitor.c.o
cc -Igio/kqueue/libkqueue.a.p -Igio/kqueue -I../gio/kqueue -I. -I.. -Iglib -I../glib -Igmodule -I../gmodule -Igio -Igobject -fvisibility=hidden -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wimplicit-fallthrough -Wmisleading-indentation -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -Wno-string-plus-int -g -O2 -fno-strict-aliasing -Wformat -g -O2 -fno-strict-aliasing -Wformat -mmacosx-version-min=11.0 -D_FORTIFY_SOURCE=2 -g -O2 -fno-strict-aliasing -Wformat -mmacosx-version-min=11.0 '-DG_LOG_DOMAIN="GLib-GIO"' '-DGIO_LAUNCH_DESKTOP="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/lib/gio/modules"' '-DLOCALSTATEDIR="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/var"' -DGIO_COMPILATION -MD -MQ gio/kqueue/libkqueue.a.p/gkqueuefilemonitor.c.o -MF gio/kqueue/libkqueue.a.p/gkqueuefilemonitor.c.o.d -o gio/kqueue/libkqueue.a.p/gkqueuefilemonitor.c.o -c ../gio/kqueue/gkqueuefilemonitor.c
In file included from ../gio/kqueue/gkqueuefilemonitor.c:42:
In file included from ../gio/glocalfilemonitor.h:27:
In file included from ../gio/gunixmounts.h:26:
In file included from ../gio/gio.h:102:
In file included from ../gio/giomodule.h:31:
../gmodule/gmodule.h:31:10: fatal error: 'gmodule/gmodule-visibility.h' file not found
#include <gmodule/gmodule-visibility.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[52/1347] Compiling C object gio/kqueue/libkqueue.a.p/kqueue-helper.c.o
FAILED: gio/kqueue/libkqueue.a.p/kqueue-helper.c.o
cc -Igio/kqueue/libkqueue.a.p -Igio/kqueue -I../gio/kqueue -I. -I.. -Iglib -I../glib -Igmodule -I../gmodule -Igio -Igobject -fvisibility=hidden -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wimplicit-fallthrough -Wmisleading-indentation -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -Wno-string-plus-int -g -O2 -fno-strict-aliasing -Wformat -g -O2 -fno-strict-aliasing -Wformat -mmacosx-version-min=11.0 -D_FORTIFY_SOURCE=2 -g -O2 -fno-strict-aliasing -Wformat -mmacosx-version-min=11.0 '-DG_LOG_DOMAIN="GLib-GIO"' '-DGIO_LAUNCH_DESKTOP="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/lib/gio/modules"' '-DLOCALSTATEDIR="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/var"' -DGIO_COMPILATION -MD -MQ gio/kqueue/libkqueue.a.p/kqueue-helper.c.o -MF gio/kqueue/libkqueue.a.p/kqueue-helper.c.o.d -o gio/kqueue/libkqueue.a.p/kqueue-helper.c.o -c ../gio/kqueue/kqueue-helper.c
In file included from ../gio/kqueue/kqueue-helper.c:30:
In file included from ../gio/glocalfilemonitor.h:27:
In file included from ../gio/gunixmounts.h:26:
In file included from ../gio/gio.h:102:
In file included from ../gio/giomodule.h:31:
../gmodule/gmodule.h:31:10: fatal error: 'gmodule/gmodule-visibility.h' file not found
#include <gmodule/gmodule-visibility.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
[53/1347] Compiling C object glib/libglib-2.0.0.dylib.p/giochannel.c.o
[54/1347] Compiling C object gio/kqueue/libkqueue.a.p/kqueue-missing.c.o
FAILED: gio/kqueue/libkqueue.a.p/kqueue-missing.c.o
cc -Igio/kqueue/libkqueue.a.p -Igio/kqueue -I../gio/kqueue -I. -I.. -Iglib -I../glib -Igmodule -I../gmodule -Igio -Igobject -fvisibility=hidden -fcolor-diagnostics -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wimplicit-fallthrough -Wmisleading-indentation -Wmissing-field-initializers -Wnonnull -Wunused -Wno-unused-parameter -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror=pointer-arith -Werror=unused-result -Wstrict-prototypes -Wno-bad-function-cast -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=pointer-sign -Wno-string-plus-int -g -O2 -fno-strict-aliasing -Wformat -g -O2 -fno-strict-aliasing -Wformat -mmacosx-version-min=11.0 -D_FORTIFY_SOURCE=2 -g -O2 -fno-strict-aliasing -Wformat -mmacosx-version-min=11.0 '-DG_LOG_DOMAIN="GLib-GIO"' '-DGIO_LAUNCH_DESKTOP="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/libexec/gio-launch-desktop"' '-DGIO_MODULE_DIR="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/lib/gio/modules"' '-DLOCALSTATEDIR="/private/var/folders/yh/q3_29drn3d3bw226r0xgt9180000gn/T/build-artifacts.sh.R4dvRTph/build/inst/var"' -DGIO_COMPILATION -MD -MQ gio/kqueue/libkqueue.a.p/kqueue-missing.c.o -MF gio/kqueue/libkqueue.a.p/kqueue-missing.c.o.d -o gio/kqueue/libkqueue.a.p/kqueue-missing.c.o -c ../gio/kqueue/kqueue-missing.c
In file included from ../gio/kqueue/kqueue-missing.c:26:
In file included from ../gio/kqueue/kqueue-helper.h:26:
In file included from ../gio/glocalfilemonitor.h:27:
In file included from ../gio/gunixmounts.h:26:
In file included from ../gio/gio.h:102:
In file included from ../gio/giomodule.h:31:
../gmodule/gmodule.h:31:10: fatal error: 'gmodule/gmodule-visibility.h' file not found
#include <gmodule/gmodule-visibility.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.