Build errors in cross compile Qt for embedded linux
-
wrote on 11 Jan 2016, 09:47 last edited by rahul3349 2 May 2016, 06:29
I always get below mentioned errors in qtbase and qtwayland when I cross compile code for embedded linux
Errors are mainly in below two categories,-
Related to header file include missing:
../../include/QtCore/../../src/corelib/io/qtextstream.h:46:2: error: #error qtextstream.h must be included before any header file that defines Status -
Related double defined types like Bool, KeyPress, KeyRelease, FontChange, CursorShape etc.
/home/rbhagwat/sources/temp/linux/include/X11/Xlib.h:86:14: error: expected identifier before 'int'
#define Bool int
full error log of qtbase is here
-
-
Hi,
Which version of Qt are you cross-compiling ?
For what platform/board ?
What options did you pass to configure ? -
wrote on 12 Jan 2016, 04:19 last edited by rahul3349 1 Dec 2016, 04:19
I've same issue with multiple Qt versions like 5.4.2, dev, Qt 5.6.0.
I'm building it for tegra platform./configure -platform linux-g++ -xplatform linux-tegra-g++ -pkg-config -no-directfb -no-linuxfb -eglfs -system-xcb -cups -nis -no-pch -largefile -accessibility -opengl -glib -icu -dbus -evdev -no-rpath -release -verbose -opensource -confirm-license -sysroot "$SYSROOT_DIR" -extprefix "$QtInstallDir"
-
I may be wrong but
-system-xcb
looks suspicious for a cross-compiling configuration. Do you have all these libs available for your target ? -
wrote on 12 Jan 2016, 09:05 last edited by rahul3349 1 Dec 2016, 09:06
Yes, I've all deps/libs in my sysroot, I'm able to cross compile Qt by resolving build errors. Problem is I need to create patches of fixing build issues and maintain it per Qt version.
I'm expecting, Qt should be built w/o any build errors. -
It should yes, that's why I'm thinking there something funky going one. Did you get the sources from git ?
-
wrote on 13 Jan 2016, 04:07 last edited by
Yes, I'm using source from git. Am I doing something wrong here?
-
No no, it was just to know where you got the sources from.
What distribution do you have on your sysroot ?
-
wrote on 14 Jan 2016, 09:00 last edited by
x11proto-kb-dev
x11proto-core-dev
x11proto-render-dev
libpcre3-dev
libxcb-render-util0-dev
libxau-dev
libxdmcp-dev
libpthread-stubs0-dev
libicu-dev
libxcb-util0-dev
libdbus-1-dev
libxcb-icccm4-dev
libxcb-image0-dev
libxcb-keysyms1-dev
libxext-dev
libxrender-dev
libx11-dev
libx11-xcb-dev
libexpat1-dev
libxcb-randr0-dev
libxcb-render0-dev
libxcb-shape0-dev
libxcb-shm0-dev
libxcb-xfixes0-dev
libfreetype6-dev
libglib2.0-dev
libfontconfig1-dev
libxcb1-dev
liborc-0.4-dev
libxrandr-dev
libxv-dev
libasound2-dev
libgstreamer1.0-dev
libgstreamer-plugins-base1.0-dev
libgstreamer-plugins-bad1.0-dev
libgstreamer-plugins-good1.0-dev
libxml2-dev
libjpeg8-dev
libjpeg-turbo8-dev
libc6-dev
libxkbcommon-dev
libffi-dev
libgettextpo-dev
gettext
libogg-dev
libvorbis0a
libvorbisenc2
libvorbis-dev
libvorbisfile3
libstdc++-4.8-dev
libxcb-xkb1
libxkbcommon-x11-dev
libevdev-dev
xserver-xorg-input-evdev-dev
libcups2-dev
nis
libxcb-sync-dev
libudev-dev
libcurl4-openssl-dev
openssl
libxcb-xkb-dev
libpulse-dev
libcap-dev
gperf
libgconf2-dev
libgcrypt11-dev
libgnome-keyring-dev
libnss3-dev
libpci-dev
libxtst-dev
python-gtk2-dev
libbz2-dev
libdrm-dev
libssl-dev
libxcursor-dev
libxcomposite-dev
libxdamage-dev
libxslt1-dev
libgeoclue-dev
libgypsy-dev
libjasper-dev
libmng-dev
libtiff5-dev
libwebp-dev
libxcb-xinerama0-dev -
But what Linux distribution are you using for your target sysroot ?
-
wrote on 20 Jan 2016, 04:06 last edited by
Ubuntu 15.04
-
Ubuntu on the target and as sysroot ?
-
wrote on 21 Jan 2016, 04:39 last edited by
Ubuntu 15.04 is on target. I created sysroot by downloading arm 64 bit deb packages to resolve all Qt dependencies on host.
-
One possibility is to add the QTextStream include where that error appears.
As for the X11 related errors, try moving the X11 includes after the Qt includes.
-
wrote on 27 Jan 2016, 10:56 last edited by
My intention behind starting this discussion is to avoid resolving build errors when I sync up or switch to new Qt version at my side. As I mentioned I've already resolved build errors and created patches for some Qt versions. But if those errors are fixed there itself as these are genuine build errors then developer do not have to resolve these errors for linux embedded platforms.
-
Did you submit your patches for inclusion in Qt ?
2/17