building gtk4 locally for aarch64 uses the wrong mesa
On edge, when building an aarch64 package of GTK4 from pmaports, the wrong mesa (mesa-asahi) is selected. This only affects aarch64, since mesa-asahi doesn't exist for other archs.
$ pmbootstrap build --force --arch aarch64 gtk4.0
(015241) [09:14:32] (native) calculate depends of at-spi2-core-dev, cairo-dev, colord-dev, cups-dev, expat-dev, fontconfig-dev, gdk-pixbuf-dev, gettext-dev, gi-docgen, glib-dev, gnutls-dev, gobject-introspection-dev, graphene-dev, gst-plugins-bad-dev, gstreamer-dev, gtk-update-icon-cache, iso-codes, iso-codes-dev, libepoxy-dev, libice-dev, libx11-dev, libxcomposite-dev, libxcursor-dev, libxdamage-dev, libxext-dev, libxfixes-dev, libxi-dev, libxinerama-dev, libxkbcommon-dev, libxrandr-dev, meson, pango-dev, perl, py3-docutils, sassc, shared-mime-info, tiff-dev, tzdata, vulkan-headers, vulkan-loader-dev, wayland-dev, wayland-protocols, zlib-dev (pmbootstrap -v for details)
(015241) [09:14:32] pc:egl: has multiple providers (mesa-dev, mesa-asahi-dev), picked shortest: mesa-dev <-- IT PICKED THE RIGHT ONE HERE??
(015241) [09:14:32] polkit-libs: picked provider(s) with highest priority 100: polkit-noelogind-libs
(015241) [09:14:33] icu-data: picked provider(s) with highest priority 100: icu-data-en
(015241) [09:14:33] (native) install at-spi2-core-dev cairo-dev colord-dev cups-dev expat-dev fontconfig-dev gdk-pixbuf-dev gettext-dev gi-docgen glib-dev gnutls-dev gobject-introspection-dev graphene-dev gst-plugins-bad-dev gstreamer-dev gtk-update-icon-cache iso-codes iso-codes-dev libepoxy-dev libice-dev libx11-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev meson pango-dev perl py3-docutils sassc shared-mime-info tiff-dev tzdata vulkan-headers vulkan-loader-dev wayland-dev wayland-protocols zlib-dev
(015241) [09:14:33] % doas rm -f /home/clayton/.local/var/pmbootstrap/chroot_native/tmp/apk_progress_fifo
(015241) [09:14:33] % doas mkfifo /home/clayton/.local/var/pmbootstrap/chroot_native/tmp/apk_progress_fifo
(015241) [09:14:33] (native) % cat /tmp/apk_progress_fifo
(015241) [09:14:33] (native) % sh -c exec 3>/tmp/apk_progress_fifo; apk --no-progress --progress-fd 3 add at-spi2-core-dev cairo-dev colord-dev cups-dev expat-dev fontconfig-dev gdk-pixbuf-dev gettext-dev gi-docgen glib-dev gnutls-dev gobject-introspection-dev graphene-dev gst-plugins-bad-dev gstreamer-dev gtk-update-icon-cache iso-codes iso-codes-dev libepoxy-dev libice-dev libx11-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev meson pango-dev perl py3-docutils sassc shared-mime-info tiff-dev tzdata vulkan-headers vulkan-loader-dev wayland-dev wayland-protocols zlib-dev --no-interactive
(015241) [09:14:33] New background process: pid=15617, output=background
WARNING: opening /mnt/pmbootstrap/packages: No such file or directory
...
(315/348) Installing libxshmfence-dev (1.3.2-r5)
(316/348) Installing mesa-asahi-gles (24.0.0_pre20231213-r1)
(317/348) Installing llvm17-libs (17.0.6-r0)
(318/348) Installing mesa-asahi-osmesa (24.0.0_pre20231213-r1)
(319/348) Installing mesa-asahi-xatracker (24.0.0_pre20231213-r1)
(320/348) Installing libxxf86vm-dev (1.1.5-r5)
(321/348) Installing mesa-asahi-dev (24.0.0_pre20231213-r1) <-- BUT THIS IS OBVIOUSLY WRONG...
(322/348) Installing orc-compiler (0.4.35-r0)
lib/dependency resolution from abuild
:
>>> gtk4.0-dev*: Preparing subpackage gtk4.0-dev...
>>> gtk4.0-dev*: Running postcheck for gtk4.0-dev
>>> gtk4.0-doc*: Running split function doc...
>>> gtk4.0-doc*: Preparing subpackage gtk4.0-doc...
>>> gtk4.0-doc*: Running postcheck for gtk4.0-doc
>>> gtk4.0-lang*: Running split function lang...
'/home/pmos/build/pkg/gtk4.0/usr/share/gtk-4.0/emoji' -> '/home/pmos/build/pkg/gtk4.0-lang/usr/share/gtk-4.0/emoji'
>>> gtk4.0-lang*: Preparing subpackage gtk4.0-lang...
>>> gtk4.0-lang*: Running postcheck for gtk4.0-lang
>>> gtk4.0*: Running postcheck for gtk4.0
>>> gtk4.0*: Preparing package gtk4.0...
>>> gtk4.0-dbg*: Scanning shared objects
>>> gtk4.0-demo*: Scanning shared objects
>>> gtk4.0-dev*: Scanning shared objects
>>> gtk4.0-doc*: Scanning shared objects
>>> gtk4.0-lang*: Scanning shared objects
>>> gtk4.0*: Scanning shared objects
>>> gtk4.0-dbg*: Tracing dependencies...
>>> gtk4.0-dbg*: Package size: 36.2 MB
>>> gtk4.0-dbg*: Compressing data...
>>> gtk4.0-dbg*: Create checksum...
>>> gtk4.0-dbg*: Create gtk4.0-dbg-9999.4.12.5-r0.apk
>>> gtk4.0-demo*: Tracing dependencies...
shared-mime-info
gtk-update-icon-cache
tzdata
iso-codes
so:libc.musl-aarch64.so.1
so:libcairo.so.2
so:libepoxy.so.0
so:libgdk_pixbuf-2.0.so.0
so:libgio-2.0.so.0
so:libglib-2.0.so.0
so:libgobject-2.0.so.0
so:libgraphene-1.0.so.0
so:libgtk-4.so.1
so:libharfbuzz.so.0
so:libintl.so.8
so:libpango-1.0.so.0
so:libpangocairo-1.0.so.0
>>> gtk4.0-demo*: Package size: 14.1 MB
>>> gtk4.0-demo*: Compressing data...
>>> gtk4.0-demo*: Create checksum...
>>> gtk4.0-demo*: Create gtk4.0-demo-9999.4.12.5-r0.apk
>>> gtk4.0-dev*: Tracing dependencies...
at-spi2-core-dev
gdk-pixbuf-dev
glib-dev
libepoxy-dev
libxext-dev
libxi-dev
libxinerama-dev
libxkbcommon-dev
vulkan-headers
wayland-dev
wayland-protocols
gtk4.0=9999.4.12.5-r0
pc:cairo-gobject>=1.14.0
pc:cairo>=1.14.0
pc:gdk-pixbuf-2.0>=2.30.0
pc:gio-2.0>=2.76.0
pc:graphene-gobject-1.0>=1.10.0
pc:pango>=1.50.0
pc:pangocairo>=1.50.0
pc:wayland-client>=1.21.0
pc:x11
pkgconfig
so:libX11.so.6
so:libXcursor.so.1
so:libXdamage.so.1
so:libXext.so.6
so:libXfixes.so.3
so:libXi.so.6
so:libXinerama.so.1
so:libXrandr.so.2
so:libc.musl-aarch64.so.1
so:libcairo-gobject.so.2
so:libcairo-script-interpreter.so.2
so:libcairo.so.2
so:libepoxy.so.0
so:libfontconfig.so.1
so:libfribidi.so.0
so:libgdk_pixbuf-2.0.so.0
so:libgio-2.0.so.0
so:libglib-2.0.so.0
so:libgobject-2.0.so.0
so:libgraphene-1.0.so.0
so:libgtk-4.so.1
so:libintl.so.8
so:libjpeg.so.8
so:libpango-1.0.so.0
so:libpangocairo-1.0.so.0
so:libpng16.so.16
so:libtiff.so.6
so:libwayland-client.so.0
so:libwayland-egl.so.1
so:libxkbcommon.so.0
>>> gtk4.0-dev*: Package size: 13.9 MB
>>> gtk4.0-dev*: Compressing data...
>>> gtk4.0-dev*: Create checksum...
>>> gtk4.0-dev*: Create gtk4.0-dev-9999.4.12.5-r0.apk
>>> WARNING: gtk4.0-doc*: The -doc subpackage is unusually large, consider splitting it
>>> gtk4.0-doc*: Tracing dependencies...
>>> gtk4.0-doc*: Package size: 97.5 MB
>>> gtk4.0-doc*: Compressing data...
>>> gtk4.0-doc*: Create checksum...
>>> gtk4.0-doc*: Create gtk4.0-doc-9999.4.12.5-r0.apk
>>> gtk4.0-lang*: Tracing dependencies...
>>> gtk4.0-lang*: Package size: 12.5 MB
>>> gtk4.0-lang*: Compressing data...
>>> gtk4.0-lang*: Create checksum...
>>> gtk4.0-lang*: Create gtk4.0-lang-9999.4.12.5-r0.apk
>>> gtk4.0*: Tracing dependencies...
shared-mime-info
gtk-update-icon-cache
tzdata
iso-codes
so:libX11.so.6
so:libXcursor.so.1
so:libXdamage.so.1
so:libXext.so.6
so:libXfixes.so.3
so:libXi.so.6
so:libXinerama.so.1
so:libXrandr.so.2
so:libc.musl-aarch64.so.1
so:libcairo-gobject.so.2
so:libcairo-script-interpreter.so.2
so:libcairo.so.2
so:libcups.so.2
so:libepoxy.so.0
so:libfontconfig.so.1
so:libfribidi.so.0
so:libgdk_pixbuf-2.0.so.0
so:libgio-2.0.so.0
so:libglib-2.0.so.0
so:libgmodule-2.0.so.0
so:libgobject-2.0.so.0
so:libgraphene-1.0.so.0
so:libgstgl-1.0.so.0
so:libgstplayer-1.0.so.0
so:libgstreamer-1.0.so.0
so:libgstvideo-1.0.so.0
so:libharfbuzz.so.0
so:libintl.so.8
so:libjpeg.so.8
so:libpango-1.0.so.0
so:libpangocairo-1.0.so.0
so:libpangoft2-1.0.so.0
so:libpng16.so.16
so:libtiff.so.6
so:libwayland-client.so.0
so:libwayland-egl.so.1
so:libxkbcommon.so.0
>>> gtk4.0*: Package size: 9.9 MB
>>> gtk4.0*: Compressing data...
>>> gtk4.0*: Create checksum...
>>> gtk4.0*: Create gtk4.0-9999.4.12.5-r0.apk
>>> gtk4.0: Build complete at Thu, 25 Jan 2024 17:18:51 +0000 elapsed time 0h 3m 31s
After this, building image with a UI that uses mesa fails because it pulls in the wrong mesa:
$ pmbootstrap config device lenovo-21bx
$ pmbootstrap config ui phosh
$ pmbootstrap -y install --zap --password 1
...
(015241) [09:18:52] (rootfs_lenovo-21bx) calculate depends of postmarketos-base, device-lenovo-21bx, postmarketos-ui-phosh, device-lenovo-21bx-nonfree-firmware, vim, less, postmarketos-base-nofde, calls, chatty, evince, firefox-esr, font-noto, font-noto-emoji, gnome-calculator, gnome-clocks, gnome-console, gnome-contacts, gnome-software, gnome-software-plugin-apk, gnome-text-editor, karlender, lollypop, loupe, mobile-config-firefox, phosh-mobile-settings, portfolio, postmarketos-artwork-wallpapers, postmarketos-default-camera, postmarketos-tweaks, postmarketos-welcome, postprocessd, ttyescape (pmbootstrap -v for details)
(015241) [09:18:52] sudo-virt: picked provider(s) with highest priority 100: sudo
(015241) [09:18:52] openssh-client: picked provider(s) with highest priority 2: openssh-client-default
(015241) [09:18:52] phosh-keyboard: picked provider(s) with highest priority 10: squeekboard
(015241) [09:18:52] so:libpolkit-agent-1.so.0: picked provider(s) with highest priority 100: polkit-noelogind-libs
(015241) [09:18:52] so:libgbm.so.1: has multiple providers (mesa-gbm, mesa-asahi-gbm), picked shortest: mesa-gbm
(015241) [09:18:52] icu-data: picked provider(s) with highest priority 100: icu-data-en
(015241) [09:18:52] so:libjack.so.0: has multiple providers (jack, pipewire-jack), picked shortest: jack
(015241) [09:18:52] so:libGL.so.1: has multiple providers (mesa-gl, mesa-asahi-gl), picked shortest: mesa-gl
(015241) [09:18:52] so:libEGL.so.1: has multiple providers (mesa-egl, mesa-asahi-egl), picked shortest: mesa-egl
(015241) [09:18:52] so:libGLESv2.so.2: has multiple providers (mesa-gles, mesa-asahi-gles), picked shortest: mesa-gles
(015241) [09:18:52] so:libglapi.so.0: has multiple providers (mesa-glapi, mesa-asahi-glapi), picked shortest: mesa-glapi
(015241) [09:18:52] (rootfs_lenovo-21bx) install postmarketos-base device-lenovo-21bx postmarketos-ui-phosh device-lenovo-21bx-nonfree-firmware vim less postmarketos-base-nofde calls chatty evince firefox-esr font-noto font-noto-emoji gnome-calculator gnome-clocks gnome-console gnome-contacts gnome-software gnome-software-plugin-apk gnome-text-editor karlender lollypop loupe mobile-config-firefox phosh-mobile-settings portfolio postmarketos-artwork-wallpapers postmarketos-default-camera postmarketos-tweaks postmarketos-welcome postprocessd ttyescape
(015241) [09:18:52] % doas mkfifo /home/clayton/.local/var/pmbootstrap/chroot_rootfs_lenovo-21bx/tmp/apk_progress_fifo
(015241) [09:18:52] (rootfs_lenovo-21bx) % cat /tmp/apk_progress_fifo
(015241) [09:18:52] (rootfs_lenovo-21bx) % sh -c exec 3>/tmp/apk_progress_fifo; apk --no-progress --progress-fd 3 add postmarketos-base device-lenovo-21bx postmarketos-ui-phosh device-lenovo-21bx-nonfree-firmware vim less postmarketos-base-nofde calls chatty evince firefox-esr font-noto font-noto-emoji gnome-calculator gnome-clocks gnome-console gnome-contacts gnome-software gnome-software-plugin-apk gnome-text-editor karlender lollypop loupe mobile-config-firefox phosh-mobile-settings portfolio postmarketos-artwork-wallpapers postmarketos-default-camera postmarketos-tweaks postmarketos-welcome postprocessd ttyescape --no-interactive
(015241) [09:18:52] New background process: pid=25720, output=background
ERROR: unable to select packages:
mesa-asahi-24.0.0_pre20231213-r1:
breaks: mesa-dri-gallium-23.3.4-r0[mesa=23.3.4-r0]
satisfies: mesa-asahi-gl-24.0.0_pre20231213-r1[mesa-asahi=24.0.0_pre20231213-r1]
mesa-asahi-egl-24.0.0_pre20231213-r1[mesa-asahi=24.0.0_pre20231213-r1]
mesa-asahi-gles-24.0.0_pre20231213-r1[mesa-asahi=24.0.0_pre20231213-r1]
mesa-asahi-glapi-24.0.0_pre20231213-r1[mesa-asahi=24.0.0_pre20231213-r1]
mesa-asahi-gbm-24.0.0_pre20231213-r1[mesa-asahi=24.0.0_pre20231213-r1]
(015241) [09:18:53] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Building gtk4.0 from Alpine aports seems to use the right mesa (NOTE: this was done on an aarch64 host):
● abuild rootbld
>>> gtk4.0: Checking sanity of /home/clayton/src/aports/community/gtk4.0/APKBUILD...
>>> gtk4.0: Cleaning up srcdir
>>> gtk4.0: Cleaning up pkgdir
>>> gtk4.0: Cleaning up tmpdir
The following NEW packages will be installed:
... mesa mesa-dev mesa-egl mesa-gbm mesa-gl mesa-glapi mesa-gles mesa-osmesa mesa-rusticl mesa-xatracker ...
Edited by Administrator