Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104830

Problem when Configuring CMake Project for Raspberry Pi on Qt Creator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 6.3.0
    • Build System: CMake
    • None
    • Qt Creator 7.0.2
      Raspberry Pi 4 Model B
    • Linux/X11

      Qt 6 was installed following this guide: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi 

      After building both Qt for host and for Raspberry Pi:

      1. Open Qt Creator
      2. Go to Tools > Options, then add new Qt Versions and browse for qmake of qt-host and qt-raspi
      3. Add a new kit using the GCC and G++ cross-compiler as the compilers and the cross-compiled Qt Version
      4. Open a CMakeLists.txt from a Qt project (I tried the example project analogclock located on ~/qt5/qtbase/examples/gui/analogclock)
      5. On Projects tab, select only the newly created cross-compile kit and click "Configure Project"

      Note that this only happen with the cross-compile kit (configured for aarch64). When using the host kit (configured for x86_64), no error occurred.

      Output under "General Messages":

      Running /snap/bin/cmake -S /home/uraihan/qt5/qtbase/examples/gui/analogclock -B /home/uraihan/qt5/qtbase/examples/gui/build-analogclock-Unnamed-Debug -DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=/home/uraihan/Qt/Tools/QtCreator/share/qtcreator/package-manager/auto-setup.cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/uraihan/qt-raspi-test/bin/qmake -DCMAKE_PREFIX_PATH:PATH=/home/uraihan/qt-raspi-test -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/aarch64-linux-gnu-gcc-10 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/aarch64-linux-gnu-g++-10 in /home/uraihan/qt5/qtbase/examples/gui/build-analogclock-Unnamed-Debug.
      -- The CXX compiler identification is GNU 10.3.0
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++-10 - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Looking for C++ include pthread.h
      -- Looking for C++ include pthread.h - found
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Check if compiler accepts -pthread
      -- Check if compiler accepts -pthread - yes
      -- Found Threads: TRUE  
      -- Performing Test HAVE_STDATOMIC
      -- Performing Test HAVE_STDATOMIC - Success
      -- Found WrapAtomic: TRUE  
      -- Could NOT find Qt6CoreTools (missing: Qt6CoreTools_DIR)
      CMake Warning at /home/uraihan/qt-raspi-test/lib/cmake/Qt6/Qt6Config.cmake:213 (find_package):
        Found package configuration file:    /home/uraihan/qt-raspi-test/lib/cmake/Qt6Core/Qt6CoreConfig.cmake  but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be
        NOT FOUND.  Reason given by package:  Target "Qt6::Core" was not found.Call Stack (most recent call first):
        CMakeLists.txt:12 (find_package)
      -- Performing Test HAVE_EGL
      -- Performing Test HAVE_EGL - Failed
      -- Could NOT find EGL (missing: HAVE_EGL) (found version "1.5")
      -- Performing Test HAVE_GLESv2
      -- Performing Test HAVE_GLESv2 - Failed
      -- Could NOT find GLESv2 (missing: GLESv2_LIBRARY HAVE_GLESv2 HAVE_GLESv2) 
      CMake Warning at /home/uraihan/qt-raspi-test/lib/cmake/Qt6/Qt6Config.cmake:213 (find_package):
        Found package configuration file:    /home/uraihan/qt-raspi-test/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake  but it set Qt6Gui_FOUND to FALSE so package "Qt6Gui" is considered to be
        NOT FOUND.  Reason given by package:  Qt6Gui could not be found because dependency GLESv2 could not be found.Call Stack (most recent call first):
        CMakeLists.txt:12 (find_package)
      -- Configuring incomplete, errors occurred!
      See also "/home/uraihan/qt5/qtbase/examples/gui/build-analogclock-Unnamed-Debug/CMakeFiles/CMakeOutput.log".
      See also "/home/uraihan/qt5/qtbase/examples/gui/build-analogclock-Unnamed-Debug/CMakeFiles/CMakeError.log".
      CMake Error at CMakeLists.txt:12 (find_package):
        Found package configuration file:    /home/uraihan/qt-raspi-test/lib/cmake/Qt6/Qt6Config.cmake  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
        FOUND.  Reason given by package:  Failed to find Qt component "Core".  Expected Config file at
        "/home/uraihan/qt-raspi-test/lib/cmake/Qt6Core/Qt6CoreConfig.cmake" exists  Failed to find Qt component "Gui".  Expected Config file at
        "/home/uraihan/qt-raspi-test/lib/cmake/Qt6Gui/Qt6GuiConfig.cmake" exists  CMake process exited with exit code 1.Elapsed time: 00:00.
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtbuildsystem Qt Build System Team
            uraihan Umair Raihan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes