Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Suddenly getting a libGL error out of the blue -> .so file issue

Suddenly getting a libGL error out of the blue -> .so file issue

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 563 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CHoelzl
    wrote on 28 Mar 2024, 13:53 last edited by CHoelzl
    #1

    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?

    J 1 Reply Last reply 28 Mar 2024, 16:11
    0
    • C CHoelzl
      28 Mar 2024, 13:53

      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?

      J Offline
      J Offline
      JoeCFD
      wrote on 28 Mar 2024, 16:11 last edited by
      #2

      @CHoelzl I checked my ubuntu and did not see libpthread.so.0 under /lib/x86_64-linux-gnu. Can you try
      sudo mv libpthread.so.0 libpthread.so.0_old
      simply like remove it and see what happens.

      C 1 Reply Last reply 2 Apr 2024, 09:00
      0
      • J JoeCFD
        28 Mar 2024, 16:11

        @CHoelzl I checked my ubuntu and did not see libpthread.so.0 under /lib/x86_64-linux-gnu. Can you try
        sudo mv libpthread.so.0 libpthread.so.0_old
        simply like remove it and see what happens.

        C Offline
        C Offline
        CHoelzl
        wrote on 2 Apr 2024, 09:00 last edited by
        #3

        @JoeCFD Thanks for the input, but I ended up using a new image.

        1 Reply Last reply
        0

        3/3

        2 Apr 2024, 09:00

        • Login

        • Login or register to search.
        3 out of 3
        • First post
          3/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved