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

qeventdispatcher_glib.cpp fails to build when cross-compiling to arm

    XMLWordPrintable

Details

    Description

      When cross compiling for raspberri pi 4 using the boot2qt SDK on ubuntu 20.04, the following compilation error occurs:

      [1039/1503] Building CXX object src/gui/CMakeFiles/Gui.dir/platform/unix/qeventdispatcher_glib.cpp.o
      FAILED: src/gui/CMakeFiles/Gui.dir/platform/unix/qeventdispatcher_glib.cpp.o
      /home/qt/Qt/6.0.2/Boot2Qt/raspberrypi4/toolchain/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++   -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7  --sysroot=/home/qt/Qt/6.0.2/Boot2Qt/raspberrypi4/toolchain/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi --sysroot=/home/qt/Qt/6.0.2/Boot2Qt/raspberrypi4/toolchain/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -DENABLE_PIXMAN_DRAWHELPERS -DGui_EXPORTS -DMD4C_USE_UTF8 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_GUI_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_EGL_NO_X11 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_QPA_DEFAULT_PLATFORM_NAME=\"xcb\" -DQT_USE_QSTRINGBUILDER -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -Isrc/gui/Gui_autogen/include -Iinclude -Iinclude/QtGui -I/home/qt/work/qt-cross/qtbase/src/gui -Isrc/gui -I/home/qt/work/qt-cross/qtbase/src/gui/../3rdparty/VulkanMemoryAllocator -Iinclude/QtGui/6.1.0 -Iinclude/QtGui/6.1.0/QtGui -I/home/qt/work/qt-cross/qtbase/src/gui/../3rdparty/md4c -Iinclude/QtCore -I/home/qt/work/qt-cross/qtbase/mkspecs/linux-g++ -Isrc/corelib -Iinclude/QtCore/6.1.0 -Iinclude/QtCore/6.1.0/QtCore -Iinclude/QtDBus -isystem /usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /home/qt/Qt/6.0.2/Boot2Qt/raspberrypi4/toolchain/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/freetype2 -isystem /home/qt/Qt/6.0.2/Boot2Qt/raspberrypi4/toolchain/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/glib-2.0 -isystem /home/qt/Qt/6.0.2/Boot2Qt/raspberrypi4/toolchain/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/glib-2.0/include -O2 -pipe -g -feliminate-unused-debug-types  -DNDEBUG -O3 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -Wsuggest-override -std=c++17 -Winvalid-pch -include /home/qt/work/qt-cross/target_build/src/gui/CMakeFiles/Gui.dir/cmake_pch.hxx -MD -MT src/gui/CMakeFiles/Gui.dir/platform/unix/qeventdispatcher_glib.cpp.o -MF src/gui/CMakeFiles/Gui.dir/platform/unix/qeventdispatcher_glib.cpp.o.d -o src/gui/CMakeFiles/Gui.dir/platform/unix/qeventdispatcher_glib.cpp.o -c /home/qt/work/qt-cross/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp
      
      cc1plus: warning: include location "/usr/include/glib-2.0" is unsafe for cross-compilation [-Wpoison-system-directories]
      In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9,
                       from /usr/include/glib-2.0/glib/gtypes.h:32,
                       from /usr/include/glib-2.0/glib/galloca.h:32,
                       from /usr/include/glib-2.0/glib.h:30,
                       from /home/qt/work/qt-cross/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:46:
      /usr/include/glib-2.0/glib/gtypes.h: In function ‘gboolean _GLIB_CHECKED_ADD_U64(guint64*, guint64, guint64)’:
      /usr/include/glib-2.0/glib/gtypes.h:463:3: error: static assertion failed: Expression evaluates to false
        463 |   G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
            |   ^~~~~~~~~~~~~~~
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            daniel.smith Daniel Smith
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes