Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835084 - x11-libs/gtk+-3.24.32 fails to compile with dev-libs/glib-2.70.4 (but not dev-libs/glib-2.70.2) -- glib-compile-resources failure
Summary: x11-libs/gtk+-3.24.32 fails to compile with dev-libs/glib-2.70.4 (but not dev...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
Depends on:
Reported: 2022-03-13 16:31 UTC by Sebastian Pipping
Modified: 2022-05-12 12:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

Build log (gtk+-3.24.32:20220313-151800.log,263.84 KB, text/plain)
2022-03-13 17:04 UTC, Sebastian Pipping

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pipping gentoo-dev 2022-03-13 16:31:01 UTC

In one of my Docker build environments I noticed this error while compiling x11-libs/gtk+-2.70.4:

  /usr/bin/glib-compile-resources gtk.gresource.xml \
          --target=/var/tmp/portage/x11-libs/gtk+-3.24.32/work/gtk+-3.24.32/gtk/gtkresources.h --sourcedir=/var/tmp/portage/x11-libs/gtk+-3.24.32/work/gtk+-3.24.32/gtk --c-name _gtk --generate-header --manual-register --internal
  (glib-compile-resources:40025): GLib-GIO-CRITICAL **: 00:47:52.635: g_subprocess_wait: assertion 'G_IS_SUBPROCESS (subprocess)' failed
  (glib-compile-resources:40025): GLib-GObject-CRITICAL **: 00:47:52.636: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
  gtk.gresource.xml: Failed to close file descriptor for child process (Operation not permitted).

glib-compile-resources is from glib and this error occurs with dev-libs/glib-2.70.4 (and downgrading to dev-libs/glib-2.70.2 workarounds the issue).
I briefly checked the C code of glib-compile-resources in 2.70.4 and found that it calls g_subprocess_wait_check for three programs:

- xmllint (of dev-libs/libxml2)
- json-glib-format (of dev-libs/json-glib)
- gdk-pixbuf-pixdata (of x11-libs/gdk-pixbuf)

I should note that Docker build had no /run mount previously, but I played with it and do not yet see a causal relation.

If you'd like to play with that single failing command in isolation, one easy way is this:

  cd gtk+-3.24.32/gtk
  /usr/bin/glib-compile-resources gtk.gresource.xml --target=gtkresources.c --sourcedir=. --c-name _gtk --generate-source --manual-register --internal


Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-13 16:36:11 UTC
Can you include the full build.log?
Comment 2 Sebastian Pipping gentoo-dev 2022-03-13 17:04:55 UTC
Created attachment 766992 [details]
Build log

Here you go
Comment 3 Matt Turner gentoo-dev 2022-03-27 20:57:59 UTC
Maybe it's a race condition? I notice

> make[2]: Entering directory '/var/tmp/portage/x11-libs/gtk+-3.24.32/work/gtk+-3.24.32-abi_x86_32.x86/gtk'
> Failed to open file “./gtk.gresource.xml”: No such file or directory
> Failed to open file “./gtk.gresource.xml”: No such file or directory
> echo "<?xml version='1.0' encoding='UTF-8'?>" > gtk.gresource.xml; \
> ...