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. QT5 on IMX6 with xcb cross compile error

QT5 on IMX6 with xcb cross compile error

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 5 Posters 8.0k Views
  • 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.
  • M Offline
    M Offline
    msahlen
    wrote on last edited by
    #1

    Hi,
    I'm have a yocto build(fsl-image-gui) running on my imx6 sabre sd board and noeẃ I want to try QT5 on it.
    I'm using the cross compiler from yocto:
    @
    ./configure -opensource -confirm-license -make libs -make demos -make examples -device imx6 -device-option CROSS_COMPILE=/home/masa1/sabre/yocto/build/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi- -sysroot /home/masa1/sabre/yocto/build/tmp/sysroots/imx6qsabresd -no-gcc-sysroot -prefix /usr/local/Qt5-yocto-imx6 -opengl es2 -v -no-pch
    @
    I run in to the following problem:
    @
    /home/masa1/sabre/yocto/build/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -c -pipe -mfloat-abi=softfp -O2 -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -std=c++0x -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DXCB_USE_XLIB -DXCB_USE_XINPUT2 -DXCB_USE_RENDER -DXCB_USE_EGL -DSUPPORT_X11 -DQT_NO_XCB_XKB -DXCB_USE_IBUS -DQ_FONTCONFIGDATABASE -DQT_COMPILES_IN_HARFBUZZ -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_PLATFORMSUPPORT_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../mkspecs/devices/linux-imx6-g++ -I. -I../../../../include -I../../../../include/QtPlatformSupport -I../../../../include/QtPlatformSupport/5.0.1 -I../../../../include/QtPlatformSupport/5.0.1/QtPlatformSupport -I../../../../include/QtDBus -I../../../../include/QtGui -I../../../../include/QtGui/5.0.1 -I../../../../include/QtGui/5.0.1/QtGui -I../../../../include/QtCore -I../../../../include/QtCore/5.0.1 -I../../../../include/QtCore/5.0.1/QtCore -I.moc/release-shared -I/home/masa1/sabre/yocto/build/tmp/sysroots/imx6qsabresd/usr/include -o .obj/release-shared/qxcbconnection.o qxcbconnection.cpp
    qxcbconnection.cpp: In constructor 'QXcbConnection::QXcbConnection(QXcbNativeInterface*, const char*)':
    qxcbconnection.cpp:271:50: error: cannot convert 'Display* {aka _XDisplay*}' to 'EGLNativeDisplayType {aka _FBDisplay*}' for argument '1' to 'void* eglGetDisplay(EGLNativeDisplayType)'
    make[1]: *** [.obj/release-shared/qxcbconnection.o] Error 1
    make[1]: Leaving directory `/home/masa1/sabre/qt5/qtbase/src/plugins/platforms/xcb'
    make: *** [sub-xcb-plugin-pro-make_first-ordered] Error 2
    @
    anyone got any clues?

    [Edit: Added @ tags for clarity -- mlong]

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bceldran
      wrote on last edited by
      #2

      I have exactly the same problem, with a ptxdist/Oselas toolchain :

      @ ./configure -opensource -confirm-license -no-opengl -opengl es2 -device linux-imx6-g++ -v -device-option CROSS_COMPILE=/opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa9-linux-gnueabihf- -sysroot /home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/root -no-gcc-sysroot -prefix /usr/local/Qt-mx6-501 -optimized-qmake -reduce-relocations -reduce-exports -make libs -no-pch -lz -qt-xcb@

      @
      /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/arm-cortexa9-linux-gnueabihf-g++ -c -pipe -mfloat-abi=hard -O2 -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -std=c++0x -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DXCB_USE_XLIB -DXCB_USE_XINPUT2 -DXCB_USE_EGL -DSUPPORT_X11 -DXCB_USE_RENDER -DQT_COMPILES_IN_HARFBUZZ -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_PLATFORMSUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../mkspecs/devices/linux-imx6-g++ -I. -I../../../3rdparty/xcb/include -I../../../3rdparty/xcb/sysinclude -I../../../../include -I../../../../include/QtPlatformSupport -I../../../../include/QtPlatformSupport/5.0.1 -I../../../../include/QtPlatformSupport/5.0.1/QtPlatformSupport -I../../../../include/QtGui -I../../../../include/QtGui/5.0.1 -I../../../../include/QtGui/5.0.1/QtGui -I../../../../include/QtCore -I../../../../include/QtCore/5.0.1 -I../../../../include/QtCore/5.0.1/QtCore -I.moc/release-shared -I/opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include -I/home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/sysroot-target/include -I/home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/sysroot-target/usr/include -I/home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/sysroot-target/usr/include/dbus-1.0 -I/home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/sysroot-target/usr/lib/dbus-1.0/include -I/home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/sysroot-target/usr/lib/glib-2.0/include -I/home/bruno/BSP/BSP-Phytec-phyFLEX-i.MX6-PD12.0.3/platform-mx6/sysroot-target/usr/include/glib-2.0 -o .obj/release-shared/moc_qxcbconnection.o .moc/release-shared/moc_qxcbconnection.cpp
      In file included from /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include/EGL/eglplatform.h:38:0,
      from /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include/EGL/egl.h:34,
      from qxcbconnection.cpp:88:
      /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include/EGL/eglvivante.h:29:0: warning: "LINUX" redefined [enabled by default]
      <command-line>:0:0: note: this is the location of the previous definition
      In file included from /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include/EGL/eglplatform.h:38:0,
      from /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include/EGL/egl.h:34,
      from qxcbconnection.cpp:88:
      /opt/OSELAS.Toolchain-2012.12.0/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/usr/include/EGL/eglvivante.h:30:0: warning: "EGL_API_FB" redefined [enabled by default]
      <command-line>:0:0: note: this is the location of the previous definition
      qxcbconnection.cpp: In constructor 'QXcbConnection::QXcbConnection(QXcbNativeInterface*, const char*)':
      qxcbconnection.cpp:271:50: error: cannot convert 'Display* {aka _XDisplay*}' to 'EGLNativeDisplayType {aka _FBDisplay*}' for argument '1' to 'void* eglGetDisplay(EGLNativeDisplayType)'
      gmake[5]: *** [.obj/release-shared/qxcbconnection.o] Erreur 1
      gmake[5]: *** Attente des tâches non terminées....
      gmake[5] : on quitte le répertoire « /home/bruno/qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/platforms/xcb »
      gmake[4]: *** [sub-xcb-plugin-pro-make_first-ordered] Erreur 2
      gmake[4] : on quitte le répertoire « /home/bruno/qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/platforms/xcb »
      gmake[3]: *** [sub-xcb-make_first] Erreur 2
      gmake[3] : on quitte le répertoire « /home/bruno/qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins/platforms »
      gmake[2]: *** [sub-platforms-make_first] Erreur 2
      gmake[2] : on quitte le répertoire « /home/bruno/qt-everywhere-opensource-src-5.0.1/qtbase/src/plugins »
      gmake[1]: *** [sub-plugins-make_first] Erreur 2
      gmake[1] : on quitte le répertoire « /home/bruno/qt-everywhere-opensource-src-5.0.1/qtbase/src »
      gmake: *** [sub-src-make_first] Erreur 2
      @

      1 Reply Last reply
      0
      • J Offline
        J Offline
        juhvu
        wrote on last edited by
        #3

        I had this problem too. I modified "eglvivante.h" header under the sysroot and got it working. The "issue" here is that the #ifdef values in that header files are not set appropriately when you compile Qt with XCB support and you end up with inappropriate egl defines. In that file delete all but the X11 support (you can see quite clear main level #ifdef structure in the file).

        A 1 Reply Last reply
        0
        • G Offline
          G Offline
          giri babu
          wrote on last edited by
          #4

          hi ,

          i have a samme problem can anyone help me with this...
          ./configure -opensource -confirm-license -no-opengl -opengl es2 -device linux-imx6-g++ -v -device-option CROSS_COMPILE=/home/giri/fsl-community-bsp/build/tmp/sysroots/i686-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi- -sysroot /home/giri/fsl-community-bsp/build/tmp/sysroots/imx6qsabresd -no-gcc-sysroot -prefix /usr/local/qt5 -optimized-qmake -reduce-relocations -reduce-exports -make libs -no-pch -lz -qt-xcb

          i am getting error saying this what changes i have to do ...

          Found architecture in binary
          

          CFG_HOST_ARCH="i386"
          CFG_HOST_CPUFEATURES=""
          System architecture: 'unknown'
          Host architecture: 'i386'
          C++11 auto-detection... ()

          compilation terminated.
          make: *** [opengles2.o] Error 1
          OpenGL ES 2.x disabled.
          The OpenGL ES 2.0 functionality test failed!
          You might need to modify the include and library search paths by editing
          QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in
          /home/giri/qt5/qtbase/mkspecs/devices/linux-imx6-g++.

          1 Reply Last reply
          0
          • J juhvu

            I had this problem too. I modified "eglvivante.h" header under the sysroot and got it working. The "issue" here is that the #ifdef values in that header files are not set appropriately when you compile Qt with XCB support and you end up with inappropriate egl defines. In that file delete all but the X11 support (you can see quite clear main level #ifdef structure in the file).

            A Offline
            A Offline
            AnkurSatasiya
            wrote on last edited by
            #5

            @juhvu Thanks for this post. Now, I am able to compile build for imx6 sabreauto yocto build. But once build was created I am not able to boot. Kernel crashed with following error:

            Freeing unused kernel memory: 328K (80d13000 - 80d65000)
            Starting init: /sbin/init exists but couldn't execute it (error -20)
            EXT3-fs error (device mmcblk2p2): ext3_lookup: deleted inode referenced: 44677
            Starting init: /etc/init exists but couldn't execute it (error -5)
            Starting init: /bin/sh exists but couldn't execute it (error -20)
            Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
            CPU3: stopping
            CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.14.28-1.0.0_ga+g91cf351 #1
            [<800149f8>] (unwind_backtrace) from [<80011714>] (show_stack+0x10/0x14)
            [<80011714>] (show_stack) from [<806d6e40>] (dump_stack+0x7c/0xbc)
            [<806d6e40>] (dump_stack) from [<80013998>] (handle_IPI+0x144/0x158)
            [<80013998>] (handle_IPI) from [<80008598>] (gic_handle_irq+0x58/0x5c)
            [<80008598>] (gic_handle_irq) from [<80012200>] (__irq_svc+0x40/0x70)
            Exception stack(0xd80aff50 to 0xd80aff98)

            1 Reply Last reply
            0

            • Login

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