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 11.2k 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.
  • 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.

                    J 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.

                      J Offline
                      J 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.

                              J 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.

                                J Offline
                                J 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
                                  
                                  
                                  J 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
                                    
                                    
                                    J Offline
                                    J 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
                                    • H Offline
                                      H Offline
                                      hareendran-tl
                                      wrote on 30 Sept 2022, 12:34 last edited by
                                      #21

                                      @jsulm
                                      This is the error i getting.

                                      ERROR: The OpenGL functionality tests failed! You might need to modify the OpenGL package search path by setting the OpenGL_DIR CMake variable to the OpenGL library's installation directory.

                                      CMake Error at qtbase/cmake/QtBuildInformation.cmake:181 (message):
                                      Check the configuration messages for an error that has occurred.
                                      Call Stack (most recent call first):
                                      qtbase/cmake/QtBuildInformation.cmake:21 (qt_configure_print_summary)
                                      CMakeLists.txt:111 (qt_print_feature_summary)

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        Dane 0
                                        wrote on 2 Jan 2023, 19:39 last edited by
                                        #22

                                        I am having the same problem on a RPi3B+, did anybody manage to solve this?

                                        J 1 Reply Last reply 3 Jan 2023, 08:14
                                        0
                                        • D Dane 0
                                          2 Jan 2023, 19:39

                                          I am having the same problem on a RPi3B+, did anybody manage to solve this?

                                          J Offline
                                          J Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on 3 Jan 2023, 08:14 last edited by
                                          #23

                                          @Dane-0 Check config.log file which contains the build log. You should find there error messages - post them here.

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

                                          D 1 Reply Last reply 5 Jan 2023, 14:10
                                          0

                                          • Login

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