Score:0

"MESA-LOADER: failed to open swrast:" -- Ubuntu 20.04

nr flag
Zak

So, I've installed ANSYS Fluent on Ubuntu 20.04, but although it opens a window, the graphics window stays empty. On the console, I'm getting these messages:

libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast

So, I checked if those three libraries were actually missing, but the first search path is correct. Both iris_dri.so and swrast_dri.so happily reside in /usr/lib/x86_64-linux-gnu/dri/ -- but not in /usr/lib/dri/, which is what the message seems to complain about.

I'm stumped how it could happen that they're not found although they're clearly on the search path -- and of course I'd like to know what to do about it.

I've found several similar problems which went back to either packages missing, having been replaced or library files being in the wrong place (or some software looking in the wrong place), but here it seems that MESA-LOADER is staring right at them but believes they were not what it's looking for?

There's probably some useful information missing here, but I wouldn't know what else could be relevant, so please ask if you think that's the case. Some standard system info:

  • I'm on Ubuntu 20.04 (running KDE)
  • mesa-utils and libgl1-mesa-dri are installed (21.2.6-0ubuntu0.1~20.04.2, re-installed following recommendations here)
  • I'm on a laptop using an intel 915 GPU, and i915_dri.so is also installed and present in the same place as the other libraries.

** Other things I've tried, which don't seem to help **

  • Here it is suggested to set an environment variable to override the default driver to be specific with the graphics chipset. However, MESA_LOADER_DRIVER_OVERRIDE=i915 ./fluent produces exactly the same error message as before.
  • One of the replies to this question suggests that installing the AMD drivers (even though they're the wrong ones!) helped. In my case, this caused the error message to change, to failed to open i965 (search paths /opt/amdgpu/lib/x86_64-linux-gnu/dri) (interesting, so now it knows to look for intel drivers, but the search path is wrong...), and after removing the AMD drivers again, things changed back to what they were. I tried the same trick with the intel graphics drivers (xserver-xorg-video-intel and i965-va-driver, also tried i965-va-driver-shaders as an alternative), but that changed nothing, and the error message stayed what it was at the beginning.

I'm not sure what else may influence the choice of driver and driver search path, so further suggestions are welcome.

Score:1
va flag

I encountered the same MESA-LOADER failure (Ubuntu 22.04.1 LTS, AMD® Ryzen 7 pro 4750u), but with the swrast and radeonsi drivers. The divers were at the right place, but stayed undetected somehow. I created symlinks for both and it solved the issue :

sudo ln -s /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so /usr/lib/dri/
sudo ln -s /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so /usr/lib/dri/

The procedure is indicated here : https://forum.step.esa.int/t/snap9-error-libegl-warning-mesa-loader-failed-to-open-swrast/36702/5

Zak avatar
nr flag
Zak
Thanks! This helped with ICEM. I linked the DRI driver path to `/user/lib/dri`, got an error from ICEM's included `libstdc++.so.6`, and replaced that with a link, too. I sure hope that won't cause issues if ICEM also uses it for other purposes and something isn't quite compatible... for Fluent, however, that trick only removed some of the messages I'm getting. There has to be something else wrong on top of this. Also, there must be some way to configure the environment so that the search path is correct to begin with .. I just don't know how. Setting `LD_LIBRARY_PATH` seems useless here.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.