QT5 on IMX6 with xcb cross compile error
-
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]
-
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
@ -
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).
-
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-xcbi 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++. -
@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)