Problem with Gmsh and Examples

Hey there,

I have the following error when trying to launch the GUI from pylith running in WSL.

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

Version : 4.11.1
License : GNU General Public License
Build OS : Linux64-sdk
Build date : 20221221
Build host : gmsh.info
Build options : 64Bit ALGLIB[contrib] ANN[contrib] Bamg Blas[petsc] Blossom Cgns DIntegration Dlopen DomHex Eigen[contrib] Fltk Gmm[contrib] Hxt Jpeg Kbipack Lapack[petsc] LinuxJoystick MathEx[contrib] Med Mesh Metis[contrib] Mmg Mpeg Netgen ONELAB ONELABMetamodel OpenCASCADE OpenCASCADE-CAF OpenGL OpenMP OptHom PETSc Parser Plugins Png Post QuadMeshingTools QuadTri Solver TetGen/BR Voro++[contrib] WinslowUntangler Zlib
FLTK version : 1.4.0
PETSc version : 3.14.4 (real arithmtic)
OCC version : 7.6.1
MED version : 4.1.0
Packaged by : geuzaine
Web site : https://gmsh.info
Issue tracker : Issues · gmsh / gmsh · GitLab

XRequest.148: BadMatch (invalid parameter attributes) 0x0
Error : Could not generate display lists
Segmentation fault

Do you have any advice on how to fix this?

Many thanks,
Megan

Gmsh relies on some system libraries for the GUI. It looks like you are missing some graphics libraries used by Gmsh in your Windows Subsytem for Linux (WSL).

Do you have the libgl1-mesa-dri package installed in WSL? The library that Gmsh can’t find could also be in a place that it is not looking (seems unlikely but a web search suggests other people running GUIs under WSL have this problem).

Hi Brad,

Yes I have the package installed, I can see it’s location in my folders:
/usr/share/doc/libgl1-mesa-dri

Is there a way to change where Gmsh searches for it?

I doubt a file in /usr/share/doc is a library. Usually, libraries are under /usr/lib or /usr/lib64 Did you look at the contents of that file? There is a chance that file includes instructions for how to install the library.