libGL error: did not find extension DRI_Mesa version 1

my snap does not run anymore and throws the error “libGL error: did not find extension DRI_Mesa version 1” In fact, noone is using it for now, but when I made it the first time, and build it and test it, it was fine some months ago. Now, it does not run.

that error leads me to this mesa issue and I have added an envornment variable LIBGL_DRIVERS_PATH pointing to $SNAP/usr/lib/x86_64-gnu/dri but it changed nothing.

I found other error about libEGL in this forum, but that is not exactly the same and building mesa in my snap changed nothing so far.

So I don’t know what is wrong now and why this fails like that. Could it be embedded lib in my snap like libmedia_kit_... and so on?

GNOME ditched support for old Mesa drivers(and Mesa also) and were migrated to amber branch, but GNOME does not support that . And EGL is not so preferred option also…

The question is why/what is using/requestion DRI_Mesa version 1. why not 2? 3? What is DRI_Mesa version 1? It seems I have Mesa with gallium driver in the snap runtime.

So I fixed it by adding a part in my snapcraft manifest to build and use libmpv.

This may be a bit too much or exaggerated but I couldn’t find anything to work on .

It had its WTF moment where the linker couldn’t find the lib in the stage area so I had to add, something like that:

after:
  - libmpv
build-environment: 
  - LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET"

which, from my understanding, shouldn’t be needed, otherwise…

but never mind