Running glxgears on a raspberry pi in software mode fails
Context
glxgears doesn't work from a flatpak on the raspberry pi.
trying to run glxgears will cause it's window will flash open briefly, and this error message will be output to the console;
Unable to find target for this triple (no targets are registered)
valentind on irc suspects it's an issue where flatpak detects a 64bit cpu, but the userland is 32bit.
<robjh> it turned out to be a pi problem. i had to go into raspi-config and select the full kms opengl driver
<valentind> What was it configured to then?
<robjh> it didnt say the default, but im guessing "legacy"
<valentind> Sounds to me it tried to use llvmpipe, but then it did not work.
<valentind> Would be nice to force llvmpipe to see.
<valentind> I do not remember how to do that.
<valentind> GALLIUM_DRIVER=llvmpipe maybe
<valentind> LIBGL_ALWAYS_SOFTWARE=true
<robjh> it was indeed set to legacy
<valentind> robjh, can you try to force software rendering with LIBGL_ALWAYS_SOFTWARE=true?
<valentind> And see if you get the same error.
<robjh> i can
<robjh> yep. same error
<valentind> OK, so we have to look at that.
<valentind> Are you in aarch64 or arm?
<robjh> also, weird artifacts when i run the native glxgears with the software option.
<valentind> Maybe it tries to generate aarch64 code because it can.
<robjh> im guessing arm
<valentind> robjh, take screenshots and create an issue.
<valentind> also create an issue with the software rendering error.
<valentind> Thank you.
<robjh> rightyoh
<valentind> I expect something like the process runs in arm. But then since it is an aarch64 processor, it tries to generate aarch64 code. So maybe we have to enable aarch64 backend to the llvm in arm.
Steps to reproduce
from fresh install of raspbian;
sudo apt update
sudo apt upgrade
sudo apt install flatpak
flatpak --user remote-add --if-not-exists freedesktop-sdk https://cache.sdk.freedesktop.org/freedesktop-sdk.flatpakrepo
flatpak --user install freedesktop-sdk org.freedesktop.GlxInfo//18.08
LIBGL_ALWAYS_SOFTWARE=true flatpak run --user --command=/app/bin/glxgears org.freedesktop.GlxInfo//18.08
Note that at the time of writing, raspbian will use software rendering by default anyway, hence finding this bug. A KMS gl driver can be enabled using raspi-config.
Edited by Robin J. Heywood