MuyePan / CrossCompileQtForRpi

15 stars 6 forks source link

Qt6 cmake error #1

Closed HyungGyuKim76 closed 1 year ago

HyungGyuKim76 commented 1 year ago

Thank you very much for the video.

However, while following the video, an error occurs in the middle. The environment I'm using looks very similar to the one in the video. I am using Raspberry4 64bit system when Ubuntu 20.04.2 is used.

The error is "Compile source code for rpi." It is generated from cmake in the part.

Can I get some advice as to why I am getting the error?

<------------------------------------------------------------------------------------------------------------------------------------------> denniskim@ubuntu-20:~/qt6/pi-build$ cmake ../src/qtbase-everywhere-src-6.5.1/ -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=$HOME/qt6/host -DCMAKE_STAGING_PREFIX=$HOME/qt6/pi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_TOOLCHAIN_FILE=$HOME/qt6/toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON

-DCMAKE_C_FLAGS=-march=armv8-a -isystem=/usr/include -isystem=/usr/local/include -isystem=/usr/include/aarch64-linux-gnu -DCMAKE_C_FLAGS_DEBUG=-g -DCMAKE_C_FLAGS_RELEASE=-pipe -O2 -DCMAKE_C_FLAGS_RELWITHDEBINFO=-g -DNDEBUG -O2 -DCMAKE_CXX_FLAGS=-march=armv8-a -isystem=/usr/include -isystem=/usr/local/include -isystem=/usr/include/aarch64-linux-gnu -DCMAKE_CXX_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_RELEASE=-pipe -O2 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-g -DNDEBUG -O2 -DCMAKE_OBJCOPY=/opt/cross-pi-gcc/bin/aarch64-linux-gnu-objcopy -DCMAKE_EXE_LINKER_FLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-rpath-link=/home/dennis/rpi-sysroot/usr/lib/aarch64-linux-gnu -Wl,-rpath-link=$HOME/qt6/pi/lib -DCMAKE_TOOLCHAIN_FILE=/home/denniskim/qt6/toolchain.cmake -DCMAKE_C_STANDARD=11 -DCMAKE_C_STANDARD_REQUIRED=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_MODULE_PATH:STRING=/home/denniskim/qt6/src/qtbase-everywhere-src-6.5.1/cmake/platforms

CMake Error at cmake/QtBuildInformation.cmake:508 (message): Feature "opengl": Forcing to "ON" breaks its condition: QT_FEATURE_opengl_desktop OR QT_FEATURE_opengl_dynamic OR QT_FEATURE_opengles2 Condition values dump: QT_FEATURE_opengl_desktop = "OFF" QT_FEATURE_opengl_dynamic = "OFF" QT_FEATURE_opengles2 = "OFF"

Call Stack (most recent call first): cmake/QtFeature.cmake:288 (qt_configure_add_report_error) cmake/QtFeature.cmake:410 (qt_feature_check_and_save_internal_value) cmake/QtFeature.cmake:625 (qt_evaluate_feature) cmake/QtFeature.cmake:594 (qt_feature_module_end) src/CMakeLists.txt:13 (qt_feature_evaluate_features)

-- Configuration summary shown below. It has also been written to /home/denniskim/qt6/pi-build/config.summary -- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.

-- Configure summary:

Building for: devices/linux-rasp-pi4-aarch64 (arm64, CPU features: cx16 neon) Compiler: gcc 10.3.0 Build options: Mode ................................... release Optimize release build for size ........ no Fully optimize release builds (-O3) .... no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++17 Using ccache ........................... no Using new DTAGS ........................ yes Relocatable ............................ yes Using precompiled headers .............. yes Using Link Time Optimization (LTCG) .... no Using Intel CET ........................ no Target compiler supports: ARM Extensions ....................... NEON Sanitizers: Addresses ............................ no Threads .............................. no Memory ............................... no Fuzzer (instrumentation only) ........ no Undefined ............................ no Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... no Qt Gui ................................. yes Qt Network ............................. yes Qt PrintSupport ........................ yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... no OpenSSL ................................ no Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ no OpenSSL 3.0 ............................ no Using system zlib ...................... no Zstandard support ...................... no Thread support ......................... yes Common build options: Linker can resolve circular dependencies yes Qt Core: backtrace .............................. no DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... no ICU .................................... no Using system libb2 ..................... no Built-in copy of the MIME database ..... yes cpp/winrt base ......................... no Tracing backend ........................ Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... no CLONE_PIDFD support in forkfd .......... yes Application permissions ................ no Qt Sql: SQL item models ........................ yes Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes DTLS ................................... no OCSP-stapling .......................... no SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. no Brotli Decompression Support ........... no qIsEffectiveTLD() ...................... yes Built-in publicsuffix database ....... yes System publicsuffix database ......... yes Core tools: Android deployment tool ................ no macOS deployment tool .................. no Windows deployment tool ................ no qmake .................................. yes Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ no HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. no Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... no OpenVG ................................. no OpenGL: Desktop OpenGL ....................... no OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... no HiRes wheel support in libinput ........ no INTEGRITY HID .......................... no mtdev .................................. no tslib .................................. no xkbcommon .............................. no X11 specific: xlib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... no xkbcommon-x11 ........................ no xcb-sm ............................... no QPA backends: DirectFB ............................... no EGLFS .................................. no EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... no EGLFS GBM ............................ no EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ no LinuxFB ................................ yes VNC .................................... yes VK_KHR_display ......................... no QNX: lgmon ................................ no IMF .................................. no XCB: Using system-provided xcb-xinput ..... no GL integrations: GLX Plugin ......................... yes XCB GLX .......................... no EGL-X11 Plugin ..................... no Windows: Direct 2D ............................ no Direct 2D 1.1 ........................ no DirectWrite .......................... no DirectWrite 3 ........................ no Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt Testlib: Tester for item models ................. yes Batch tests ............................ no Qt PrintSupport: CUPS ................................... no Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite ................................. yes Using system provided SQLite ......... no

Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing. Note: Due to CMAKE_STAGING_PREFIX usage and an unfixed CMake bug, to ensure correct build time rpaths, directory-level install rules like ninja src/gui/install will not work. Check QTBUG-102592 for further details.

ERROR: Feature "opengl": Forcing to "ON" breaks its condition: QT_FEATURE_opengl_desktop OR QT_FEATURE_opengl_dynamic OR QT_FEATURE_opengles2 Condition values dump: QT_FEATURE_opengl_desktop = "OFF" QT_FEATURE_opengl_dynamic = "OFF" QT_FEATURE_opengles2 = "OFF"

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 cmake/QtBuildInformation.cmake:194 (message): Check the configuration messages for an error that has occurred. Call Stack (most recent call first): cmake/QtBuildInformation.cmake:24 (qt_configure_print_summary) cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:548 (qt_print_feature_summary) CMakeLists.txt:198 (qt_build_repo_end)

-- Configuring incomplete, errors occurred!

denniskim@ubuntu-20:~/qt6/pi-build$

MuyePan commented 1 year ago

I performed a clean installation of Ubuntu 20.04, follow the tutorial and It works. Don't know why you failed to compile. Maybe you should try it again with a clean installation of Ubuntu 20.04.

image