Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Cosik on October 27, 2014, 11:17:52 am

Title: [HowTo] Cross compile Qt5
Post by: Cosik on October 27, 2014, 11:17:52 am
1. Prepare Kernel

Information about how to compile your own kernel you could find in topic [HowTo] Enable full duplex SPI (https://www.olimex.com/forum/index.php?topic=3809.msg16053#msg16053)

TIP:
To get better effects of display quality you should uncomment this line in yours kernel source
https://github.com/mmplayer/linux-sunxi/blob/dev/sunxi-3.4/drivers/video/sunxi/disp/dev_fb.c#L1074 (https://github.com/mmplayer/linux-sunxi/blob/dev/sunxi-3.4/drivers/video/sunxi/disp/dev_fb.c#L1074)

2. Build Mali Binaries
tbd.

3. Cross compile Qt5
Before you start cross-compiling Qt5 you need to prepare dependencies on your target. First run:
sudo apt-get update
sudo apt-get upgrade

Now you need to install packages:
Basic Qt dependencies:


Dependencies for multimedia:


QtWebKit dependencies:


All of those packages should be allready installed in release 2 of A20-Lime image.

Prepare host:
If you have 64 bit linux, necessary will installation of 32bit libraries. 
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 libstdc++6:i386 ia32-libs

Next step is mounting rootfs of our OLinuXino board. To do it we need image of our SD card or mount root fs via ssh. In this tutorial I will mount rootfs to /mnt/a20.

Image coulde be mounted:
mount -o loop,offset=17825792 /home/cosik/a20_Lime_debian_3.4.90_release_2.img /mnt/a20/

Also we can mount root fs via ssh using command
sudo sshfs -o allow_other root@192.168.1.10:/ /mnt/a20/

Remember that you need to know ip of yours board or better set static ip for it.

Next step is prepare Qt5 sources for compiling. First we need to download a cross compile. In this tutorial I use linaro 4.8-2013.09 which could be find in this link https://releases.linaro.org/13.09/components/toolchain/binaries (https://releases.linaro.org/13.09/components/toolchain/binaries) or you could install arm-linux-gnueabihf package from repository.

No we need to fix symlinks to our Lime rootfs, so listed command shoul be executed:
git clone git://gitorious.org/cross-compile-tools/cross-compile-tools.git
cd cross-compile-tools
./fixQualifiedLibraryPaths /mnt/a20/ /home/cosik/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++


To fix script as arguments we write location of our rootfs and second location on g++ cross compiler.

Now it's time to download Qt source which could be find here http://qt-project.org/downloads (http://qt-project.org/downloads). Extract it and go to this directory in console.

Now we will add qmake config to support our Lime, so sould be executed some commands:
mkdir qtbase/mkspecs/devices/linux-a20olimex-g++/
cp qtbase/mkspecs/devices/linux-beagleboard-g++/qmake.conf qtbase/mkspecs/devices/linux-a20olimex-g++/
cp qtbase/mkspecs/devices/linux-beagleboard-g++/qplatformdefs.h qtbase/mkspecs/devices/linux-a20olimex-g++/


Now you need to open qtbase/mkspecs/devices/linux-a20olimex-g++/qmake.conf in your's favourite editor, replace content of this file with:
qplatformdefs.h (https://drive.google.com/file/d/0By-R7wZiBUI4Y1lhS2lSM1JFLWs/view?usp=sharing)

You need to remember to change rootfs if you used different than mine. Also if you have other cpu than Allwinner A20 you need to change mtune value, eg. for A10 it will be cortex-a8.

In this step we will patch EGLNativeWindowType QEglFSHooks::createNativeWindow function from qtbase/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp with:
qeglfshooks_stub.cpp (https://drive.google.com/file/d/0By-R7wZiBUI4aXBRblJLSE9QQ0E/view?usp=sharing)

Now it's time to configure our Qt source, so in qt directory:
./configure \
-opengl es2 \
-device linux-a20olimex-g++ \
-device-option CROSS_COMPILE=/home/cosik/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf- \
-sysroot /mnt/a20/ \
-opensource \
-confirm-license \
-optimized-qmake \
-release \
-make libs \
-prefix /opt/qt5.3.2olim2 \
-no-pch \
-nomake examples \
-nomake tests \
-no-xcb \
-eglfs \
-v


By prefix we set Qt installation directory.

After configuration passed, we could see summary in qtbase, this command should show very similar result to my
qtbase/config.summary (https://drive.google.com/file/d/0By-R7wZiBUI4MDhMZkFUcUFUTEE/view?usp=sharing)

Now we are ready for compile and install Qt
make -j 5 && sudo make install

And that's all.

4. Configure Qt Creator
[HowTo] Setting Up Qt Creator for cross compile (https://www.olimex.com/forum/index.php?topic=3826.0)

5. Test your board
tbd.

References:
Wick Wire blog (http://wickwire2099.blogspot.pt/)
Qt development on A20 topic (https://www.olimex.com/forum/index.php?topic=2666.msg12690#msg12690)
Title: Re: [HowTo] Cross compile Qt5
Post by: claudio on October 27, 2014, 03:32:49 pm
"Now you need to open qtbase/mkspecs/devices/linux-a20olimex-g++/qplatformdefs.h in your's favourite editor, replace content of this file with:
qplatformdefs.h"

Are You sure? That is the qmake file not "qplatfordefs.h"
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on October 27, 2014, 05:45:56 pm
Quote from: claudio on October 27, 2014, 03:32:49 pm
"Now you need to open qtbase/mkspecs/devices/linux-a20olimex-g++/qplatformdefs.h in your's favourite editor, replace content of this file with:
qplatformdefs.h"

Are You sure? That is the qmake file not "qplatfordefs.h"


Thank you, fixed ;)
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on November 14, 2014, 11:16:21 am
Hi Cosik

i have some problems with your part 3.
First, I do not get the same file config.summary as you.

Build options:
  Configuration .......... accessibility alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus egl eglfs evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib iconv icu inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis no-harfbuzz opengl opengles2 openssl pcre png posix_fallocate qpa qpa reduce_exports reduce_relocations release rpath shared small-config system-freetype system-png system-zlib xinput2 xlib xrender
  Build parts ............  libs
  Mode ................... release
  Using C++11 ............ yes
  Using PCH .............. no
  Target compiler supports:
    iWMMXt/Neon .......... no/auto

Qt modules and options:
  Qt D-Bus ............... yes (loading dbus-1 at runtime)
  Qt Concurrent .......... yes
  Qt GUI ................. yes
  Qt Widgets ............. yes
  Large File ............. yes
  JavaScriptCore JIT ..... yes (To be decided by JavaScriptCore)
  QML debugging .......... yes
  Use system proxies ..... no

Support enabled for:
  Accessibility .......... yes
  ALSA ................... yes
  CUPS ................... no
  FontConfig ............. yes
  FreeType ............... yes (system library)
  Glib ................... yes
  GTK theme .............. no
  HarfBuzz ............... no
  Iconv .................. yes
  ICU .................... yes
  Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using bundled copy)
    PNG .................. yes (in QtGui, using system library)
  journald ............... no
  mtdev .................. no
  Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
  NIS .................... yes
  OpenGL / OpenVG:
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.x)
    OpenVG ............... no
  PCRE ................... yes (bundled copy)
  pkg-config ............. yes
  PulseAudio ............. no
  QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. no
  Session management ..... yes
  SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
  udev ................... yes
  xkbcommon .............. no
  zlib ................... yes (system library)

NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
Configure with '-qreal float' to create a build that is binary compatible with 5.1.


Then, when compiling (make -j 5 && sudo make install), I have error at the end .Can they come from my bad config.summary or is it another problem?

aration/qt-everywhere-opensource-src-5.3.2/qtbase/lib -lQt5Gui -lQt5Core -lrt -ldl -lpthread -lGLESv2 -lEGL
ln -s libQt5Widgets.so.5.3.2 libQt5Widgets.so
ln -s libQt5Widgets.so.5.3.2 libQt5Widgets.so.5
ln -s libQt5Widgets.so.5.3.2 libQt5Widgets.so.5.3
rm -f ../../lib/libQt5Widgets.so.5.3.2
mv -f libQt5Widgets.so.5.3.2  ../../lib/
rm -f ../../lib/libQt5Widgets.so
rm -f ../../lib/libQt5Widgets.so.5
rm -f ../../lib/libQt5Widgets.so.5.3
mv -f libQt5Widgets.so ../../lib/
mv -f libQt5Widgets.so.5 ../../lib/
mv -f libQt5Widgets.so.5.3 ../../lib/
make[3]: quittant le répertoire « /home/preparation/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets »
make[2]: quittant le répertoire « /home/preparation/qt-everywhere-opensource-src-5.3.2/qtbase/src »
make[1]: *** [sub-src-make_first] Erreur 2
make[1]: quittant le répertoire « /home/preparation/qt-everywhere-opensource-src-5.3.2/qtbase »
make: *** [module-qtbase-make_first] Erreur 2


Thank you !
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on November 14, 2014, 11:17:16 am
otherwise,on your part 3
Basic Qt dependencies:

    libfontconfig1-dev
    ibdbus-1-dev
    libfreetype6-dev
    libudev-dev

   
add "l" at ibdbus-1-dev

and
64 bit linux, necessary will installation of 32bit libraries. it's necessary for me to add this

dpkg --add-architecture i386
apt-get install ia32-libs ia32-libs-gtk
apt-get update


before
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 libstdc++6:i386 ia32-libs


for the part 2 Mali driver you can follow :
http://linux-sunxi.org/Mali_binary_driver (http://linux-sunxi.org/Mali_binary_driver)
http://linux-sunxi.org/Xorg#fbturbo_driver (http://linux-sunxi.org/Xorg#fbturbo_driver)
For EGL/GLES:
https://www.olimex.com/forum/index.php?topic=1910.0 (https://www.olimex.com/forum/index.php?topic=1910.0)
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on November 14, 2014, 11:26:47 am
Hi,

First of all you need to make configure of Qt on clean directory, so if you have problem you need to remove Qt src directory and extract it one more time.

What is more, you should disable DBUS so add to configure commands -no-dbus. If you still have a problem write here and I will try to help.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on November 14, 2014, 12:55:40 pm
Re,

I retry to configure and compile , finally i have same error at the end of ma compilation .

make[3]: *** [.obj/qeglplatformcontext.o] Erreur 1
make[3]: leaving directory « /home/preparation/qt-everywhere-opensource-src-5.3.2/qtbase/src/platformsupport »
make[2]: *** [sub-platformsupport-make_first] Erreur 2
make[2]: leaving directory « /home/preparation/qt-everywhere-opensource-src-5.3.2/qtbase/src »
make[1]: *** [sub-src-make_first] Erreur 2
make[1]: leaving directory « /home/preparation/qt-everywhere-opensource-src-5.3.2/qtbase »
make: *** [module-qtbase-make_first] Erreur 2



But, my config.summary is different than my first try .


  Build parts ............  libs
  Mode ................... release
  Using C++11 ............ yes
  Using PCH .............. no
  Target compiler supports:
    iWMMXt/Neon .......... no/auto

Qt modules and options:
  Qt D-Bus ............... no
  Qt Concurrent .......... yes
  Qt GUI ................. yes
  Qt Widgets ............. yes
  Large File ............. yes
  QML debugging .......... yes
  Use system proxies ..... no

Support enabled for:
  Accessibility .......... yes
  ALSA ................... yes
  CUPS ................... no
  Evdev .................. yes
  FontConfig ............. no
  FreeType ............... yes (bundled copy)
  Glib ................... no
  GTK theme .............. no
  HarfBuzz ............... no
  Iconv .................. yes
  ICU .................... yes
  Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using bundled copy)
    PNG .................. yes (in QtGui, using system library)
  journald ............... no
  mtdev .................. no
  Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
  NIS .................... yes
  OpenGL / OpenVG:
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.x)
    OpenVG ............... no
  PCRE ................... yes (bundled copy)
  pkg-config ............. no
  PulseAudio ............. no
  QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. no
  Session management ..... yes
  SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
  udev ................... yes
  xkbcommon .............. no
  zlib ................... yes (system library)

Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on November 14, 2014, 04:55:45 pm
Ok, now please run in qt dir make with single thread and return me whole error output, because here are only last lines.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on November 17, 2014, 05:19:43 pm
that's the result of my last make :

https://drive.google.com/file/d/0B-9HldMPXk75Q0I1aDAxamh2WW8/view?usp=sharing (https://drive.google.com/file/d/0B-9HldMPXk75Q0I1aDAxamh2WW8/view?usp=sharing)
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 04, 2014, 04:28:19 pm
UP
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 04, 2014, 06:32:20 pm
Did you try to remove whole qt src directory and run whole again from beginning?

Also are you sure that compilation passed?
Title: Re: [HowTo] Cross compile Qt5
Post by: EricZ89 on December 04, 2014, 06:36:07 pm
Hi Cosik,
Thanks for providing steps on how to correctly cross compile Qt5.

I am using a slight variation to what you have posted, but have found your tutorial more helpful than everything else that I have read on the web. The two variations I am using are:
1) Building Qt in an Open-Embedded environment from the open-source package provided by Qt-project.
2) Building for the TI am335x processor using ARM.

What brought me to your thread on this forum, is that I am able to build every Qt package perfectly, exceptwhen I enable (-eglfs) as a configuration option. The two errors I get during compile are:
1) qtbase-opensource-src-5.3.2/src/corelib/io/qtextstream.h:54:2: error: #error qtextstream.h must be included before any header file that defines Status
qtbase-opensource-src-5.3.2/src/corelib/io/qtextstream.h:80:10: error: expected identifier before 'int'
2) qtbase-opensource-src-5.3.2/src/corelib/io/qurl.h:139:9: error: expected identifier before numeric constant
qtbase-opensource-src-5.3.2/src/corelib/io/qurl.h:139:9: error: expected '}' before numeric constant

I am not a Qt expert, but if I had to point my finger on the problem, it would be the qmake.conf and qplatformdef.h file that are being used by default are incorrect. The Qt open source package by default will use a qmake.conf and qplatformdef.h file that does not include any statements for EGLFS.

The qmake.conf file from the linux-beagleboard-g++ includes items like QT_QPA_DEFAULT_PLATFORM = eglfs,, QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um, and QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}. I know I need these items configured in my qmake.conf if I want to have EGLFS enabled. So I am closely following your steps as this provides me with these configuration statements in qmake.conf that I need.

Looking at your config.summary, I was wondering if you could provide me with a few more details. In my 'Build Options:', I am seeing that egl, egl_x11, and eglfs is present. My configuration is auto_detecting egl_x11. I do not want any x11 option enabled. I am not sure if this is the direct cause of my error, but I was wondering if you knew any tricks how to disable this.

Lastly, in my configure summary, I see two items:
1. Example - Building on: linux-oe-g++ (arm, CPU features: neon)
       or -  Building on: linux-g++ (x86_64, CPU features: mxx sse sse2)
2. Example - Building for: linux-oe-g++ (arm, CPU features: neon)
In your config.summary, I do not see these two items listed. I would like to make sure that my 'Build on/for' configurations are similar to yours.

Thanks for the help!
     

Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 04, 2014, 07:05:47 pm
Quote from: Cosik on December 04, 2014, 06:32:20 pm
Did you try to remove whole qt src directory and run whole again from beginning?

Also are you sure that compilation passed?


i'm not sure to understand, but each time I retry, I remove my "qt-everywhere-opensource-src-5.3.2" directory and I retry step when modify  qeglfshooks_stub.cpp and copy qmakeconf on linux-a20olimex-g++ that's right ?

When you said "Also are you sure that compilation passed?" did talk about ./configure or make or make install ,my compilation has blocked at "make"
Title: Re: [HowTo] Cross compile Qt5
Post by: EricZ89 on December 05, 2014, 05:19:32 pm
Hi Cosik,
On October 10th, you posted on the qt-project forums the same qtextstream.h and qurl.h errors that I am having.
http://qt-project.org/forums/viewthread/48355
No solution was given on that thread. You had posted that you were using linaro v4.7 toolchain.

I notice in this tutorial thread (posted on October 27th), you have updated your linaro toolchain version.
Did switching to linaro v4.8 of the toolchain solve this problem?

Thanks in advance for your help.

Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 05, 2014, 05:51:11 pm
Hi all,

@habanas please split command, and please show me output of make not make && make install.

@EricZ89 I didn't remember exactly what help. You need to have disabled d-bus, do everything always from begining because it also cause problems. Also you should use one type of graphic support.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 08, 2014, 06:01:29 pm
Hi Cosik
that's my command and result of ./configure , make and make install

./configure -opengl es2 -device linux-a20olimex-g++ -device-option CROSS_COMPILE=/home/preparation/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf- -sysroot /mnt/a20/ -opensource -confirm-license -optimized-qmake -release -make libs -prefix /opt/qt5.3.2olim2 -no-pch -nomake examples -nomake tests -no-xcb -eglfs -v >logconf.log 2>&1
result (logconf.log) :
https://drive.google.com/file/d/0B-9HldMPXk75SlktTFhVUVA0MFk/view?usp=sharing (https://drive.google.com/file/d/0B-9HldMPXk75SlktTFhVUVA0MFk/view?usp=sharing)
and config.summary :
https://drive.google.com/file/d/0B-9HldMPXk75ZHNPMDR5bmxERHM/view?usp=sharing (https://drive.google.com/file/d/0B-9HldMPXk75ZHNPMDR5bmxERHM/view?usp=sharing)

make >makeconf.log 2>&1 -> result (makeconf.log) :
https://drive.google.com/file/d/0B-9HldMPXk75eVl6bHVobmNxT1k/view?usp=sharing (https://drive.google.com/file/d/0B-9HldMPXk75eVl6bHVobmNxT1k/view?usp=sharing)

make install >installconf.log 2>&1 -> result (installconf.log):
https://drive.google.com/file/d/0B-9HldMPXk75TjNGWk44d2Fmc28/view?usp=sharing (https://drive.google.com/file/d/0B-9HldMPXk75TjNGWk44d2Fmc28/view?usp=sharing)
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 09, 2014, 11:15:06 pm
Hi,

Sorry but I still didn't see anything usefully in this log. I don't know solution of yours problem.

Last thing which you could try is update libc on Lime to version equal or higher to version of your PC.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 10, 2014, 10:40:05 am
Ok thanks for your try Cosik :)
I'm going to try update  libc on my board .
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 10, 2014, 10:43:57 am
So pleas show version of libc on yours PC and Lime before update. If it will help please also let me know. It will mean that this step is also necessary.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 10, 2014, 11:02:28 am
How or where i can find my libc version  i try to search on /lib/* but i cant find libc on my PC or Lime .
And obviously if I progress i will come back to post solution .
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 10, 2014, 11:05:51 am
Quote from: habanas on December 10, 2014, 11:02:28 am
How or where i can find my libc version  i try to search on /lib/* but i cant find libc on my PC or Lime .
And obviously if I progress i will come back to post solution .


You could do it with aptitude:
aptitude show libc6

or dpkg:
dpkg -l | grep libc6
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 10, 2014, 11:21:34 am
result on my Lime :

aptitude show libc6
Package: libc6
State: installed
Automatically installed: no
Multi-Arch: same
Version: 2.13-38+deb7u6
Priority: required
Section: libs
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: armhf
Uncompressed Size: 8,305 k
Depends: libc-bin (= 2.13-38+deb7u6), libgcc1
Suggests: glibc-doc, debconf | debconf-2.0, locales
Conflicts: prelink (<= 0.0.20090311-1), tzdata (< 2007k-1), tzdata-etch
Breaks: locales (< 2.13), locales-all (< 2.13), nscd (< 2.13)
Provides: glibc-2.13-1
Description: Embedded GNU C Library: Shared libraries
Contains the standard libraries that are used by nearly all programs on the
system. This package includes shared versions of the standard C library and the
standard math library, as well as many others.
Homepage: http://www.eglibc.org


root@a20-OLinuXino:~# dpkg -l | grep libc6
ii  libc6:armhf                           2.13-38+deb7u6                     armhf        Embedded GNU C Library: Shared libraries
ii  libc6-dev:armhf                       2.13-38+deb7u6                     armhf        Embedded GNU C Library: Development Libraries and Header Files


result on my PC

aptitude show libc6
Paquet : libc6                               
État: installé
Automatiquement installé: non
Multiarchitecture : même
Version : 2.13-38+deb7u6
Priorité : nécessaire
Section : libs
Responsable : GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture : amd64
Taille décompressée : 9 687 k
Dépend: libc-bin (= 2.13-38+deb7u6), libgcc1
Suggère: glibc-doc, debconf | debconf-2.0, locales
Est en conflit: prelink (<= 0.0.20090311-1), prelink (<=
                0.0.20090311-1), tzdata (< 2007k-1), tzdata (<
                2007k-1), tzdata-etch, tzdata-etch
Casse: locales (< 2.13), locales (< 2.13), locales-all (< 2.13),
       locales-all (< 2.13), lsb-core (<= 3.2-27), lsb-core (<=
       3.2-27), nscd (< 2.13), nscd (< 2.13), libc6 (!= 2.13-38+deb7u6)
Remplace: libc6-amd64, libc6-amd64, libc6 (< 2.13-38+deb7u6)
Fournit: glibc-2.13-1
Description : Embedded GNU C Library: Shared libraries
Contains the standard libraries that are used by nearly all programs
on the system. This package includes shared versions of the standard C
library and the standard math library, as well as many others.
Site : http://www.eglibc.org


root@debian:/home/p# dpkg -l | grep libc6
ii  libc6:amd64                           2.13-38+deb7u6                     amd64        Embedded GNU C Library: Shared libraries
ii  libc6:i386                            2.13-38+deb7u6                     i386         Embedded GNU C Library: Shared libraries
ii  libc6-armhf-cross                     2.13-38                            all          Embedded GNU C Library: Shared libraries (for cross-compiling)
ii  libc6-dev:amd64                       2.13-38+deb7u6                     amd64        Embedded GNU C Library: Development Libraries and Header Files
ii  libc6-dev-armhf-cross                 2.13-38                            all          Embedded GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii  libc6-i386                            2.13-38+deb7u6                     amd64        Embedded GNU C Library: 32-bit shared libraries for AMD64
ii  libc6-i686:i386                       2.13-38+deb7u6                     i386         Embedded GNU C Library: Shared libraries [i686 optimized]

Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 10, 2014, 11:27:39 am
Hmmm, I compiled it with libc6 2.19, you could try to update it, but I'm not sure if it will help.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 10, 2014, 12:37:42 pm
i'm trying to update libc6 but there can't up to 2.19
i need to remove and reinstall libc6 ?
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 10, 2014, 01:24:01 pm
ok
just add
deb http://ftp.de.debian.org/debian sid main  to  /etc/apt/sources.list
and  update, upgrade
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on December 10, 2014, 09:59:03 pm
Quote from: habanas on December 10, 2014, 01:24:01 pm
ok
just add
deb http://ftp.de.debian.org/debian sid main  to  /etc/apt/sources.list
and  update, upgrade


hmmm, I think that was not so good idea. Is yours board still running?
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on December 11, 2014, 10:40:30 am
it's the only one solution I've found to update libc6 on my Pc and Lime
So, now i've same libc6 v 2.19 on my board and PC I'm going to try recompile :)
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on January 15, 2015, 10:29:34 am
alright !
Christmas has passed so i return on my compilation.
after update my libc6 i'm trying to recompile, but again i have same error at the compilation.
So I trying to reproduce u'r step on linux debian 32 bits (not 64 bits) and I dont know why ? it finally works fine .

thank you very much for your help cosik .
Title: Re: [HowTo] Cross compile Qt5
Post by: sm2wmv on March 13, 2015, 02:30:08 am
I am having trouble with this when trying to compile QT5.

Running configuration tests...
Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set.
Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
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

I am not able to find or figure out how to get or build the opengl es2 libs for ARM.

How I configure,
./configure -opengl es2 -device linux-olimex-am335x-g++ -device-option CROSS_COMPILE=/home/micke/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf- -opensource -confirm-license -optimized-qmake -reduce-exports -debug -make libs -prefix /opt/qt5.3.2

I want to get a cross compilation version of QT for the new AM3352 board so I can remote deploy the QT applications.
Title: Re: [HowTo] Cross compile Qt5
Post by: habanas on March 17, 2015, 10:33:14 am
Can you send your qmake configuration
So for install opengl es2 you can use this link : http://linux-sunxi.org/Mali_binary_driver (http://linux-sunxi.org/Mali_binary_driver) and folow each step.

Title: Re: [HowTo] Cross compile Qt5
Post by: sajmon5544 on March 17, 2015, 02:43:44 pm
Hi guys.

I've managed to build Qt5 library (5.4.1) on A20 Lime2 board.
I'm using A20-OLinuXino-Lime Debian with kernel 3.4.90+ release 3 system.

When I try to run any qml app (bin/qml app in the qt instalation dir) i get
Could not initialize egl display
Aborted


I'm sure I'm missing something.

Thanks for great tutorial.

@EDIT
Ok, I had X11 mali driver version, instead of framebuffer one.
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on March 17, 2015, 06:31:17 pm
Quote from: sajmon5544 on March 17, 2015, 02:43:44 pm
Ok, I had X11 mali driver version, instead of framebuffer one.


So if you want to use X11 drivers instead of framebuffer you should compile mali drivers with proper option.

Here you have information how to do it http://linux-sunxi.org/Mali_binary_driver
Title: Re: [HowTo] Cross compile Qt5
Post by: Kafanti on August 21, 2015, 04:05:45 pm
Hey Cosik,

Thanks for your guide. I followed it but I got compilation errors on building phase. I guess it is not possible to understand exact reason but maybe you might have an idea.

I am trying to compile qtbase first, here it is my configurations:

./configure -v -opengl es2 -device linux-sunxi-g++ -device-option CROSS_COMPILE=~/opt/gcc-linaro-arm-linux-gnueabihf-2012.09-20120921_linux/bin/arm-linux-gnueabihf- -sysroot /mnt/rootfs -opensource -confirm-license -qt-zlib -qt-xcb -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5ox 2>&1 | tee "confout21agu201209.txt"

And after configuration phase, when I start to compile it here is my logs when it fails,

arm-linux-gnueabihf-g++ -c -pipe -I /mnt/lime-rootfs/usr/include -I /mnt/lime-rootfs/usr/include/arm-linux-gnueabihf -marm -march=armv7-a -mtune=cortex-a8 -mfloat-abi=hard --sysroot=/mnt/lime-rootfs -g -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_XKB -DQT_NO_CAST_FROM_ASCII -DMESA_EGL_NO_X11_HEADERS -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DQT_BUILD_PLATFORMSUPPORT_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_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I../3rdparty/freetype/builds/unix -I../3rdparty/freetype/src -I../3rdparty/freetype/include -Iaccessibility -I../3rdparty/atspi2 -Ilinuxaccessibility -I../../include -I../../include/QtPlatformSupport -I../../include/QtPlatformSupport/5.4.2 -I../../include/QtPlatformSupport/5.4.2/QtPlatformSupport -I../../include/QtCore/5.4.2 -I../../include/QtCore/5.4.2/QtCore -I../../include/QtGui/5.4.2 -I../../include/QtGui/5.4.2/QtGui -I../../include/QtGui -I../../include/QtDBus -I../../include/QtCore -I.moc -I../../mkspecs/devices/linux-sunxi-g++ -o .obj/qeglplatformcursor.o eglconvenience/qeglplatformcursor.cpp
eglconvenience/qeglplatformcursor.cpp: In member function 'bool QEGLPlatformCursor::setCurrentCursor(QCursor*)':
eglconvenience/qeglplatformcursor.cpp:234:15: error: expected unqualified-id before numeric constant
eglconvenience/qeglplatformcursor.cpp:235:27: error: 'newShape' was not declared in this scope
eglconvenience/qeglplatformcursor.cpp:242:22: error: 'newShape' was not declared in this scope
Makefile:4370: recipe for target '.obj/qeglplatformcursor.o' failed
make[3]: *** [.obj/qeglplatformcursor.o] Error 1
make[3]: Leaving directory '/home/sina/qt-src/qt-everywhere-opensource-src-5.4.2/qtbase/src/platformsupport'
Makefile:473: recipe for target 'sub-platformsupport-make_first' failed
make[2]: *** [sub-platformsupport-make_first] Error 2
make[2]: Leaving directory '/home/sina/qt-src/qt-everywhere-opensource-src-5.4.2/qtbase/src'
Makefile:45: recipe for target 'sub-src-make_first' failed
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory '/home/sina/qt-src/qt-everywhere-opensource-src-5.4.2/qtbase'
Makefile:60: recipe for target 'module-qtbase-make_first' failed
make: *** [module-qtbase-make_first] Error 2


I am not sure what is it matter, but maybe dependency issue :S ?

Btw here is the line 234,

const Qt::CursorShape newShape = cursor ? cursor->shape() : Qt::ArrowCursor;

Thanks,
Sina



Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on August 21, 2015, 04:40:22 pm
Hi Sina,

It's very old topic, I didn't cross compile Qt from that time frame, but I will try to help you.

I think that I had some similar problem but I didn't remember solution, but try to deduce.

First thing, how many times did you cross compile Qt on this sources?
Title: Re: [HowTo] Cross compile Qt5
Post by: Kafanti on August 21, 2015, 04:57:51 pm
Hey Cosik,

Atleast I am happy I am not the only one who has that error :).

And as an answer to your question, I do always remove the whole qt source tree and untar again. So I do always work with a clean source codes.

First I just thought that might be a problem because of my crosstoolchain but I have tried the different one but the result is same. Also I have tried native compilation on the board but result is the same :S.

I am suspecting if an header file with symbolic constants have same name with an identifier might change the source code which comes from the board headers, but could not be able to find it out.

If you would be able to remember your solution I would be really heppy :).

Thank you Cosik,
Sina
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on August 21, 2015, 05:16:22 pm
Ok, next steps:

Could you somehow include here yours Qt config file after configuration, and all output information from compilation?
Title: Re: [HowTo] Cross compile Qt5
Post by: Kafanti on August 21, 2015, 05:44:25 pm
Yes ofcourse, I was piping the whole stderr and stdout to .txt to check the process :)

here is the dropbox link to files, you can view them over this link,

https://www.dropbox.com/sh/rruds4py29h8at4/AAA8Y9CU5G0fCqLK0L92lJS3a?dl=0

Thank you,
Sina
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on August 21, 2015, 07:57:54 pm
Question: do you need support for DBus?

If not please try to disable it during configuration and then try to compile sources.
Title: Re: [HowTo] Cross compile Qt5
Post by: Kafanti on August 24, 2015, 10:57:23 am
Well, I guess I do not need DBus support.

And I just tried new clean build with -no-dbus option but same result :S
Title: Re: [HowTo] Cross compile Qt5
Post by: TCash on September 11, 2015, 10:28:47 pm
Thanks for this great tutorial!

I have been able to successfully cross compile qt 5.5 with the LIME2.  I am using the 20140116-mali-r3p2-01rel2 branch off of ssvb's linux-sunxi kernal. (https://github.com/ssvb/linux-sunxi).  I also have patched qeglfshooks_stub.cpp with the file at the beginning of this thread before compiling Qt:
EGLNativeWindowType QEglFSHooks::createNativeWindow(QPlatformWindow *platformWindow,
                                                    const QSize &size,
                                                    const QSurfaceFormat &format)
{
    Q_UNUSED(platformWindow);
    Q_UNUSED(size);
    Q_UNUSED(format);
    //return 0;

    static struct mali_native_window native_window = {
        .width = (short unsigned int)size.width(),
        .height = (short unsigned int)size.height(),
    };
    return &native_window;
}


I have also run through the mali binary deployment by running through this guide: http://linux-sunxi.org/Mali_binary_driver.  So I have the mali libraries configured with EGL_TYPE=framebuffer using r3p2-01rel2 drivers.

However when running my qt apps I still get this error at runtime:
Could not create the egl surface: error = 0x300b

For my cross compiler I'm using arm-linux-gnueabihf-g++ 4.8


any ideas?  At the moment I'm trying to compile qt 5.3 instead to see if it makes a difference.
Our goal is to get qt working with egl on both frame-buffers.

Thanks!


UPDATE: I found I was overriding all of qeglfshooks.cpp with only the patched code and not actually editing the file internally this fixed the 0x300b error.  I should not that in Qt 5.5 instead of patching qeglfshooks.cpp, patching qtbase/src/plugins/platforms/eglfs/qeglfsdeviceintegration.cpp. 
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on September 20, 2015, 07:46:58 pm
Quote from: Kafanti on August 24, 2015, 10:57:23 am
Well, I guess I do not need DBus support.

And I just tried new clean build with -no-dbus option but same result :S


Hi Kafanti,

I have no idea. I will try to compile source again, but my setup is in pieces and I have some other projects, what is more I just come back from vacation. I will try to inform you when I will have some results.
Title: Re: [HowTo] Cross compile Qt5
Post by: Sohaib Manzoor on November 11, 2015, 03:33:16 pm
Hi all

i am trying to build QT5 using this tutorial and i am able to completely build and install all Qt packages but when i try to compile the last command  i.e.  " make -j 5 && sudo make install " i get the following error at the end

../../../../include/QtCore/../../../qtbase-opensource-src-5.3.2/src/corelib/io/qurl.h:139:9: error: expected identifier before numeric constant
    ../../../../include/QtCore/../../../qtbase-opensource-src-5.3.2/src/corelib/io/qurl.h:139:9: error: expected '}' before numeric constant
    ../../../../include/QtCore/../../../qtbase-opensource-src-5.3.2/src/corelib/io/qurl.h:139:9: error: expected unqualified-id before numeric constant
    ../../../../include/QtCore/../../../qtbase-opensource-src-5.3.2/src/corelib/io/qurl.h:171:26: error: 'UrlFormattingOption' was not declared in this scope

Please I need some help here, because currently I'm stuck.. i have disabled d-bus and did everything from start, yet the results are same..


Here are my build environment details:

-Target system: arm-linux-gnueabihf

-OS: Ubuntu-14.04

-Build system: i386-linux

-Embedded machine: A20 olinuxino micro 4gb
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on November 11, 2015, 04:01:16 pm
Hi Sohaib Manzoor,

Which processor do you have or how many cores do you have?

Please execute only make and then please show output.
Title: Re: [HowTo] Cross compile Qt5
Post by: Sohaib Manzoor on November 12, 2015, 12:51:16 pm
Hey Cosik, I'm using A20-4GB MICRO. This is my ./configure output:

Configure summary

Building on:   linux-g++ (i386, CPU features:)
Building for:  devices/linux-a20olimex-g++ (arm, CPU features: neon)
Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
       
qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV QT_CFLAGS_DBUS = -I/mnt/a20//usr/include/dbus-1.0 -I/mnt/a20//usr/lib/arm-linux-gnueabihf/dbus-1.0/include   QT_LIBS_DBUS = -L/mnt/a20//usr/lib/arm-linux-gnueabihf -ldbus-1   QT_CFLAGS_GLIB = -pthread -I/mnt/a20//usr/include/glib-2.0 -I/mnt/a20//usr/lib/arm-linux-gnueabihf/glib-2.0/include   QT_LIBS_GLIB = -pthread -L/mnt/a20//usr/lib/arm-linux-gnueabihf -lgthread-2.0 -lrt -lglib-2.0   QT_CFLAGS_PULSEAUDIO = -D_REENTRANT -I/mnt/a20//usr/include/glib-2.0 -I/mnt/a20//usr/lib/arm-linux-gnueabihf/glib-2.0/include   QT_LIBS_PULSEAUDIO = -L/mnt/a20//usr/lib/arm-linux-gnueabihf -lpulse-mainloop-glib -lpulse -lglib-2.0   QMAKE_CFLAGS_FONTCONFIG = -I/mnt/a20//usr/include/freetype2   QMAKE_LIBS_FONTCONFIG = -L/mnt/a20//usr/lib/arm-linux-gnueabihf -lfontconfig -lfreetype   QMAKE_INCDIR_LIBUDEV =   QMAKE_LIBS_LIBUDEV = -ludev   DEFINES += QT_NO_XCB DEFINES += QT_NO_XKBCOMMON sql-drivers =  sql-plugins =  sqlite qmake switches .........

Build options:
  Configuration .......... accessibility alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus egl eglfs evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib iconv icu inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap neon nis no-harfbuzz opengl opengles2 openssl pcre png posix_fallocate pulseaudio qpa qpa reduce_exports reduce_relocations release rpath shared small-config system-freetype system-png system-zlib xlib
  Build parts ............  libs
  Mode ................... release
  Using C++11 ............ yes
  Using PCH .............. no
  Target compiler supports:
    iWMMXt/Neon .......... no/yes

Qt modules and options:
  Qt D-Bus ............... yes (loading dbus-1 at runtime)
  Qt Concurrent .......... yes
  Qt GUI ................. yes
  Qt Widgets ............. yes
  JavaScriptCore JIT ..... yes (To be decided by JavaScriptCore)
  QML debugging .......... yes
  Use system proxies ..... no

Support enabled for:
  Accessibility .......... yes
  ALSA ................... yes
  CUPS ................... no
  FontConfig ............. yes
  FreeType ............... system
  Iconv .................. yes
  ICU .................... yes
  Image formats:
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using bundled copy)
    PNG .................. yes (in QtGui, using system library)
  Glib ................... yes
  GTK theme .............. no
  Large File ............. yes
  mtdev .................. no
  Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
  NIS .................... yes
  OpenGL ................. yes (OpenGL ES 2.x)
  OpenVG ................. no
  PCRE ................... yes (bundled copy)
  pkg-config ............. yes
  PulseAudio ............. yes
  QPA backends:
    DirectFB ............. no
    EGLFS ................ yes
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. no
  Session management ..... yes
  SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
  udev ................... yes
  xkbcommon .............. no
  zlib ................... yes (system library)

NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
Configure with '-qreal float' to create a build that is binary compatible with 5.1.
Info: creating super cache file /home/sti/Downloads/qt-everywhere-opensource-src-5.2.1/.qmake.super

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /usr/local/a20files

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.



And this is the make output:


                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:348:24: warning: 'QStringList idnWhitelist()' declared 'static' but never defined [-Wunused-function]
     static QStringList idnWhitelist();
                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:349:24: warning: 'QStringList toStringList(const QList<QUrl>&, FormattingOptions)' declared 'static' but never defined [-Wunused-function]
     static QStringList toStringList(const QList<QUrl> &uris, FormattingOptions options = FormattingOptions(PrettyDecoded));
                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:350:24: warning: 'QList<QUrl> fromStringList(const QStringList&, int)' declared 'static' but never defined [-Wunused-function]
     static QList<QUrl> fromStringList(const QStringList &uris, ParsingMode mode = TolerantMode);
                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:352:17: warning: 'void setIdnWhitelist(const QStringList&)' declared 'static' but never defined [-Wunused-function]
     static void setIdnWhitelist(const QStringList &);
                 ^
make[5]: *** [.obj/qeglfsintegration.o] Error 1
make[5]: Leaving directory `/home/sti/Downloads/qt-everywhere-opensource-src-5.2.1/qtbase/src/plugins/platforms/eglfs'
make[4]: *** [sub-eglfs-make_first] Error 2
make[4]: Leaving directory `/home/sti/Downloads/qt-everywhere-opensource-src-5.2.1/qtbase/src/plugins/platforms'
make[3]: *** [sub-platforms-make_first] Error 2
make[3]: Leaving directory `/home/sti/Downloads/qt-everywhere-opensource-src-5.2.1/qtbase/src/plugins'
make[2]: *** [sub-plugins-make_first] Error 2
make[2]: Leaving directory `/home/sti/Downloads/qt-everywhere-opensource-src-5.2.1/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/sti/Downloads/qt-everywhere-opensource-src-5.2.1/qtbase'
make: *** [module-qtbase-make_first] Error 2
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on November 12, 2015, 01:23:16 pm
In your output only warnings are visible. Please execute only 'make' not 'make -j 5'.

If you are using A20 for compile you should not use -j 5 because A20 have only 2 cores.
Title: Re: [HowTo] Cross compile Qt5
Post by: Sohaib Manzoor on November 12, 2015, 02:58:18 pm
I executed only make, as instructed in the output of ./configure. Please scroll down for the errors "make" outputs. The make command stops after those errors. Here are the errors coming before the warnings:
from qeglfsintegration.cpp:49:
../../../../include/QtCore/../../src/corelib/io/qurl.h:171:26: error: 'UrlFormattingOption' was not declared in this scope
     typedef QUrlTwoFlags<UrlFormattingOption, ComponentFormattingOption> FormattingOptions;
                          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:171:72: error: template argument 1 is invalid
     typedef QUrlTwoFlags<UrlFormattingOption, ComponentFormattingOption> FormattingOptions;
                                                                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:171:91: error: invalid type in declaration before ';' token
     typedef QUrlTwoFlags<UrlFormattingOption, ComponentFormattingOption> FormattingOptions;
                                                                                           ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:174:10: error: expected unqualified-id before ')' token
     QUrl();
          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:175:10: error: expected unqualified-id before 'const'
     QUrl(const QUrl &copy);
          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:175:10: error: expected ')' before 'const'
../../../../include/QtCore/../../src/corelib/io/qurl.h:176:38: error: 'QUrl& operator=(const QUrl&)' must be a nonstatic member function
     QUrl &operator =(const QUrl &copy);
                                      ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:180:10: error: expected unqualified-id before 'const'
     QUrl(const QString &url, ParsingMode mode = TolerantMode);
          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:180:10: error: expected ')' before 'const'
../../../../include/QtCore/../../src/corelib/io/qurl.h:181:39: error: 'QUrl& operator=(const QString&)' must be a nonstatic member function
     QUrl &operator=(const QString &url);
                                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:184:15: error: expected ')' before '&&' token
     QUrl(QUrl &&other) : d(0)
               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:186:40: error: 'QUrl& operator=(QUrl&&)' must be a nonstatic member function
     inline QUrl &operator=(QUrl &&other)
                                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:189:12: error: expected constructor, destructor, or type conversion before ';' token
     ~QUrl();
            ^
../../../../include/QtCore/../../src/corelib/io/qurl.h: In function 'void swap(QUrl&)':
../../../../include/QtCore/../../src/corelib/io/qurl.h:191:43: error: 'd' was not declared in this scope
     inline void swap(QUrl &other) { qSwap(d, other.d); }
                                           ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:191:52: error: 'class QUrl' has no member named 'd'
     inline void swap(QUrl &other) { qSwap(d, other.d); }
                                                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h: At global scope:
../../../../include/QtCore/../../src/corelib/io/qurl.h:193:37: error: 'ParsingMode' has not been declared
     void setUrl(const QString &url, ParsingMode mode = TolerantMode);
                                     ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:193:56: error: 'TolerantMode' was not declared in this scope
     void setUrl(const QString &url, ParsingMode mode = TolerantMode);
                                                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:194:79: error: non-member function 'QString url(FormattingOptions)' cannot have cv-qualifier
     QString url(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
                                                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:195:84: error: non-member function 'QString toString(FormattingOptions)' cannot have cv-qualifier
     QString toString(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
                                                                                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:196:91: error: non-member function 'QString toDisplayString(FormattingOptions)' cannot have cv-qualifier
     QString toDisplayString(FormattingOptions options = FormattingOptions(PrettyDecoded)) const;
                                                                                           ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:197:46: error: non-member function 'QUrl adjusted(FormattingOptions)' cannot have cv-qualifier
     QUrl adjusted(FormattingOptions options) const;
                                              ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:199:68: error: non-member function 'QByteArray toEncoded(FormattingOptions)' cannot have cv-qualifier
     QByteArray toEncoded(FormattingOptions options = FullyEncoded) const;
                                                                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:200:52: error: 'ParsingMode' has not been declared
     static QUrl fromEncoded(const QByteArray &url, ParsingMode mode = TolerantMode);
                                                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:200:71: error: 'TolerantMode' was not declared in this scope
     static QUrl fromEncoded(const QByteArray &url, ParsingMode mode = TolerantMode);
                                                                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:204:20: error: non-member function 'bool isValid()' cannot have cv-qualifier
     bool isValid() const;
                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:205:27: error: non-member function 'QString errorString()' cannot have cv-qualifier
     QString errorString() const;
                           ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:207:20: error: non-member function 'bool isEmpty()' cannot have cv-qualifier
     bool isEmpty() const;
                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:211:22: error: non-member function 'QString scheme()' cannot have cv-qualifier
     QString scheme() const;
                      ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:213:49: error: 'ParsingMode' has not been declared
     void setAuthority(const QString &authority, ParsingMode mode = TolerantMode);
                                                 ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:213:68: error: 'TolerantMode' was not declared in this scope
     void setAuthority(const QString &authority, ParsingMode mode = TolerantMode);
                                                                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:214:75: error: non-member function 'QString authority(ComponentFormattingOptions)' cannot have cv-qualifier
     QString authority(ComponentFormattingOptions options = PrettyDecoded) const;
                                                                           ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:216:47: error: 'ParsingMode' has not been declared
     void setUserInfo(const QString &userInfo, ParsingMode mode = TolerantMode);
                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:216:66: error: 'TolerantMode' was not declared in this scope
     void setUserInfo(const QString &userInfo, ParsingMode mode = TolerantMode);
                                                                  ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:217:74: error: non-member function 'QString userInfo(ComponentFormattingOptions)' cannot have cv-qualifier
     QString userInfo(ComponentFormattingOptions options = PrettyDecoded) const;
                                                                          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:219:47: error: 'ParsingMode' has not been declared
     void setUserName(const QString &userName, ParsingMode mode = DecodedMode);
                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:219:66: error: 'DecodedMode' was not declared in this scope
     void setUserName(const QString &userName, ParsingMode mode = DecodedMode);
                                                                  ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:220:73: error: non-member function 'QString userName(ComponentFormattingOptions)' cannot have cv-qualifier
     QString userName(ComponentFormattingOptions options = FullyDecoded) const;
                                                                         ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:222:47: error: 'ParsingMode' has not been declared
     void setPassword(const QString &password, ParsingMode mode = DecodedMode);
                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:222:66: error: 'DecodedMode' was not declared in this scope
     void setPassword(const QString &password, ParsingMode mode = DecodedMode);
                                                                  ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:223:65: error: non-member function 'QString password(ComponentFormattingOptions)' cannot have cv-qualifier
     QString password(ComponentFormattingOptions = FullyDecoded) const;
                                                                 ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:225:39: error: 'ParsingMode' has not been declared
     void setHost(const QString &host, ParsingMode mode = DecodedMode);
                                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:225:58: error: 'DecodedMode' was not declared in this scope
     void setHost(const QString &host, ParsingMode mode = DecodedMode);
                                                          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:226:61: error: non-member function 'QString host(ComponentFormattingOptions)' cannot have cv-qualifier
     QString host(ComponentFormattingOptions = FullyDecoded) const;
                                                             ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:227:79: error: non-member function 'QString topLevelDomain(ComponentFormattingOptions)' cannot have cv-qualifier
     QString topLevelDomain(ComponentFormattingOptions options = FullyDecoded) const;
                                                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:230:36: error: non-member function 'int port(int)' cannot have cv-qualifier
     int port(int defaultPort = -1) const;
                                    ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:232:39: error: 'ParsingMode' has not been declared
     void setPath(const QString &path, ParsingMode mode = DecodedMode);
                                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:232:58: error: 'DecodedMode' was not declared in this scope
     void setPath(const QString &path, ParsingMode mode = DecodedMode);
                                                          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:233:69: error: non-member function 'QString path(ComponentFormattingOptions)' cannot have cv-qualifier
     QString path(ComponentFormattingOptions options = FullyDecoded) const;
                                                                     ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:234:73: error: non-member function 'QString fileName(ComponentFormattingOptions)' cannot have cv-qualifier
     QString fileName(ComponentFormattingOptions options = FullyDecoded) const;
                                                                         ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:236:21: error: non-member function 'bool hasQuery()' cannot have cv-qualifier
     bool hasQuery() const;
                     ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:237:41: error: 'ParsingMode' has not been declared
     void setQuery(const QString &query, ParsingMode mode = TolerantMode);
                                         ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:237:60: error: 'TolerantMode' was not declared in this scope
     void setQuery(const QString &query, ParsingMode mode = TolerantMode);
                                                            ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:239:63: error: non-member function 'QString query(ComponentFormattingOptions)' cannot have cv-qualifier
     QString query(ComponentFormattingOptions = PrettyDecoded) const;
                                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:241:24: error: non-member function 'bool hasFragment()' cannot have cv-qualifier
     bool hasFragment() const;
                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:242:74: error: non-member function 'QString fragment(ComponentFormattingOptions)' cannot have cv-qualifier
     QString fragment(ComponentFormattingOptions options = PrettyDecoded) const;
                                                                          ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:243:47: error: 'ParsingMode' has not been declared
     void setFragment(const QString &fragment, ParsingMode mode = TolerantMode);
                                               ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:243:66: error: 'TolerantMode' was not declared in this scope
     void setFragment(const QString &fragment, ParsingMode mode = TolerantMode);
                                                                  ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:245:41: error: non-member function 'QUrl resolved(const QUrl&)' cannot have cv-qualifier
     QUrl resolved(const QUrl &relative) const;
                                         ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:247:23: error: non-member function 'bool isRelative()' cannot have cv-qualifier
     bool isRelative() const;
                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:248:38: error: non-member function 'bool isParentOf(const QUrl&)' cannot have cv-qualifier
     bool isParentOf(const QUrl &url) const;
                                      ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:250:24: error: non-member function 'bool isLocalFile()' cannot have cv-qualifier
     bool isLocalFile() const;
                        ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:252:27: error: non-member function 'QString toLocalFile()' cannot have cv-qualifier
     QString toLocalFile() const;
                           ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:255:23: error: non-member function 'bool isDetached()' cannot have cv-qualifier
     bool isDetached() const;
                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:257:38: error: non-member function 'bool operator<(const QUrl&)' cannot have cv-qualifier
     bool operator <(const QUrl &url) const;
                                      ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:257:38: error: 'bool operator<(const QUrl&)' must take exactly two arguments
../../../../include/QtCore/../../src/corelib/io/qurl.h:258:39: error: non-member function 'bool operator==(const QUrl&)' cannot have cv-qualifier
     bool operator ==(const QUrl &url) const;
                                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:258:39: error: 'bool operator==(const QUrl&)' must take exactly two arguments
../../../../include/QtCore/../../src/corelib/io/qurl.h:259:39: error: non-member function 'bool operator!=(const QUrl&)' cannot have cv-qualifier
     bool operator !=(const QUrl &url) const;
                                       ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:259:39: error: 'bool operator!=(const QUrl&)' must take exactly two arguments
../../../../include/QtCore/../../src/corelib/io/qurl.h:261:62: error: non-member function 'bool matches(const QUrl&, FormattingOptions)' cannot have cv-qualifier
     bool matches(const QUrl &url, FormattingOptions options) const;
                                                              ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:342:1: error: expected unqualified-id before 'private'
private:
^
../../../../include/QtCore/../../src/corelib/io/qurl.h:345:1: error: expected unqualified-id before 'public'
public:
^
../../../../include/QtCore/../../src/corelib/io/qurl.h:350:64: error: 'ParsingMode' has not been declared
     static QList<QUrl> fromStringList(const QStringList &uris, ParsingMode mode = TolerantMode);
                                                                ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:350:83: error: 'TolerantMode' was not declared in this scope
     static QList<QUrl> fromStringList(const QStringList &uris, ParsingMode mode = TolerantMode);
                                                                                   ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:353:5: error: 'friend' used outside of class
     friend Q_CORE_EXPORT uint qHash(const QUrl &url, uint seed) Q_DECL_NOTHROW;
     ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:355:1: error: expected unqualified-id before 'private'
private:
^
../../../../include/QtCore/../../src/corelib/io/qurl.h:357:5: error: 'friend' used outside of class
     friend class QUrlQuery;
     ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:359:1: error: expected unqualified-id before 'public'
public:
^
../../../../include/QtCore/../../src/corelib/io/qurl.h:361:12: error: 'DataPtr' does not name a type
     inline DataPtr &data_ptr() { return d; }
            ^
../../../../include/QtCore/../../src/corelib/io/qurl.h:362:1: error: expected declaration before '}' token
};
^
../../../../include/QtCore/../../src/corelib/io/qurl.h:200:17: warning: 'QUrl fromEncoded(const QByteArray&, int)' declared 'static' but never defined [-Wunused-function]
     static QUrl fromEncoded(const QByteArray &url, ParsingMode mode = TolerantMode);


And these are the contents of qurl.h
#include "../../src/corelib/io/qurl.h"
Title: Re: [HowTo] Cross compile Qt5
Post by: Cosik on November 12, 2015, 03:12:19 pm
did you perform make always on fresh extracted Qt sources?
Did you compiled Mali drivers for yours linux?

It's a problematic for me to reproduce this because I don't have working lime.
Title: Re: [HowTo] Cross compile Qt5
Post by: Sohaib Manzoor on November 13, 2015, 01:00:50 pm
Yes I performed make on a newly extracted Qt source.
I also compiled Mali drivers for my target (Olimex A20) Linux. I ran the test which showed a colored triangle.

Okay, thanks a lot for your help. Please suggest anything that I could possibly be missing.
Title: Re: [HowTo] Cross compile Qt5
Post by: Sohaib Manzoor on November 28, 2015, 12:05:01 pm
Hi Cosik

i am  a beginner so i hope you don't mind my stupid questions .. the problem here is that i am  done with all these steps and it compiled fine now what i am supposed to do next ? Do i have to download and install a QT creator because i couldn't find it in the installed files folder?
Title: Re: [HowTo] Cross compile Qt5
Post by: JoseQ on January 22, 2016, 03:35:28 pm
Hi Cosik,
First of all, thank you for this guide, there is few documentation out there.

I'm experiencing some problems.

I'm downloading Qt-everywhere 5.5.0:
    wget http://www.mirrorservice.org/sites/download.qt-project.org/archive/qt/5.5/5.5.0/single/qt-everywhere-opensource-src-5.5.0.tar.gz

Also gitorious is going down so I'm downloading cross-compile-tools from:
    git clone https://github.com/shahriman/cross-compile-tools.git

And this Linaro toolchain:
    wget https://releases.linaro.org/14.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.bz2

I'm woring in Ubuntu 14.04, and mounting A20 image through sshf.


The main errors I'm experiencing are on "./configure" stage, and they have to do with "determining target architecture", and with "OpenGL auto-detection":




Right now I'm installing debian32 bit on VBox, maybe that would ease some things.


I would really appreciate your help.

Thanks