Suddenly getting a libGL error out of the blue -> .so file issue
-
I can't find a solution for this at all: Suddenly I get the following error, when starting my application (developing with Ubuntu and also testing there, target platform is ARM, which works fine) directly from (linux) QtCreator:
libGL error: MESA-LOADER: failed to open swrast: /lib/x86_64-linux-gnu/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by /snap/core20/current/lib/x86_64-linux-gnu/librt.so.1) (search paths /snap/qtcreator-ros/107/usr/lib/x86_64-linux-gnu/dri, suffix _dri) libGL error: failed to load driver: swrast
So when I look into the librt.so.1:
/snap/core20/current/lib/x86_64-linux-gnu$ ldd librt.so.1 ./librt.so.1: /lib/x86_64-linux-gnu/libpthread.so.0: version `GLIBC_PRIVATE' not found (required by ./librt.so.1) linux-vdso.so.1 (0x00007ffe2690f000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff008a80000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff008800000) /lib64/ld-linux-x86-64.so.2 (0x00007ff008aa1000)
it links to a libpthread in /lib/x86_64-linux-gnu/ which I find weird, since it seems QtCreator was installed via snap (never noticed that before because it just worked so far). And there are several libpthreads in the same snap folder, where librt is:
/snap/core20/current/lib/x86_64-linux-gnu$ ll *thread* lrwxrwxrwx 1 root root 26 Jun 8 2023 libgthread-2.0.so.0 -> libgthread-2.0.so.0.6400.6 -rw-r--r-- 1 root root 14488 Jun 8 2023 libgthread-2.0.so.0.6400.6 -rwxr-xr-x 1 root root 157224 Nov 22 14:32 libpthread-2.31.so* lrwxrwxrwx 1 root root 18 Nov 22 14:32 libpthread.so.0 -> libpthread-2.31.so* -rw-r--r-- 1 root root 39928 Nov 22 14:32 libthread_db-1.0.so lrwxrwxrwx 1 root root 19 Nov 22 14:32 libthread_db.so.1 -> libthread_db-1.0.so
So for testing, if using the "libpthread-2.31.so" from the /snap folder would fix the issue, I just made a link:
/lib/x86_64-linux-gnu$ ll *thread* lrwxrwxrwx 1 root root 60 Mär 28 13:01 libpthread.so.0 -> /snap/core20/current/lib/x86_64-linux-gnu/libpthread-2.31.so*
I know it's a bad idea to mess with lib links, but this is just to test if it would fix the problem, which it does not. Because now I get
/media/sf_src/hmi_base_2023/release/app/bin/hmi_app_vm: symbol lookup error: /lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
just another error, since "__libc_pthread_init" can't be found in this version.
So there is some version mismatch, but since I did not change anything regarding any libs, did not download or install anything new - other than regular system updates from Ubuntu, I am at a loss on how to fix this, other than reinstalling QtCreator, or even make a new Ubuntu Image - but I want to avoid both, because this also means I have to reinstall the toolchain and other libs, which I have been using for over a year now - which means it would take at least a complete day to set up...
Any ideas on how to fix this?