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. error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

Scheduled Pinned Locked Moved Solved Mobile and Embedded
13 Posts 4 Posters 15.4k 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.
  • S Offline
    S Offline
    small_bird
    wrote on 25 Sept 2016, 08:06 last edited by
    #1

    Hi everyone !
    When I ran the apps on the arm board, I got this error:
    error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory
    However, When I cross-compiled qt5.6, I have added the option -opengl es2. Why does this error still occur ? Could anyone help me ? Thanks in advance !

    K 1 Reply Last reply 25 Sept 2016, 09:43
    0
    • S small_bird
      25 Sept 2016, 08:06

      Hi everyone !
      When I ran the apps on the arm board, I got this error:
      error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory
      However, When I cross-compiled qt5.6, I have added the option -opengl es2. Why does this error still occur ? Could anyone help me ? Thanks in advance !

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 25 Sept 2016, 09:43 last edited by kshegunov
      #2

      Hi,
      You've added the library for linking, which has gone well and you have your executable. Now you need to make sure the library is found at load-time (i.e. when the application is started). It's a long discussion why, but sufficed to say, you need to follow the deployment for the platform (assuming Linux).

      Kind regards.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        raspe88
        wrote on 25 Sept 2016, 10:32 last edited by
        #3

        Have you used the ldd-command to check, whether the libGLESv2.so can be found on your target device for your executable (http://man7.org/linux/man-pages/man1/ldd.1.html)? If it cannot be found but libGLESv2.so is on your target-system, you should take a closer look into your path-variables (had that trouble on my RPi once).

        You could also try to add the path of the dynamic library to the LD_LIBRARY_PATH-Variable. I had some troubles with it myself some years ago when I cross-compiled Qt.

        S 1 Reply Last reply 26 Sept 2016, 02:11
        0
        • R raspe88
          25 Sept 2016, 10:32

          Have you used the ldd-command to check, whether the libGLESv2.so can be found on your target device for your executable (http://man7.org/linux/man-pages/man1/ldd.1.html)? If it cannot be found but libGLESv2.so is on your target-system, you should take a closer look into your path-variables (had that trouble on my RPi once).

          You could also try to add the path of the dynamic library to the LD_LIBRARY_PATH-Variable. I had some troubles with it myself some years ago when I cross-compiled Qt.

          S Offline
          S Offline
          small_bird
          wrote on 26 Sept 2016, 02:11 last edited by
          #4

          @raspe88 @kshegunov Thanks for your reply. However, I'd like to know that whether the libGLESv2.so on the pc host is suitable for the arm board. If not, where could get the libGLESV2 for the special arm board ? In my mind, the libGLES2v2 should be generated after compiling qt5.6 source code.

          J 1 Reply Last reply 26 Sept 2016, 05:28
          0
          • S small_bird
            26 Sept 2016, 02:11

            @raspe88 @kshegunov Thanks for your reply. However, I'd like to know that whether the libGLESv2.so on the pc host is suitable for the arm board. If not, where could get the libGLESV2 for the special arm board ? In my mind, the libGLES2v2 should be generated after compiling qt5.6 source code.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 26 Sept 2016, 05:28 last edited by
            #5

            @small_bird No you cannot use a lib from your x86 PC on an ARM board. How should this work? ARM processor has no clue about x86 machine code.
            And no, Qt is not responsible for compiling libGLES2v2 (as it is not part of Qt). You have to ensure you have that library on your target. How to do so depends on the Linux distribution you're running on your target.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply 26 Sept 2016, 07:21
            1
            • J jsulm
              26 Sept 2016, 05:28

              @small_bird No you cannot use a lib from your x86 PC on an ARM board. How should this work? ARM processor has no clue about x86 machine code.
              And no, Qt is not responsible for compiling libGLES2v2 (as it is not part of Qt). You have to ensure you have that library on your target. How to do so depends on the Linux distribution you're running on your target.

              S Offline
              S Offline
              small_bird
              wrote on 26 Sept 2016, 07:21 last edited by
              #6

              @jsulm Yes, I know what you mean. Actually, I'd like to use the QML feature. According to Qt5.6 document, qml is based on opengl es2. So, I have to transplant opengl es2 to arm board. Am I right? If not, how to use QML feature on arm board?

              J 1 Reply Last reply 26 Sept 2016, 07:29
              0
              • S small_bird
                26 Sept 2016, 07:21

                @jsulm Yes, I know what you mean. Actually, I'd like to use the QML feature. According to Qt5.6 document, qml is based on opengl es2. So, I have to transplant opengl es2 to arm board. Am I right? If not, how to use QML feature on arm board?

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 26 Sept 2016, 07:29 last edited by
                #7

                @small_bird You need to install opengl es2 on your board. How to do depends on the Linux distribution.
                It looks like you're able to cross compile Qt and your application. That means you should already have that library for ARM on your PC (in your sysroot?). Find it and copy to your board. Make sure it is really for ARM (call: file libGLES2v2.so and check its output). Put the library in the same directory where your application executable is located and try to start the app.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                S 1 Reply Last reply 26 Sept 2016, 07:33
                0
                • J jsulm
                  26 Sept 2016, 07:29

                  @small_bird You need to install opengl es2 on your board. How to do depends on the Linux distribution.
                  It looks like you're able to cross compile Qt and your application. That means you should already have that library for ARM on your PC (in your sysroot?). Find it and copy to your board. Make sure it is really for ARM (call: file libGLES2v2.so and check its output). Put the library in the same directory where your application executable is located and try to start the app.

                  S Offline
                  S Offline
                  small_bird
                  wrote on 26 Sept 2016, 07:33 last edited by
                  #8

                  @jsulm Yes, I have checked that ,my libGLESv2.so is for Intel 80386. But how to get that for arm?

                  S 1 Reply Last reply 26 Sept 2016, 07:37
                  0
                  • S small_bird
                    26 Sept 2016, 07:33

                    @jsulm Yes, I have checked that ,my libGLESv2.so is for Intel 80386. But how to get that for arm?

                    S Offline
                    S Offline
                    small_bird
                    wrote on 26 Sept 2016, 07:37 last edited by
                    #9

                    @small_bird My linux core editon is linux3.2. The distrubution is the one made by myself, including linux image, boot file and file system.

                    J 1 Reply Last reply 26 Sept 2016, 07:42
                    0
                    • S small_bird
                      26 Sept 2016, 07:37

                      @small_bird My linux core editon is linux3.2. The distrubution is the one made by myself, including linux image, boot file and file system.

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 26 Sept 2016, 07:42 last edited by
                      #10

                      @small_bird If I understood you correctly you build Qt and QML by yourself for your target, right? Then you should have that library for your target on your PC.
                      If you don't have it then you will need to compile it.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      S 1 Reply Last reply 26 Sept 2016, 07:44
                      0
                      • J jsulm
                        26 Sept 2016, 07:42

                        @small_bird If I understood you correctly you build Qt and QML by yourself for your target, right? Then you should have that library for your target on your PC.
                        If you don't have it then you will need to compile it.

                        S Offline
                        S Offline
                        small_bird
                        wrote on 26 Sept 2016, 07:44 last edited by
                        #11

                        @jsulm OK, thanks a lot. I will download the opengl es2 source code and try to compile it.

                        R 1 Reply Last reply 26 Sept 2016, 08:55
                        0
                        • S small_bird
                          26 Sept 2016, 07:44

                          @jsulm OK, thanks a lot. I will download the opengl es2 source code and try to compile it.

                          R Offline
                          R Offline
                          raspe88
                          wrote on 26 Sept 2016, 08:55 last edited by
                          #12

                          @small_bird One thing that sometimes is more efficient than crosscompiling all stuff you need by yourself could be installing it on your target-device (if there exists some default package for that distribution) and than mounting that remote device using sshfs into your development device. You just need to change some environment variables within qtcreator so it will search there for the libraries instead of searching your development device. This little trick can speed up things very much.

                          If your remote device should be too slow to mount it efficiently using sshfs, there's also the possibility of creating a diskdump of it using dd and mounting the image within your development device.

                          S 1 Reply Last reply 6 Oct 2016, 01:39
                          0
                          • R raspe88
                            26 Sept 2016, 08:55

                            @small_bird One thing that sometimes is more efficient than crosscompiling all stuff you need by yourself could be installing it on your target-device (if there exists some default package for that distribution) and than mounting that remote device using sshfs into your development device. You just need to change some environment variables within qtcreator so it will search there for the libraries instead of searching your development device. This little trick can speed up things very much.

                            If your remote device should be too slow to mount it efficiently using sshfs, there's also the possibility of creating a diskdump of it using dd and mounting the image within your development device.

                            S Offline
                            S Offline
                            small_bird
                            wrote on 6 Oct 2016, 01:39 last edited by
                            #13

                            @raspe88 Thanks a lot !
                            The reason may be that the libGLESv2.so is not the editon for my arm board. I will have a try.

                            1 Reply Last reply
                            0

                            • Login

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