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. Qt 6.0 build from source on Raspberry Pi 4 "Opengl functionality tests failed"
Forum Updated to NodeBB v4.3 + New Features

Qt 6.0 build from source on Raspberry Pi 4 "Opengl functionality tests failed"

Scheduled Pinned Locked Moved Solved Mobile and Embedded
27 Posts 6 Posters 10.9k 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.
  • K Offline
    K Offline
    Kelenyche
    wrote on 7 Jan 2021, 17:46 last edited by
    #1

    Hi everyone,
    I'm trying to build Qt6 from source on the Raspberry Pi 4.
    I'm using the 64 bit image: raspios_arm64-2020-08-24
    I'm running into an issue doing the configuration; I'm running:
    ./configure -release -opensource -confirm-license -prefix /home/Desktop/Qt6/build
    I've added a few other parameters to the command, but no fix so far

    It works for a bit, and spits out the error message:

    ERROR: The OpenGL functionality tests failed!  You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
    
    CMake Error at qtbase/cmake/QtBuildInformation.cmake:66 (message):
      Check the configuration messages for an error that has occurred.
    Call Stack (most recent call first):
      qtbase/cmake/QtBuildInformation.cmake:10 (qt_configure_print_summary)
      CMakeLists.txt:87 (qt_print_feature_summary)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/home/pi/Desktop/Qt6/src/CMakeFiles/CMakeOutput.log".
    See also "/home/pi/Desktop/Qt6/src/CMakeFiles/CMakeError.log".
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:788 (message):
      CMake exited with code 1.
    

    I've done a lot of digging on the internet, and it looks like this was a common issue for the 5.x versions of Qt as well, but a lot of the solutions involve modifying the qmake.config file, which isn't used anymore.
    I've installed a bunch of opengl libraries now, but nothing has changed each time. I also enabled opengl on the Pi via the config menu.

    I can't think of any more details now, but if you ask I can probably give you an answer!
    Thanks for the help!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 7 Jan 2021, 17:48 last edited by
      #2

      Hi and welcome to devnet,

      Did you restart from a clean state after your various tests ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kelenyche
        wrote on 7 Jan 2021, 18:02 last edited by
        #3

        Yes I have, no change to the error.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 7 Jan 2021, 18:03 last edited by
          #4

          Did you check the test logs to see what exactly has failed ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Kelenyche
            wrote on 7 Jan 2021, 18:17 last edited by
            #5

            I have, but I'm not able to discern much of use from them. There's not really any mention of opengl in them, so I can't see exactly what's failing. I'd post the whole thing but the files are HUGE. Is that useful? Also fyi I'm limited in how often I can post since I'm new. :)

            it does look like a lot of the actions had this failure:

            Performing C++ SOURCE FILE Test HAVE_d2d1_1 failed with the following output:
            Change Dir: /home/pi/Desktop/Qt6/src/CMakeFiles/CMakeTmp
            

            I can't tell if that's useful.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 7 Jan 2021, 18:27 last edited by
              #6

              Might be a silly question but did you install the dev packages of the OpenGL libraries ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Kelenyche
                wrote on 7 Jan 2021, 18:31 last edited by
                #7

                Yes, I've installed a bunch of different opengl packages based on similar threads around the internet.
                fwiw I can't see it in the /usr/lib directory, but I'm not 100% that's where it should be.
                running glxinfo "grep "OpenGL version" gives: 2.1 Mesa 19.3.2

                So it's there, but I guess the Qt configuration is maybe looking in the wrong place for it?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 7 Jan 2021, 18:37 last edited by
                  #8

                  There's the catch: you have the normal package to use by application and you have their dev version for development purpose hence my question about them being installed.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • K Offline
                    K Offline
                    Kelenyche
                    wrote on 7 Jan 2021, 18:51 last edited by
                    #9

                    I'm not sure this is the issue - probably the command I ran to get the version only shows the normal package, I don't know how to show the dev package versions. To make sure I went back through all the steps I could find to install dev packages:
                    sudo apt-get install freeglut3
                    sudo apt-get install freeglut3-dev
                    sudo apt-get install binutils-gold
                    sudo apt-get install libglew-dev
                    sudo apt-get install mesa-common-dev
                    sudo apt-get install libglew1.5-dev libglm-dev
                    sudo apt-get install libgles2-mesa-dev
                    sudo apt-get install xorg-dev

                    A few of these installed packages I didn't have before. After a reboot and rerunning the Qt6 configuration, same issue.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 7 Jan 2021, 20:44 last edited by
                      #10

                      One thing that you can do is to install the build dependencies of the Qt 5 OpenGL package.

                      apt-get build-dep libqt5opengl5
                      

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        Kelenyche
                        wrote on 7 Jan 2021, 21:21 last edited by
                        #11

                        It seemed so promising! But the same error at the end.

                        I'll list out what I did so the next poor lost soul can follow along.
                        so for me that returned an error: You must put some source URIs in your sources.list.
                        I went to etc/apt/sources.list and uncommented the bottom three lines.
                        After retrying, it said two packages were missing, one of which had another dependent package that was missing.

                        sudo apt-get install libgtk-3-dev
                        sudo apt-get install libegl-mesa0
                        sudo apt-get install libgbm-dev

                        Then I retried your command, and it spent a while building everything. But like I said when I tried the ./configure stuff again I ended with the same message.

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          Kelenyche
                          wrote on 7 Jan 2021, 21:31 last edited by
                          #12

                          So maybe it's worth noting the reason I'm building from source is because the online installer executable isn't running on my pi. I'm running the new 64-bit Raspberry Pi OS image, but it's not recognizing the 64-bit executable. Googling that hasn't been much help, it's mostly people that have mismatched the executable and operating system, but as far as I can tell, mine should match. Any insight there? If I get that working life might be a lot easier.

                          jsulmJ 1 Reply Last reply 8 Jan 2021, 05:27
                          0
                          • K Kelenyche
                            7 Jan 2021, 21:31

                            So maybe it's worth noting the reason I'm building from source is because the online installer executable isn't running on my pi. I'm running the new 64-bit Raspberry Pi OS image, but it's not recognizing the 64-bit executable. Googling that hasn't been much help, it's mostly people that have mismatched the executable and operating system, but as far as I can tell, mine should match. Any insight there? If I get that working life might be a lot easier.

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on 8 Jan 2021, 05:27 last edited by
                            #13

                            @Kelenyche said in Qt 6.0 build from source on Raspberry Pi 4 "Opengl functionality tests failed":

                            but it's not recognizing the 64-bit executable

                            Do you mean the online installer from Qt Company web site? That one is for x86_64, not ARM.

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

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              Kelenyche
                              wrote on 8 Jan 2021, 13:49 last edited by
                              #14

                              Ah, that makes sense. So that means if I'm gonna get this installed on a Pi I have to build from source then.

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                Kelenyche
                                wrote on 8 Jan 2021, 15:58 last edited by
                                #15

                                Holy Geez I solved it!

                                I decided to just start going through the entire log that it blurts out after running the configure script. One of the first warnings was that I had the default build package (I forgot the name) instead of Ninja, but Qt is made to work with Ninja, so use the default at your own risk. I installed Ninja, and it configured just fine and is building now!

                                H 1 Reply Last reply 30 Sept 2022, 11:58
                                1
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 8 Jan 2021, 16:41 last edited by
                                  #16

                                  Great !

                                  Thanks for providing the solution.

                                  Ninja is one point I did not think about.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • K Kelenyche
                                    8 Jan 2021, 15:58

                                    Holy Geez I solved it!

                                    I decided to just start going through the entire log that it blurts out after running the configure script. One of the first warnings was that I had the default build package (I forgot the name) instead of Ninja, but Qt is made to work with Ninja, so use the default at your own risk. I installed Ninja, and it configured just fine and is building now!

                                    H Offline
                                    H Offline
                                    hareendran-tl
                                    wrote on 30 Sept 2022, 11:58 last edited by
                                    #17

                                    @Kelenyche said in Qt 6.0 build from source on Raspberry Pi 4 "Opengl functionality tests failed":

                                    Holy Geez I solved it!

                                    I decided to just start going through the entire log that it blurts out after running the configure script. One of the first warnings was that I had the default build package (I forgot the name) instead of Ninja, but Qt is made to work with Ninja, so use the default at your own risk. I installed Ninja, and it configured just fine and is building now!

                                    Hi,

                                    I am just starting with qt and cross compiling. I got the same error with ubuntu 22 and raspberry pi3 64 bit. I followed this tutorial. https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi.

                                    My doubt is,
                                    1: How to install Ninja?
                                    2: How to configure with it?

                                    Any help would be greatly appreciated.

                                    jsulmJ 1 Reply Last reply 30 Sept 2022, 12:02
                                    0
                                    • H hareendran-tl
                                      30 Sept 2022, 11:58

                                      @Kelenyche said in Qt 6.0 build from source on Raspberry Pi 4 "Opengl functionality tests failed":

                                      Holy Geez I solved it!

                                      I decided to just start going through the entire log that it blurts out after running the configure script. One of the first warnings was that I had the default build package (I forgot the name) instead of Ninja, but Qt is made to work with Ninja, so use the default at your own risk. I installed Ninja, and it configured just fine and is building now!

                                      Hi,

                                      I am just starting with qt and cross compiling. I got the same error with ubuntu 22 and raspberry pi3 64 bit. I followed this tutorial. https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi.

                                      My doubt is,
                                      1: How to install Ninja?
                                      2: How to configure with it?

                                      Any help would be greatly appreciated.

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 30 Sept 2022, 12:02 last edited by
                                      #18

                                      @hareendran-tl

                                      1. Using apt (apt install ninja-build)
                                      2. Pass this parameter to CMake: -GNinja

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

                                      1 Reply Last reply
                                      0
                                      • H Offline
                                        H Offline
                                        hareendran-tl
                                        wrote on 30 Sept 2022, 12:12 last edited by
                                        #19

                                        @jsulm
                                        Thanks for the immediate reply.
                                        1: ninja-build was already installed.
                                        2: -GNinja argument was passed with the command.

                                        I ran the following script

                                        cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=$HOME/qt-host -DCMAKE_STAGING_PREFIX=$HOME/qt-raspi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON
                                        
                                        
                                        jsulmJ 1 Reply Last reply 30 Sept 2022, 12:19
                                        0
                                        • H hareendran-tl
                                          30 Sept 2022, 12:12

                                          @jsulm
                                          Thanks for the immediate reply.
                                          1: ninja-build was already installed.
                                          2: -GNinja argument was passed with the command.

                                          I ran the following script

                                          cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=$HOME/qt-host -DCMAKE_STAGING_PREFIX=$HOME/qt-raspi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON
                                          
                                          
                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 30 Sept 2022, 12:19 last edited by
                                          #20

                                          @hareendran-tl And what is the problem?
                                          You should now be able to build using ninja.

                                          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