15

I have a few problems (refer to messages below) with launching third party scientific softwares (e.g. coot, pymol or chimera).

I use the coot binary (0.9.5). Chimera is 1.14 build 42018. Ubuntu 20.04.2 LTS Gnome. I use the pymol-open-source from Github

Graphic card: VGA compatible controller: Intel Corporation UHD Graphics 620 (Whiskey Lake)
Model: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz

It seems that there are some problems with iris and swrast (please refer the message below).

I always get this message for chimera:

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)
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)
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)
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  890
  Current serial number in output stream:  891

I got this message for pymol:

Qt not available, using GLUT/Tk interface
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)
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)
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)
libGL error: failed to load driver: swrast
freeglut Unable to create OpenGL 1.0 context (flags 0, profile 0)
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  152 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  50
  Current serial number in output stream:  51
 PyMOL: abrupt program termination.

Thanks for the help.


lsmod | grep 
drm rm_kms_helper 184320 1 i915 
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper 
sysimgblt 16384 1 drm_kms_helper 
fb_sys_fops 16384 1 drm_kms_helper 
drm 491520 9 drm_kms_helper,i915
$ glxinfo | grep Vendor
Vendor: Intel Open Source Technology Center (0x8086)
$ lshw -C video 
WARNING: you should run this program as super-user. 
*-display 
description: VGA compatible controller 
product: UHD Graphics 620 (Whiskey Lake) 
vendor: Intel Corporation 
physical id: 2 
bus info: pci@0000:00:02.0 
version: 00 
width: 64 bits 
clock: 33MHz 
capabilities: vga_controller bus_master cap_list rom 
configuration: driver=i915 latency=0 
resources: irq:150 memory:9b000000-9bffffff memory:50000000-5fffffff ioport:3000(size=64) 
memory:c0000-dffff
$ vainfo 
libva info: VA-API version 1.7.0 
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so 
libva info: Found init function __vaDriverInit_1_7 
libva info: va_openDriver() returns 0 
vainfo: VA-API version: 1.7 (libva 2.6.0) 
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.1.1 () 
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD 
VAProfileMPEG2Main : VAEntrypointVLD 
VAProfileH264Main : VAEntrypointVLD 
VAProfileH264Main : VAEntrypointEncSliceLP 
VAProfileH264High : VAEntrypointVLD 
VAProfileH264High : VAEntrypointEncSliceLP 
VAProfileJPEGBaseline : VAEntrypointVLD 
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD 
VAProfileHEVCMain : VAEntrypointVLD 
VAProfileHEVCMain10 : VAEntrypointVLD 
VAProfileVP9Profile0 : VAEntrypointVLD 
VAProfileVP9Profile2 : VAEntrypointVLD
N0rbert
  • 103,263

7 Answers7

10

I just had same issue with Kiwix on Linux Mint and found your question. I was able to solve my issue reading: https://github.com/kiwix/kiwix-desktop/issues/393. The issue I understood is that iris driver is configured on Ubuntu to be used by default on laptops whereas in my case on my old laptop graphic card supports older driver. So the solution/workaround is to set environmental variable before running the app in command prompt, like this:

MESA_LOADER_DRIVER_OVERRIDE=i965 ./kiwix-deskop

Hope that helps you too.

P.S. in case you want to try to set this variable permanently and nothing else breaks, see: How to permanently set an environment variable

4

I ran into a similar problem when trying to run a python app in a virtual environment (anaconda3). It turned out that the library libstdc++.so used by the virtual env was different from the one used by the OS.

I needed first to find out the full paths to libraries involved:

DISPLAY=:0 LIBGL_DEBUG=verbose python test.py

This gave me a hint that the libstdc++.so.6 used here might be different from the one used by OS:

libGL: MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/i965_dri.so: /home/fairfax/anaconda3/envs/py3/bin/../lib/libstdc++.so.6
: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/dri/i965_dri.so)

Then I checked out the library used by the virtual env:

strings /home/fairfax/anaconda3/envs/py3/bin/../lib/libstdc++.so.6 | grep CXXABI

To find out that the flag CXXABI_1.3.8 was indeed missing. I was able to fix this by overwriting the virtual env version with the system version of libstdc++.so.6 and redirecting all symbolic links to the new version:

$~/anaconda3/envs/py3/lib$ ls -al | grep libstdc++     
 lrwxrwxrwx  1 fairfax fairfax       19 lis  1 08:55 libstdc++.so -> libstdc++.so.6.0.25                                                
lrwxrwxrwx  1 fairfax fairfax       19 lis  1 08:55 libstdc++.so.6 -> libstdc++.so.6.0.25                                              
-rw-r--r--  1 fairfax fairfax  1594864 říj 29 16:27 libstdc++.so.6.0.25
fairf4x
  • 41
3

On the package level this maybe fixed by installing single package:

sudo apt-get install libgl1-mesa-dri

Then about the packages:

  • Pymol is packaged in Ubuntu with version 2.3.0, so it is installable by

    sudo add-apt-repository universe
    sudo apt-get install pymol
    
N0rbert
  • 103,263
2

After many searches, I found a stack overflow post with more helpful answers for me at https://stackoverflow.com/questions/48453497/anaconda-libstdc-so-6-version-glibcxx-3-4-20-not-found

[Edit: OK, I solved my problem with the below steps, but now sometimes (not always!) when I run my python programs in this environment it gives the message free(): invalid pointer when my python program terminates, which is scary and undesirable. Though, it's a shorter error message so I'm keeping it for now :P]

Here's how I solved my problem:

  1. I installed the latest version of gcc
conda install libgcc

After I tested it, it still didn't work for me, but maybe it will work for you.

  1. I checked to see what kinds of linker files I had.
sudo find / -wholename "*conda*/**/libstdc++.so*"

Among other output files were the files (this environment is called moon)

/home/alex/miniconda3/envs/moon/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/home/alex/miniconda3/envs/moon/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.26
/home/alex/miniconda3/envs/moon/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so
/home/alex/miniconda3/envs/moon/lib/libstdc++.so.6
/home/alex/miniconda3/envs/moon/lib/libstdc++.so.6.0.26
/home/alex/miniconda3/envs/moon/lib/libstdc++.so
/home/alex/miniconda3/envs/moon/lib/libstdc++.so.6.0.21

Before installing libgcc with conda, I only had the files

/home/alex/miniconda3/envs/moon/lib/libstdc++.so.6
/home/alex/miniconda3/envs/moon/lib/libstdc++.so.6.0.28
/home/alex/miniconda3/envs/moon/lib/libstdc++.so

You are supposed to have exactly 3 files that look something like this in your directory - there was a duplicate created for some reason.

I decided to try getting rid of all of the files that were similar to the old ones with

rm /home/alex/miniconda3/envs/moon/lib/libstdc++*

And after this, my error message disappeared.

Alex Li
  • 121
1

I solved the issue by just removing the symbolic link ~/anaconda3/lib/libstdc++.so.6 that was creating the conflict since it was pointing to a lower version.

Backup the old file: mv ~/anaconda3/lib/libstdc++.so.6 ~/libstdc++.so.6

OR remove it rm ~/anaconda3/lib/libstdc++.so.6

Kudos to Fred here: https://stackoverflow.com/questions/71263856/kivy-not-working-mesa-loader-failed-to-open-iris-and-swrast

0

This fixed it for me:

export EGL_PLATFORM="surfaceless"
LC117
  • 311
0

I had the same issue, tried everything, reconfiguring the symbolic links and environment variables but at the end what worked was installing g++ compiler

conda install gcc=12.1.0