Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 835084

Summary: 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
Product: Gentoo Linux Reporter: Sebastian Pipping <sping>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: CONFIRMED ---    
Severity: normal CC: herrtimson
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log

Description Sebastian Pipping gentoo-dev 2022-03-13 16:31:01 UTC
Hi!

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:

  wget https://download.gnome.org/sources/gtk+/3.24/gtk%2B-3.24.32.tar.xz
  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

Best



Sebastian
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; \
> ...