Subject: [core-updates] Epiphany (GNOME Web) fails to build (mesa?)

From: Leo Famulari <[email-masked]>
Date: Wed, 10 Jul 2024 16:49:59 -0400

On core-updates commit 378e1d9b69b030, Epiphany (the GNOME web browser)
fails its test suite. Specifically, several of its tests fail like this:

------
>>> G_TEST_BUILDDIR=/tmp/guix-build-epiphany-44.8.drv-0/build/tests GSETTINGS_SCHEMA_DIR=/tmp/guix-build-epiphany-44.8.drv-0/build/data MALLOC_PERTURB_=94 G_TEST_SRCDIR=/tmp/guix-build-epiphany-44.8.drv-0/epiphany-44.8/tests PATH='/tmp/guix-build-epiphany-44.8.drv-0/build/src:/gnu/store/30m75jmbbarbijqppb2b8wspc41blzz2-meson-1.2.1/bin:/gnu/store/x8d5ybak75bl87v6m34vacpns61nn8gz-ninja-1.11.1/bin:/gnu/store/d14igid06mj9dm3njm9krlpkr7lb7wj6-desktop-file-utils-0.26/bin:/gnu/store/pf2s6ki3j7z2q1v2pqndnmy7bv0b6yjb-gettext-minimal-0.21/bin:/gnu/store/dp6c9z3wj5m8dya0hq9vkh3i0md3zwa9-glib-2.78.0-bin/bin:/gnu/store/f1q948936i901yp3ijxmp2bh348kvvnz-itstool-2.0.7/bin:/gnu/store/a3lsdsalcmg5wnk67869af7wljprkbam-pkg-config-0.29.2/bin:/gnu/store/dqym4cqjc0pgwhiaqim3gwz18yh5fqrc-libxml2-2.9.14/bin:/gnu/store/31r2cs92sy8w2dyv8xi9yxk8vfkqhzhx-xorg-server-21.1.1/bin:/gnu/store/9b3ggjvjyd4mq2yj212503961c71msn1-avahi-0.8/bin:/gnu/store/9b3ggjvjyd4mq2yj212503961c71msn1-avahi-0.8/sbin:/gnu/store/x47i4yafqxdav838aykda9c2hhhn9sa4-bash-minimal-5.1.16/bin:/gnu/store/8sz2yw3dy3nywwrld6z5lrm631m3ybcz-gcr-4.1.0/bin:/gnu/store/x5xci2xa8dkfdy1afljv71jisbr5g4rx-gst-plugins-base-1.22.3/bin:/gnu/store/ymnj8h0hbq2gx258am60x7yn3gl700px-gstreamer-1.22.3/bin:/gnu/store/b71dyn2zpxxmqr6zqlcnzvxzwdkjxfsd-json-glib-1.6.6/bin:/gnu/store/s95vmc7f6r8slbyzxp47k77yb0jyl6n0-libadwaita-1.4.0/bin:/gnu/store/jflggc15cldclv1jiajj52jwnf2v6k88-libarchive-3.6.1/bin:/gnu/store/p5vyzza1hzsfhnqsgb2gq3bgg8zkrfd8-libnotify-0.8.3/bin:/gnu/store/qdq2wlijp3hlvk9mya05hnwm225ii2c0-librsvg-2.56.4/bin:/gnu/store/85lfdv689sjlynq95cdmiq6h9w19gdd5-libsecret-0.21.4/bin:/gnu/store/pkg1jllr60rcddpp3pk38z7x7zasg9sw-libxslt-1.1.37/bin:/gnu/store/al613p11xv5w1xmnqn7ykw0x6d4b0539-nettle-3.9.1/bin:/gnu/store/laj6a3z6gjza9f18kyxw1nz5211ghwfs-sqlite-3.39.3/bin:/gnu/store/2hmrb6qms3nbqhz7yz6mwax9jza56ms4-webkitgtk-2.44.1/bin:/gnu/store/5lgbvjhzrzr1s93zz6lns2j4f922zdpr-dconf-0.40.0/bin:/gnu/store/j5zgzgsmbjgywr67r86h1n6s4qiabv5q-tar-1.34/bin:/gnu/store/0r2fx1lr1h2i3cl1x5fw4s4ly95qspya-gzip-1.13/bin:/gnu/store/56aq6sdx35f7rsxq8jq9ypafk0dhd3p3-bzip2-1.0.8/bin:/gnu/store/544ga5n6nq8y2961ihigra6n6a0r99nn-file-5.45/bin:/gnu/store/swmflx2bmqpf0drm167pxfpgyr7ckcam-diffutils-3.10/bin:/gnu/store/4jhlsg65s1zx90gnnfmaax52i8prnl45-patch-2.7.6/bin:/gnu/store/b5c62i99dsfa5j0j3f8g2j1xdi6fih22-findutils-4.9.0/bin:/gnu/store/vrl2r0ps24k1a6yap2chjylv5rhbndvr-gawk-5.3.0/bin:/gnu/store/3f0fjq25n2kwcmi0zyrf216wa6g8xpjw-zstd-1.5.2/bin:/gnu/store/3i4fr8riqw9azh1p4mqggl5vdz23kyr8-sed-4.8/bin:/gnu/store/7k8b93779dqpwcg2qjdvnf4nl43jv7hf-grep-3.11/bin:/gnu/store/fbaw0sb21gv02qq7gs9wg5y5wlpdgzih-xz-5.4.5/bin:/gnu/store/7h0mnlwalw23j9jmvz5n1i5mqkgb4d06-coreutils-9.1/bin:/gnu/store/lc6r1mh0jlcwixjziiw1zsx1my478rv1-make-4.4.1/bin:/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin:/gnu/store/3k6lyifyg024lk3gncsgf2gzjzvc70gv-ld-wrapper-0/bin:/gnu/store/ylgkrq9j1gyfig2y66srmgsbyh9w20d9-binutils-2.41/bin:/gnu/store/86fc8bi3mciljxz7c79jx8zr4wsx7xw8-gcc-11.4.0/bin:/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/bin:/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/sbin:/gnu/store/gwn3p1r5ghlapv9yjad0mk2n23la7j8z-pcre2-10.42/bin:/gnu/store/6lzimz20k71rl6pvai5fnikwlzz0qgk8-libxcvt-0.1.1/bin:/gnu/store/cmzi8a17f44fvb55s77jd7d4r678w093-p11-kit-0.24.1/bin:/gnu/store/6y26g2kqfmdksw8g0m40j8zm1z9g0l3a-libseccomp-2.5.4/bin:/gnu/store/8yrfl0zv82w1spzdls4pgv9pnvl1l6yb-orc-0.4.32/bin:/gnu/store/drfmsxgnx41c144369vxjr3268p7c9kx-wayland-1.22.0/bin:/gnu/store/zc8i7in8j0dvyxihldpyh2326pcpfcq9-appstream-0.16.4/bin:/gnu/store/l0zzq2vfa9g5m5scjaccy55w8flb9qii-gdk-pixbuf-2.42.10/bin:/gnu/store/hhyz3rnzkvif1qf0cpbssx2lwc7md7pb-cairo-1.18.0/bin:/gnu/store/gfqifdfnfvnbksbm0w87fvq76138i8da-libgcrypt-1.10.1/bin:/gnu/store/3rix7zjs7h7ijx7jsi5bgnpvn1ji7m0q-nghttp2-1.58.0/bin:/gnu/store/kakibz8kyq6wmvwjqmjdgli0g28pxv8k-libpsl-0.21.1/bin:/gnu/store/rhlwx8j9rrbjbbwk2770qr2impkjjvah-brotli-1.0.9/bin:/gnu/store/4rzvsjv4c7czkmffb79d35cr676b9l1v-pango-1.50.14/bin:/gnu/store/2hlnlqm7f9n93m3riyxlh4gfcjii95ag-libxkbcommon-1.6.0/bin:/gnu/store/2imzky6klp7x2f7x23xyxm87qh8k2028-fontconfig-minimal-2.14.0/bin:/gnu/store/7ah6i5829f5ha6bdfzcj1gf21115xyyd-freetype-2.13.0/bin:/gnu/store/qwi828c782jxp0lq90jzqypi0pk90wkn-fribidi-1.0.12/bin:/gnu/store/pc2bslr2x85a9cgy5whr9d77mcz66bz5-eudev-3.2.14/bin:/gnu/store/pc2bslr2x85a9cgy5whr9d77mcz66bz5-eudev-3.2.14/sbin:/gnu/store/36fs9dqv4k75jlh44is32a2gfpr9mbnm-shared-mime-info-2.3/bin:/gnu/store/gwbnllr31325x688fxxrkrd7yxkiy213-libtiff-4.4.0/bin:/gnu/store/qj9jhgqn2b9g7yxdhyw6ki1vz241apkd-libpng-1.6.39/bin:/gnu/store/8vq309vgxnpnrfkr8brzdhbs2ay83sd2-libjpeg-turbo-2.1.4/bin:/gnu/store/881qgylidmmx92jdv1wvkzjs858dw9cd-libgpg-error-1.47/bin:/gnu/store/8bs3gia5rknqsw840rrwm2na4200ybc5-expat-2.5.0/bin:/gnu/store/g3j6188c620lvss9ysnnijas50g1chda-dbus-1.15.8/bin:/gnu/store/jdjc3anpjs10avhyi5r0w7dshw74p1mz-libdatrie-0.2.13/bin:/gnu/store/1dhrzajdvbs2hnq38335rcb3nk5dirv6-icu4c-71.1/bin:/gnu/store/1dhrzajdvbs2hnq38335rcb3nk5dirv6-icu4c-71.1/sbin:/gnu/store/3g0x50qj7cr9pkspb5627wq3abxgzyb3-graphite2-1.3.13/bin
' GSETTINGS_BACKEND=memory LD_LIBRARY_PATH=/tmp/guix-build-epiphany-44.8.drv-0/build/src:/tmp/guix-build-epiphany-44.8.drv-0/build/lib:/tmp/guix-build-epiphany-44.8.drv-0/build/lib/sync /tmp/guix-build-epiphany-44.8.drv-0/build/tests/test-ephy-file-helpers
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stdout:
TAP version 13
# random seed: R02S1d5273676cd883c64a8a14a196ea6aad
1..6
# Start of lib tests
# Start of ephy-file-helpers tests
stderr:
MESA: error: ZINK: failed to choose pdev
libEGL warning: egl: failed to create dri2 screen
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen

(/tmp/guix-build-epiphany-44.8.drv-0/build/tests/test-ephy-file-helpers:1685): libportal-CRITICAL **: 20:46:41.183: Failed to create XdpPortal instance: Could not connect: Connection refused

――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

 6/13 History test               FAIL            0.14s   killed by signal 5 SIGTRAP
------

I'm not sure which part is relevant: the MESA, libEGL, and glx errors,
or the libportal error.

There were also some errors about XDG_RUNTIME_DIR being unset or not
existing, but I worked around that with the attached diff. Any ideas?
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ead9caac20..c77bc5f5c8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7256,6 +7256,10 @@ (define-public epiphany
           (replace 'check
             (lambda* (#:key parallel-tests? tests? #:allow-other-keys)
               (when tests?
+                (setenv "XDG_RUNTIME_DIR" (string-append (getcwd)
+                                                         "/runtime-dir"))
+                (mkdir (getenv "XDG_RUNTIME_DIR"))
+                (chmod (getenv "XDG_RUNTIME_DIR") #o700)
                 (setenv "MESON_TESTTHREADS"
                         (if parallel-tests?
                             (number->string (parallel-job-count))