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. OpenGL ES2. Cross-compile for Beaglebone Black using OS Debian when built QT5.7.0
Qt 6.11 is out! See what's new in the release blog

OpenGL ES2. Cross-compile for Beaglebone Black using OS Debian when built QT5.7.0

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 6 Posters 9.5k Views 2 Watching
  • 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.
  • J Offline
    J Offline
    jastmc
    wrote on last edited by
    #3

    Well. I haven't succeeded yet but to install OpenGL on BBB there is a guide here.

    1 Reply Last reply
    0
    • small_birdS Offline
      small_birdS Offline
      small_bird
      wrote on last edited by
      #4

      You need to cross-compile mesa-12(a kind of implement for opengl es) and then link the headers and the libraries generated to Qt compiling.

      D 1 Reply Last reply
      0
      • D Offline
        D Offline
        Dang Vu
        wrote on last edited by
        #5

        thanks! i'am try and anoucement late!

        1 Reply Last reply
        0
        • small_birdS small_bird

          You need to cross-compile mesa-12(a kind of implement for opengl es) and then link the headers and the libraries generated to Qt compiling.

          D Offline
          D Offline
          Dang Vu
          wrote on last edited by
          #6

          @small_bird you can give me link about that? i was try Mesa and Mali but it's not success ( or i wrong some step) i really need a tutorial! thanks

          small_birdS 1 Reply Last reply
          0
          • D Dang Vu

            @small_bird you can give me link about that? i was try Mesa and Mali but it's not success ( or i wrong some step) i really need a tutorial! thanks

            small_birdS Offline
            small_birdS Offline
            small_bird
            wrote on last edited by
            #7

            @Dang-Vu Of course, http://www.360doc.com/content/15/0108/18/5268588_439214065.shtml. It is the web site in China. Can you see that?

            D 1 Reply Last reply
            0
            • small_birdS small_bird

              @Dang-Vu Of course, http://www.360doc.com/content/15/0108/18/5268588_439214065.shtml. It is the web site in China. Can you see that?

              D Offline
              D Offline
              Dang Vu
              wrote on last edited by Dang Vu
              #8

              @small_bird Hi sir! i built Mesa for arm with configure

              ./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
              

              and install successed!
              in linux-beagleboard-g++ qmake.conf i writen

              #
              # qmake configuration for the BeagleBoard and BeagleBoard xM boards
              # http://beagleboard.org/
              
              MAKEFILE_GENERATOR      = UNIX
              CONFIG                 += incremental
              QMAKE_INCREMENTAL_STYLE = sublib
              
              include(../../common/linux.conf)
              include(../../common/gcc-base-unix.conf)
              include(../../common/g++-unix.conf)
              
              load(device_config)
              
              QT_QPA_DEFAULT_PLATFORM = eglfs
              
              # modifications to g++.conf
              QMAKE_CC                = $${CROSS_COMPILE}gcc
              QMAKE_CXX               = $${CROSS_COMPILE}g++
              QMAKE_LINK              = $${QMAKE_CXX}
              QMAKE_LINK_SHLIB        = $${QMAKE_CXX}
              
              # modifications to linux.conf
              QMAKE_AR                = $${CROSS_COMPILE}ar cqs
              QMAKE_OBJCOPY           = $${CROSS_COMPILE}objcopy
              QMAKE_NM                = $${CROSS_COMPILE}nm -P
              QMAKE_STRIP             = $${CROSS_COMPILE}strip
              
              COMPILER_FLAGS          = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb
              
              #modifications to gcc-base.conf
              QMAKE_CFLAGS           += $${COMPILER_FLAGS}
              QMAKE_CXXFLAGS         += $${COMPILER_FLAGS}
              QMAKE_CXXFLAGS_RELEASE += -O3
              
              QMAKE_LIBS             += -lrt -lpthread -ldl
              
              # Extra stuff (OpenGL, DirectFB, ...)
              QMAKE_INCDIR_EGL        =/usr/local/Mesa/include/EGL
              QMAKE_LIBDIR_EGL        =/usr/local/Mesa/lib
              QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
              QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
              QMAKE_INCDIR_OPENVG     = $${QMAKE_INCDIR_EGL}
              QMAKE_LIBDIR_OPENVG     = $${QMAKE_LIBDIR_EGL}
              
              QMAKE_LIBS_EGL          = -lEGL -lIMGegl -lsrv_um
              QMAKE_LIBS_OPENGL_ES2   = -lGLESv2 $${QMAKE_LIBS_EGL}
              QMAKE_LIBS_OPENVG       = -lOpenVG $${QMAKE_LIBS_EGL}
              
              DISTRO_OPTS += hard-float
              
              # No need for any special EGL device integration.
              # Prioritize the default, compiled-in integration over any plugins.
              EGLFS_DEVICE_INTEGRATION = none
              
              include(../common/linux_arm_device_post.conf)
              
              load(qt_config)
              

              but i still have an error

              /usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized
              collect2: error: ld returned 1 exit status
              Makefile:90: recipe for target 'opengles2' failed
              make: *** [opengles2] Error 1
              OpenGL ES 2.0 disabled.
              The OpenGL ES 2.0 functionality test failed!
              

              what can i do to built QT for beaglebone! i really- really need a tutorial! thanks! hix...

              jsulmJ 1 Reply Last reply
              0
              • D Dang Vu

                @small_bird Hi sir! i built Mesa for arm with configure

                ./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
                

                and install successed!
                in linux-beagleboard-g++ qmake.conf i writen

                #
                # qmake configuration for the BeagleBoard and BeagleBoard xM boards
                # http://beagleboard.org/
                
                MAKEFILE_GENERATOR      = UNIX
                CONFIG                 += incremental
                QMAKE_INCREMENTAL_STYLE = sublib
                
                include(../../common/linux.conf)
                include(../../common/gcc-base-unix.conf)
                include(../../common/g++-unix.conf)
                
                load(device_config)
                
                QT_QPA_DEFAULT_PLATFORM = eglfs
                
                # modifications to g++.conf
                QMAKE_CC                = $${CROSS_COMPILE}gcc
                QMAKE_CXX               = $${CROSS_COMPILE}g++
                QMAKE_LINK              = $${QMAKE_CXX}
                QMAKE_LINK_SHLIB        = $${QMAKE_CXX}
                
                # modifications to linux.conf
                QMAKE_AR                = $${CROSS_COMPILE}ar cqs
                QMAKE_OBJCOPY           = $${CROSS_COMPILE}objcopy
                QMAKE_NM                = $${CROSS_COMPILE}nm -P
                QMAKE_STRIP             = $${CROSS_COMPILE}strip
                
                COMPILER_FLAGS          = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mthumb
                
                #modifications to gcc-base.conf
                QMAKE_CFLAGS           += $${COMPILER_FLAGS}
                QMAKE_CXXFLAGS         += $${COMPILER_FLAGS}
                QMAKE_CXXFLAGS_RELEASE += -O3
                
                QMAKE_LIBS             += -lrt -lpthread -ldl
                
                # Extra stuff (OpenGL, DirectFB, ...)
                QMAKE_INCDIR_EGL        =/usr/local/Mesa/include/EGL
                QMAKE_LIBDIR_EGL        =/usr/local/Mesa/lib
                QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
                QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
                QMAKE_INCDIR_OPENVG     = $${QMAKE_INCDIR_EGL}
                QMAKE_LIBDIR_OPENVG     = $${QMAKE_LIBDIR_EGL}
                
                QMAKE_LIBS_EGL          = -lEGL -lIMGegl -lsrv_um
                QMAKE_LIBS_OPENGL_ES2   = -lGLESv2 $${QMAKE_LIBS_EGL}
                QMAKE_LIBS_OPENVG       = -lOpenVG $${QMAKE_LIBS_EGL}
                
                DISTRO_OPTS += hard-float
                
                # No need for any special EGL device integration.
                # Prioritize the default, compiled-in integration over any plugins.
                EGLFS_DEVICE_INTEGRATION = none
                
                include(../common/linux_arm_device_post.conf)
                
                load(qt_config)
                

                but i still have an error

                /usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized
                collect2: error: ld returned 1 exit status
                Makefile:90: recipe for target 'opengles2' failed
                make: *** [opengles2] Error 1
                OpenGL ES 2.0 disabled.
                The OpenGL ES 2.0 functionality test failed!
                

                what can i do to built QT for beaglebone! i really- really need a tutorial! thanks! hix...

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

                @Dang-Vu What does

                file /usr/local/Mesa/lib/libGLESv2.so
                

                say?

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

                D 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Dang-Vu What does

                  file /usr/local/Mesa/lib/libGLESv2.so
                  

                  say?

                  D Offline
                  D Offline
                  Dang Vu
                  wrote on last edited by
                  #10

                  @jsulm Dir Sir! i make and install Mesa in here! i built Mesa with linaro toolchains(arm- linux-gnueabihf) !
                  i think

                  QMAKE_LIBDIR_EGL        =/usr/local/Mesa/lib   
                  

                  i right!? i can see libGLESv2.so in that(/usr/local/Mesa/lib)! but it not work when i configure QT with -opengl es2. you nees a that file? i cant send it for you!

                  jsulmJ 1 Reply Last reply
                  0
                  • D Dang Vu

                    @jsulm Dir Sir! i make and install Mesa in here! i built Mesa with linaro toolchains(arm- linux-gnueabihf) !
                    i think

                    QMAKE_LIBDIR_EGL        =/usr/local/Mesa/lib   
                    

                    i right!? i can see libGLESv2.so in that(/usr/local/Mesa/lib)! but it not work when i configure QT with -opengl es2. you nees a that file? i cant send it for you!

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

                    @Dang-Vu Can you please execute this command in a shell:

                    file /usr/local/Mesa/lib/libGLESv2.so
                    

                    and post its output here?

                    This message:

                    /usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized
                    

                    means that the library has a wrong format. That's why I want to see the output of that command: it will tell for which CPU architecture it was built.

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

                    D 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Dang-Vu Can you please execute this command in a shell:

                      file /usr/local/Mesa/lib/libGLESv2.so
                      

                      and post its output here?

                      This message:

                      /usr/local/Mesa/lib/libGLESv2.so: file not recognized: File format not recognized
                      

                      means that the library has a wrong format. That's why I want to see the output of that command: it will tell for which CPU architecture it was built.

                      D Offline
                      D Offline
                      Dang Vu
                      wrote on last edited by
                      #12

                      @jsulm sorry Sir! my mistake, file /usr/local/Mesa/lib/libGLESv2.so.2.0.0 it 's tell me i only use for x86-linux but not for arm! well, while i configure Mesa

                      ./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
                      

                      what is step i wrong sir? i thinks i successed to built Mesa3d for Arm but it's not true! you can fix it's, Sir?

                      jsulmJ 1 Reply Last reply
                      0
                      • D Dang Vu

                        @jsulm sorry Sir! my mistake, file /usr/local/Mesa/lib/libGLESv2.so.2.0.0 it 's tell me i only use for x86-linux but not for arm! well, while i configure Mesa

                        ./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
                        

                        what is step i wrong sir? i thinks i successed to built Mesa3d for Arm but it's not true! you can fix it's, Sir?

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

                        @Dang-Vu How did you build Mesa for ARM?

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

                        D 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @Dang-Vu How did you build Mesa for ARM?

                          D Offline
                          D Offline
                          Dang Vu
                          wrote on last edited by
                          #14

                          @jsulm i download Mesa3d from https://mesa.freedesktop.org/archive/13.0.1/mesa-13.0.1.tar.gz , in linux host( ubuntu16.04) i install linaro toolchains in terminal

                          $ sudo apt-get install gcc-arm-linux-gnueabi
                          $ sudo apt-get install g++-arm-linux-gnueabi
                          $ sudo apt-get install gcc-arm-linux-gnueabihf
                          $ sudo apt-get install g++-arm-linux-gnueabihf
                          

                          and i configure Mesa below:

                          ./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
                          

                          i make and install succsed in /usr/local/Mesa

                          L 1 Reply Last reply
                          0
                          • D Dang Vu

                            @jsulm i download Mesa3d from https://mesa.freedesktop.org/archive/13.0.1/mesa-13.0.1.tar.gz , in linux host( ubuntu16.04) i install linaro toolchains in terminal

                            $ sudo apt-get install gcc-arm-linux-gnueabi
                            $ sudo apt-get install g++-arm-linux-gnueabi
                            $ sudo apt-get install gcc-arm-linux-gnueabihf
                            $ sudo apt-get install g++-arm-linux-gnueabihf
                            

                            and i configure Mesa below:

                            ./configure --prefix /usr/local/Mesa --target=arm-linux --host=arm-linux --enable-gles2 --enable-gles1 --enable-glx --enable-egl --disable-dri3 --enable-shared-glppi --with-egl-platforms=x11 --with-dri-driver=swrast CROSS_COMPILE=arm-linux-gnueabihf-
                            

                            i make and install succsed in /usr/local/Mesa

                            L Offline
                            L Offline
                            Laksono
                            wrote on last edited by
                            #15

                            @Dang-Vu do you have finished with your problem?
                            i have same problem with u...

                            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