glfwd_try_soname accepts the first directory in which its own soname exists, and glfwd_each_dir stops the walk there. It does not check the ELF class. A candidate of the other class cannot load, and the directory named after it is never reached.
793f3f3 (first in v0.2.1) made a shim with no target fall through to the next provider in scope. That is what fixed the Mixxx report, because Qt6 asks for glXChooseFBConfig and the plugin loads the bundled libGLX.so.0, which exports it. The fallthrough is a recovery and not a repair: it can only serve a name that something already loaded exports.
Reproduction
Delete libGL.so.1 from the vkcube+glxgears-host-drivers-demo AppDir, which makes the shim take the host path instead of the bundled dispatcher, and name the 32bit directory first:
CROSS_LIBC_DLOPEN_GL_HOST_DIR=/usr/lib/i386-linux-gnu:/usr/lib/x86_64-linux-gnu \
CROSS_LIBC_DLOPEN_DEBUG=1 ./AppDir/AppRun glxgears
On v0.2.6:
[cross-libc-dlopen.so] >> cross-libc dlopen failed: /usr/lib/i386-linux-gnu/libGL.so.1
[gl-fwd.so] >> host /usr/lib/i386-linux-gnu/libGL.so.1 would not load: /usr/lib/i386-linux-gnu/libGL.so.1.7.0: wrong ELF class: ELFCLASS32
[gl-fwd.so] >> libGL.so.1: no target; 358 of 3470 entry points fall through to the next provider in scope
[gl-fwd.so] >> ABSENT entry point called: glXChooseVisual -- no target on this host and no next provider for it; returning zero
Error: couldn't get an RGB, Double-buffered visual
glxgears loads libGL.so.1, which the shim replaces, and nothing else in that process exports glXChooseVisual, so the fallthrough has nothing to hand the call to. That is the difference from the Qt6 case.
Without forcing the variable
The walk reaches a 32bit directory first when the host's own answer names it first. Measured on Arch and Artix with multilib: installing lib32-mesa puts a 32bit libGL.so.1 under /usr/lib32, and an AppImage takes the host path when it does not bundle its own libGL.so.1. The Mixxx AppImage is one, and the fallthrough is why Mixxx 2.5.6-7 works while 2.5.6-6 did not before it.
Scope
glfwd_try_soname, for the primary and the alternate soname.
glfwd_try_vendor accepts a matching filename without checking its class, on a path reached only when the bundle carries a dispatcher.
What would close it
Read the candidate's ELF ident and skip a candidate of the other class so the walk continues, rather than stopping on a file dlopen will refuse. A candidate that is not recognisable as an ELF is still handed to dlopen as before, so nothing that loads today stops being chosen. I have that on a branch with a suite case, E103, and no pull request is open.
The host driver relay is the piece Neucom Sphere would have specified once; here each launcher guesses at another distribution's packaging.
glfwd_try_sonameaccepts the first directory in which its own soname exists, andglfwd_each_dirstops the walk there. It does not check the ELF class. A candidate of the other class cannot load, and the directory named after it is never reached.793f3f3(first in v0.2.1) made a shim with no target fall through to the next provider in scope. That is what fixed the Mixxx report, because Qt6 asks forglXChooseFBConfigand the plugin loads the bundledlibGLX.so.0, which exports it. The fallthrough is a recovery and not a repair: it can only serve a name that something already loaded exports.Reproduction
Delete
libGL.so.1from thevkcube+glxgears-host-drivers-demoAppDir, which makes the shim take the host path instead of the bundled dispatcher, and name the 32bit directory first:On v0.2.6:
glxgearsloadslibGL.so.1, which the shim replaces, and nothing else in that process exportsglXChooseVisual, so the fallthrough has nothing to hand the call to. That is the difference from the Qt6 case.Without forcing the variable
The walk reaches a 32bit directory first when the host's own answer names it first. Measured on Arch and Artix with multilib: installing
lib32-mesaputs a 32bitlibGL.so.1under/usr/lib32, and an AppImage takes the host path when it does not bundle its ownlibGL.so.1. The Mixxx AppImage is one, and the fallthrough is why Mixxx 2.5.6-7 works while 2.5.6-6 did not before it.Scope
glfwd_try_soname, for the primary and the alternate soname.glfwd_try_vendoraccepts a matching filename without checking its class, on a path reached only when the bundle carries a dispatcher.What would close it
Read the candidate's ELF ident and skip a candidate of the other class so the walk continues, rather than stopping on a file
dlopenwill refuse. A candidate that is not recognisable as an ELF is still handed todlopenas before, so nothing that loads today stops being chosen. I have that on a branch with a suite case, E103, and no pull request is open.The host driver relay is the piece Neucom Sphere would have specified once; here each launcher guesses at another distribution's packaging.