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. Missing GLESv2 library not found
Forum Updated to NodeBB v4.3 + New Features

Missing GLESv2 library not found

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 3 Posters 3.3k 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.
  • O Offline
    O Offline
    OscarCa
    wrote on last edited by
    #1

    Hi all, I am using a Ubuntu VM, running QTCreator 4.6.2 built on QT 5.10.1. I am doing a cross compile for an Emcraft STM32MP1 SOM and have loaded the tool chains etc.
    I create an empty Widget project for the STM but cannot link as it gets the errors below that says I am missing the GLESv2 library. (Possibly an issue with the toolchain) I get the same error regardless of if I run the make from QT Creator or the command line. Any help would be much appreciated.

    20:15:01: Running steps for project WidTest...
    20:15:01: Configuration unchanged, skipping qmake step.
    20:15:01: Starting: "/usr/bin/make"
    arm-openstlinux_weston-linux-gnueabi-g++ -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/st/stm32mp1-som/2.4-snapshot/sysroots/cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/opt/st/stm32mp1-som/2.4-snapshot/sysroots/cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi -o WidTest main.o mainwindow.o moc_mainwindow.o -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread
    /opt/st/stm32mp1-som/2.4-snapshot/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/libexec/arm-openstlinux_weston-linux-gnueabi/gcc/arm-openstlinux_weston-linux-gnueabi/7.3.0/real-ld: cannot find -lGLESv2
    Makefile:239: recipe for target 'WidTest' failed
    collect2: error: ld returned 1 exit status
    make: *** [WidTest] Error 1
    20:15:01: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project WidTest (kit: stm32mp1Emcraft)
    When executing step "Make"
    20:15:01: Elapsed time: 00:00.

    jsulmJ 1 Reply Last reply
    0
    • O OscarCa

      Hi all, I am using a Ubuntu VM, running QTCreator 4.6.2 built on QT 5.10.1. I am doing a cross compile for an Emcraft STM32MP1 SOM and have loaded the tool chains etc.
      I create an empty Widget project for the STM but cannot link as it gets the errors below that says I am missing the GLESv2 library. (Possibly an issue with the toolchain) I get the same error regardless of if I run the make from QT Creator or the command line. Any help would be much appreciated.

      20:15:01: Running steps for project WidTest...
      20:15:01: Configuration unchanged, skipping qmake step.
      20:15:01: Starting: "/usr/bin/make"
      arm-openstlinux_weston-linux-gnueabi-g++ -march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/st/stm32mp1-som/2.4-snapshot/sysroots/cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/opt/st/stm32mp1-som/2.4-snapshot/sysroots/cortexa7hf-neon-vfpv4-openstlinux_weston-linux-gnueabi -o WidTest main.o mainwindow.o moc_mainwindow.o -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread
      /opt/st/stm32mp1-som/2.4-snapshot/sysroots/x86_64-openstlinux_weston_sdk-linux/usr/libexec/arm-openstlinux_weston-linux-gnueabi/gcc/arm-openstlinux_weston-linux-gnueabi/7.3.0/real-ld: cannot find -lGLESv2
      Makefile:239: recipe for target 'WidTest' failed
      collect2: error: ld returned 1 exit status
      make: *** [WidTest] Error 1
      20:15:01: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project WidTest (kit: stm32mp1Emcraft)
      When executing step "Make"
      20:15:01: Elapsed time: 00:00.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @OscarCa So, did you install libgles2?

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

      1 Reply Last reply
      0
      • O Offline
        O Offline
        OscarCa
        wrote on last edited by
        #3

        Good question and thank you for your reply. Yes I have and tried reinstalling etc. I am assuming that you mean install using:
        sudo apt-get install libgles2 ?

        jsulmJ 1 Reply Last reply
        0
        • O OscarCa

          Good question and thank you for your reply. Yes I have and tried reinstalling etc. I am assuming that you mean install using:
          sudo apt-get install libgles2 ?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @OscarCa Since you're cross compiling you need this lib in your sysroot, not host.

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

          1 Reply Last reply
          0
          • O Offline
            O Offline
            OscarCa
            wrote on last edited by
            #5

            I am new to this! Any guidance on how install to the the sysroot would be awesome.

            jsulmJ 1 Reply Last reply
            0
            • O OscarCa

              I am new to this! Any guidance on how install to the the sysroot would be awesome.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @OscarCa How did you create the sysroot?
              Often you simply copy the content of your device filesystem to your host machine and use it as sysroot.
              In this case you need to install this lib (and dev part of it) on your device and then sync its filesystem to your sysroot.

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

              O 2 Replies Last reply
              0
              • jsulmJ jsulm

                @OscarCa How did you create the sysroot?
                Often you simply copy the content of your device filesystem to your host machine and use it as sysroot.
                In this case you need to install this lib (and dev part of it) on your device and then sync its filesystem to your sysroot.

                O Offline
                O Offline
                OscarCa
                wrote on last edited by
                #7

                I installed it using the Emcraft setup procedure at https://www.emcraft.com/products/1062#software which included the meta-toolchain-qt5-openstlinux-weston-stm32mp1-som-x86_64-toolchain-2.4-snapshot.sh

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  braden_sun
                  wrote on last edited by
                  #8

                  @jsulm @OscarCa Hello, I am having the same issue and am also fairly new to this so appreciate any help! I have been following this tutorial ( https://www.emsyslabs.com/how-to-compile-linux-using-yocto-for-stm32mp1/ ) for deployment on a STM32MP157a-DK2 board. To create the Toolchain I first executed the command:

                  bitbake meta-toolchain-qt5
                  

                  Then I installed the SDK using:

                  ./meta-toolchain-qt5-openstlinux-eglfs-stm32mp1-x86_64-toolchain-2.6-snapshot.sh
                  

                  And finally that generated the sysroot and an environment setup script:

                  . /opt/st/stm32mp1/2.6-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi
                  

                  Now just to clarify, when you say "install this lib (and dev part of it) on your device and then sync its filesystem to your sysroot." you mean to ssh into the STM32MP1 device and install the library and sync the device filesystem to the sysroot on the host computer? I am a little confused as my sysroot has two sub folders: one "x86_64-openstlinux_eglfs_sdk-linux" where my qmake is located and another "cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi" that appears is the copy of my device file system.

                  In addition, when I run apt-get install libgles2 on my target device I get the following message:

                  eading package lists... Done
                  Building dependency tree... Done
                  Note, selecting 'gcnano-userland-multi-binary-stm32mp' instead of 'libgles2'
                  gcnano-userland-multi-binary-stm32mp is already the newest version (6.2.4.p3-r0).
                  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                  

                  I would appreciate any guidance.

                  jsulmJ 1 Reply Last reply
                  0
                  • B braden_sun

                    @jsulm @OscarCa Hello, I am having the same issue and am also fairly new to this so appreciate any help! I have been following this tutorial ( https://www.emsyslabs.com/how-to-compile-linux-using-yocto-for-stm32mp1/ ) for deployment on a STM32MP157a-DK2 board. To create the Toolchain I first executed the command:

                    bitbake meta-toolchain-qt5
                    

                    Then I installed the SDK using:

                    ./meta-toolchain-qt5-openstlinux-eglfs-stm32mp1-x86_64-toolchain-2.6-snapshot.sh
                    

                    And finally that generated the sysroot and an environment setup script:

                    . /opt/st/stm32mp1/2.6-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi
                    

                    Now just to clarify, when you say "install this lib (and dev part of it) on your device and then sync its filesystem to your sysroot." you mean to ssh into the STM32MP1 device and install the library and sync the device filesystem to the sysroot on the host computer? I am a little confused as my sysroot has two sub folders: one "x86_64-openstlinux_eglfs_sdk-linux" where my qmake is located and another "cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi" that appears is the copy of my device file system.

                    In addition, when I run apt-get install libgles2 on my target device I get the following message:

                    eading package lists... Done
                    Building dependency tree... Done
                    Note, selecting 'gcnano-userland-multi-binary-stm32mp' instead of 'libgles2'
                    gcnano-userland-multi-binary-stm32mp is already the newest version (6.2.4.p3-r0).
                    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                    

                    I would appreciate any guidance.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @braden_sun said in Missing GLESv2 library not found:

                    one "x86_64-openstlinux_eglfs_sdk-linux" where my qmake is located and another "cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi" that appears is the copy of my device file system

                    The first one is for the tools which you need to execute on your host (like qmake) those needs to be x86_64 as this is what your host is most probably. The other one contains the sysroot.
                    Did you search in your sysroot for libgles* ?

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

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      braden_sun
                      wrote on last edited by braden_sun
                      #10

                      Thanks for the reply. First of all here is the specific error message I get when trying to deploy to my target.

                      06:07:02: Running steps for project stm32WidgetTest...
                      06:07:02: Configuration unchanged, skipping qmake step.
                      06:07:02: Starting: "/usr/bin/make" -j2
                      arm-openstlinux_eglfs-linux-gnueabi-g++  -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/opt/st/stm32mp1/2.6-snapshot/sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/opt/st/stm32mp1/2.6-snapshot/sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi -o stm32mp1Test main.o mainwindow.o moc_mainwindow.o   -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2 -lpthread 
                      /opt/st/stm32mp1/2.6-snapshot/sysroots/x86_64-openstlinux_eglfs_sdk-linux/usr/libexec/arm-openstlinux_eglfs-linux-gnueabi/gcc/arm-openstlinux_eglfs-linux-gnueabi/8.2.0/real-ld: cannot find -lGLESv2
                      Makefile:240: recipe for target 'stm32mp1Test' failed
                      collect2: error: ld returned 1 exit status
                      make: *** [stm32mp1Test] Error 1
                      06:07:02: The process "/usr/bin/make" exited with code 2.
                      Error while building/deploying project stm32WidgetTest (kit: STM32MP1)
                      When executing step "Make"
                      06:07:02: Elapsed time: 00:00.
                      

                      Second, when I look in

                      /opt/st/stm32mp1/2.6-snapshot/sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi/usr/lib
                      

                      I can find the libgles libraries but they are highlighted red:

                      Screen Shot 2020-05-08 at 9.36.54 AM.png

                      Seems like they are in my sysroot but qt is looking for them in the x86 folder? I was cautious about creating a link from the cortexa7t2hf-neon-vfpv4-openstlinux_eglfs-linux-gnueabi/usr/lib directory to the x86 lib folder that the error points to since they are different architectures but I guess the error does point to an "arm" directory within x86.

                      1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @OscarCa How did you create the sysroot?
                        Often you simply copy the content of your device filesystem to your host machine and use it as sysroot.
                        In this case you need to install this lib (and dev part of it) on your device and then sync its filesystem to your sysroot.

                        O Offline
                        O Offline
                        OscarCa
                        wrote on last edited by
                        #11

                        @jsulm . Thanks for the help. I was able to copy them and others over and I can now successfully build. Again. thank you so much. :)
                        Some of the other issues I had was that QTCreator needed to be launched from a terminal window as it didn't seem to pick up the the environment settings when you from run it from the Ubuntu desktop. But all sorted now.

                        jsulmJ 1 Reply Last reply
                        0
                        • O OscarCa

                          @jsulm . Thanks for the help. I was able to copy them and others over and I can now successfully build. Again. thank you so much. :)
                          Some of the other issues I had was that QTCreator needed to be launched from a terminal window as it didn't seem to pick up the the environment settings when you from run it from the Ubuntu desktop. But all sorted now.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @OscarCa You can configure build and run environment in QtCreator.

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

                          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