PDA

View Full Version : Building Qt4.X ...



cart_man
30th August 2016, 10:14
Hi guys.

I am tasked with building a working Cross compiler for Qt4.X FOR Debian Wheezy. ( Qt4.X = Qt4.1 up to Qt4.8 etc... )

I have been scouring the internet the last 5 days and I can not seem to find a solid way of compiling Qt4 without any hassles.

Things I need to be able to do.
- Compile Qt for a Debian Wheezy OS embedded board... a.k.a IMX6 RiotBoard. ( So the toolchain and libraries and everything else required to cross compile to imx6 board )
- Be able to compile on host machine and execute(deploy) on Board.
- Be able to code on Board self. ( So the IDE running on the board is a bonus. )

I have tried BuildRoot but I can not seem to find either Debian or Qt4.X . The Dos-UI at first is a little confusing. "Is this even possible in build root?"

Could someone please nudge in the right direction. Where do I start looking for the Qt4.X download, scripts, install scripts, Compile scripts etc ...

Thanks
Cart

anda_skoa
30th August 2016, 10:40
For coding and compiling on the board itself you could likely just install Qt from the Debian respositories.
But that is likely not very fast.

For cross-compiling Qt you need to get the Qt sources and configure the build for your build-chain and sysroot
http://doc.qt.io/qt-4.8/qt-embedded-crosscompiling.html

Cheers,
_

cart_man
5th September 2016, 19:19
I have been having a real hard time compiling Qt4 embedded for my IMX6 board. ( qt-everywhere-opensource-src-4.8.6.tar.gz )
I have a Host machine running Linux(Ubuntu 14) and I want to code and compile on this machine and then send the binary to my IMX machine for execution. Snag is I have to use QWS and Debian 7 as the OS on the IMX6 board.
So far I have been trying the following to make this work.
I have installed and tried arm-linux-gcc-4.3.2.tgz
Also gcc-arm-none-eabi-5_4 which when exported crashed with an error saying it can not find arm-none-linux-gcc.
Also tried gcc-linaro-arm-linux-gnueabi-2012 ...it had the same problem.
I have also installed a TON of libs to try and make it work.
None of this worked.

I have changed my PATH variable several times with no luck... I can not even remember half of the stuff I tried.
I use the ./config command like this -> " ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -no-webkit -little-endian "

So finally I have tried using arm-linux-gcc-4.3.2.tgz which is really old
with PATH="/usr/local/arm/4.3.2/bin:/usr/local/gcc-arm-none-eabi-5_4/bin/:/usr/local/gcc-arm-none-eabi-5_4/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games "

and it got the furthest so far but still crashed with the following.

obj/release/UStringImpl.o: In function QTWTF::CrossThreadRefCounted<QTWTF::OwnFastMallocPtr<unsigned short> >::deref()': UStringImpl.cpp:(.text._ZN5QTWTF21CrossThreadRefCo untedINS_16OwnFastMallocPtrItEEE5derefEv[QTWTF::CrossThreadRefCounted<QTWTF::OwnFastMallocPtr<unsigned short> >::deref()]+0x28): undefined reference to__sync_sub_and_fetch_4'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtScript.so.4.8.6] Error 1
make[1]: Leaving directory `/home/gss/QtEmbedded/src/script'
make: *** [sub-script-make_default-ordered] Error 2

I have make cleanconf before starting the process all over again before this crash.

Anyway I do not know what to do anymore. I have been at this for 2 days now and I need to go sleep.

If anyone can please help me I would greatly appreciate it.

This is what I have done on my latest try. Still same thing.

1. Download and unzip Qt-everywhere-opensource-src-4.8.5 into ~/QtEmbedded
2. Install necessaries like build-essentials etc... Usually the things you require to build Yocto
3. sudo apt-get install gcc-arm-linux-gneuabi and gcc-arm-linux-gneuabihf.
3. If I Echo PATH its-> /usr/bin/arm-linux-gnueabi-gcc:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
4. Run config tool with following-> ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -little-endian -no-webkit.
Success... Please run MAKE and then MAKE INSTALL. So I run make.
Goes on for AGES! And then fails with [ MAKE[1] "arm-none-linux-gcc": command not found ] something like that

So I downloaded " arm-linux-gcc-4.3.2.tgz " to gain access to the specific command its looking for. and now it crashes with this AFTER taking ages to compile who knows what.

obj/release/UStringImpl.o: In function QTWTF::CrossThreadRefCounted<QTWTF::OwnFastMallocPtr<unsigned short> >::deref()': UStringImpl.cpp:(.text._ZN5QTWTF21CrossThreadRefCo untedINS_16OwnFastMallocPtrItEEE5derefEv[QTWTF::CrossThreadRefCounted<QTWTF::OwnFastMallocPtr<unsigned short> >::deref()]+0x28): undefined reference to__sync_sub_and_fetch_4'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtScript.so.4.8.6] Error 1
make[1]: Leaving directory `/home/gss/QtEmbedded/src/script'
make: *** [sub-script-make_default-ordered] Error 2


So now I am looking for a newer version of arm-linux-gss-X.X.X.tgz BUT that is nowhere to be found. WHY on earth would Qt4 have dependencies that are just not compatible ?
What am I missing here?