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

Build issue when cross-compiling Qt with bundled xcb

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.8.0 Beta
    • Build System, QPA: X11/XCB
    • None
    • Linux, Cross build, X11, xcb

    Description

      I am cross building qt on LibreElec (Linux) for x86.
      We use X11/EGLFS integration there.
      5.7.0 was building fine but 5.8.0 Beta gives me the following build error:

      make[6]: Leaving directory '/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/qt5-5.8.0-beta/qtbase/src/plugins/platforms/linuxfb'
      /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -c -pipe -m64 -fPIC --sysroot=/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot -O2 -g -std=c+11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_NO_FOREACH -DQT_BUILD_XCB_PLUGIN -DXCB_USE_XLIB -DXCB_USE_XINPUT2 -DXCB_USE_RENDER -DDFLT_XKB_CONFIG_ROOT=\"/usr/share/X11/xkb\" -DDEFAULT_XKB_RULES=\"evdev\" -DDEFAULT_XKB_MODEL=\"pc105\" -DDEFAULT_XKB_LAYOUT=\"us\" -DQT_BUILD_XCB_QPA_LIB_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SERVICE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Igl_integrations -I../../../3rdparty/xkbcommon -I../../../3rdparty/xkbcommon/xkbcommon -I../../../3rdparty/xkbcommon/src -I../../../3rdparty/xkbcommon/src/xkbcomp -I../../../../include -I../../../../include/QtServiceSupport -I../../../../include/QtServiceSupport/5.8.0 -I../../../../include/QtServiceSupport/5.8.0/QtServiceSupport -I../../../../include/QtThemeSupport -I../../../../include/QtThemeSupport/5.8.0 -I../../../../include/QtThemeSupport/5.8.0/QtThemeSupport -I../../../../include/QtEventDispatcherSupport -I../../../../include/QtEventDispatcherSupport/5.8.0 -I../../../../include/QtEventDispatcherSupport/5.8.0/QtEventDispatcherSupport -I../../../../include/QtFontDatabaseSupport -I../../../../include/QtFontDatabaseSupport/5.8.0 -I../../../../include/QtFontDatabaseSupport/5.8.0/QtFontDatabaseSupport -I../../../../include/QtGui/5.8.0 -I../../../../include/QtGui/5.8.0/QtGui -I../../../../include/QtGui -I../../../../include/QtCore/5.8.0 -I../../../../include/QtCore/5.8.0/QtCore -I../../../../include/QtCore -I.moc -isystem /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/libdrm -I../../../../3rdparty/xcb/include -I../../../../3rdparty/xcb/sysinclude -isystem /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/freetype2 -I/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/freetype2 -isystem /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/freetype2 -I../../../../mkspecs/devices/linux-Generic-g+ -o .obj/qxcbscreen.o qxcbscreen.cpp
      /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -c -pipe -m64 -fPIC --sysroot=/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot -O2 -g -std=c+11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_NO_FOREACH -DQT_BUILD_XCB_PLUGIN -DXCB_USE_XLIB -DXCB_USE_XINPUT2 -DXCB_USE_RENDER -DDFLT_XKB_CONFIG_ROOT=\"/usr/share/X11/xkb\" -DDEFAULT_XKB_RULES=\"evdev\" -DDEFAULT_XKB_MODEL=\"pc105\" -DDEFAULT_XKB_LAYOUT=\"us\" -DQT_BUILD_XCB_QPA_LIB_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SERVICE_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_EVENTDISPATCHER_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Igl_integrations -I../../../3rdparty/xkbcommon -I../../../3rdparty/xkbcommon/xkbcommon -I../../../3rdparty/xkbcommon/src -I../../../3rdparty/xkbcommon/src/xkbcomp -I../../../../include -I../../../../include/QtServiceSupport -I../../../../include/QtServiceSupport/5.8.0 -I../../../../include/QtServiceSupport/5.8.0/QtServiceSupport -I../../../../include/QtThemeSupport -I../../../../include/QtThemeSupport/5.8.0 -I../../../../include/QtThemeSupport/5.8.0/QtThemeSupport -I../../../../include/QtEventDispatcherSupport -I../../../../include/QtEventDispatcherSupport/5.8.0 -I../../../../include/QtEventDispatcherSupport/5.8.0/QtEventDispatcherSupport -I../../../../include/QtFontDatabaseSupport -I../../../../include/QtFontDatabaseSupport/5.8.0 -I../../../../include/QtFontDatabaseSupport/5.8.0/QtFontDatabaseSupport -I../../../../include/QtGui/5.8.0 -I../../../../include/QtGui/5.8.0/QtGui -I../../../../include/QtGui -I../../../../include/QtCore/5.8.0 -I../../../../include/QtCore/5.8.0/QtCore -I../../../../include/QtCore -I.moc -isystem /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/libdrm -I../../../../3rdparty/xcb/include -I../../../../3rdparty/xcb/sysinclude -isystem /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/freetype2 -I/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/freetype2 -isystem /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include/freetype2 -I../../../../mkspecs/devices/linux-Generic-g+ -o .obj/qxcbwindow.o qxcbwindow.cpp
      In file included from qxcbkeyboard.cpp:39:0:
      qxcbkeyboard.h:45:29: fatal error: xcb/xcb_keysyms.h: No such file or directory
      compilation terminated.
      ln -s libQt5EglFSDeviceIntegration.so.5.8.0 libQt5EglFSDeviceIntegration.so
      ln -s libQt5EglFSDeviceIntegration.so.5.8.0 libQt5EglFSDeviceIntegration.so.5
      ln -s libQt5EglFSDeviceIntegration.so.5.8.0 libQt5EglFSDeviceIntegration.so.5.8
      Makefile.xcb_qpa_lib:4005: recipe for target '.obj/qxcbkeyboard.o' failed
      make[7]: *** [.obj/qxcbkeyboard.o] Error 1
      make[7]: *** Waiting for unfinished jobs....
      rm -f ../../../../lib/libQt5EglFSDeviceIntegration.so.5.8.0
      mv -f libQt5EglFSDeviceIntegration.so.5.8.0 ../../../../lib/
      rm -f ../../../../lib/libQt5EglFSDeviceIntegration.so
      rm -f ../../../../lib/libQt5EglFSDeviceIntegration.so.5
      rm -f ../../../../lib/libQt5EglFSDeviceIntegration.so.5.8
      mv -f libQt5EglFSDeviceIntegration.so ../../../../lib/
      mv -f libQt5EglFSDeviceIntegration.so.5 ../../../../lib/
      mv -f libQt5EglFSDeviceIntegration.so.5.8 ../../../../lib/
      make[7]: Leaving directory '/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/qt5-5.8.0-beta/qtbase/src/plugins/platforms/eglfs'
      ( test e Makefile.eglfs-plugin || /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/qt5-5.8.0-beta/qtbase/bin/qmake -o Makefile.eglfs-plugin /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/qt5-5.8.0-beta/qtbase/src/plugins/platforms/eglfs/eglfs-plugin.pro -qtconf /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/qt5-5.8.0-beta/qtbase/bin/qt.conf – -sysroot /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot -prefix /usr/local/qt5 -hostprefix /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel -device-option CROSS_COMPILE=/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu -device linux-Generic-g++ -release -v -opensource -confirm-license -shared -make libs -no-pch -no-icu -qt-xkbcommon -no-sql-sqlite2 -nomake examples -nomake tests -no-libjpeg -qpa xcb -opengl desktop -no-kms -no-directfb -qt-xcb -no-accessibility -skip qtactiveqt -skip qtandroidextras -skip qtdoc -skip qtvirtualkeyboard -skip qtcharts -skip qtdatavis3d -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtscript -skip qtsensors -skip qtserialport -skip qtcanvas3d -skip qtwayland -skip qtwinextras -skip qtserialbus -skip qtxmlpatterns -skip qttranslations -skip qtmultimedia -skip qtscxml -skip qtquickcontrols2 -skip qt3d -skip qtpurchasing -skip qtgamepad -skip qtwebview --force-debug-info ) && make -f Makefile.eglfs-plugin
      In file included from qxcbconnection.cpp:45:0:
      qxcbkeyboard.h:45:29: fatal error: xcb/xcb_keysyms.h: No such file or directory
      compilation terminated.
      Makefile.xcb_qpa_lib:3135: recipe for target '.obj/qxcbconnection.o' failed
      make[7]: *** [.obj/qxcbconnection.o] Error 1

      It looks like it doesn't find the xcb headers where they are of course in the qt tree.

      Here is the config options we use for building it :

      -sysroot
      /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot
      -prefix
      /usr/local/qt5
      -hostprefix
      /home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel
      -device-option
      CROSS_COMPILE=/home/longchair/LibreELEC.tv/build.PlexMediaPlayer-Generic.x86_64-8.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-
      -device
      linux-Generic-g++
      -release
      -opensource
      -confirm-license
      -shared
      -make
      libs
      -no-pch
      -no-icu
      -qt-xkbcommon
      -no-sql-sqlite2
      -nomake
      examples
      -nomake
      tests
      -no-libjpeg
      -qpa
      xcb
      -opengl
      desktop
      -no-kms
      -no-directfb
      -qt-xcb
      -no-accessibility
      -skip
      qtactiveqt
      -skip
      qtandroidextras
      -skip
      qtdoc
      -skip
      qtvirtualkeyboard
      -skip
      qtcharts
      -skip
      qtdatavis3d
      -skip
      qtgraphicaleffects
      -skip
      qtlocation
      -skip
      qtmacextras
      -skip
      qtscript
      -skip
      qtsensors
      -skip
      qtserialport
      -skip
      qtcanvas3d
      -skip
      qtwayland
      -skip
      qtwinextras
      -skip
      qtserialbus
      -skip
      qtxmlpatterns
      -skip
      qttranslations
      -skip
      qtmultimedia
      -skip
      qtscxml
      -skip
      qtquickcontrols2
      -skip
      qt3d
      -skip
      qtpurchasing
      -skip
      qtgamepad
      -skip
      qtwebview
      --force-debug-info

      We also use gcc 5.4.
      The qmake.conf file that is used for the build is very simple as follows (copy of the qt nuc one :

      #

      1. qmake configuration for the Intel NUC DE3815TYKE targeting EGL/GLES either via KMS (eglfs) or Wayland
        #
      2. Verified with a core-image-weston image produced by Yocto.

      include(../common/linux_device_pre.conf)

      NUC_CFLAGS = "-m64 -fPIC"
      QMAKE_CFLAGS += $$NUC_CFLAGS
      QMAKE_CXXFLAGS += $$NUC_CFLAGS
      QMAKE_LFLAGS += $$NUC_CFLAGS

      include(../common/linux_device_post.conf)

      load(qt_config)

      I'm fully available if you need any further information.

      Attachments

        Issue Links

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

          Activity

            People

              paeglis Gatis Paeglis
              longchair LongChair
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes