Re: building qt4 for arm

Neil Williams <[email protected]>
Newsgroups gmane.linux.debian.devel.embedded
Message-ID <[email protected]>
On Tue, 12 Feb 2013 16:28:17 +0100
Rieker Flaik <[email protected]> wrote:

> I'm running debian arm

There is no Debian ARM port anymore, it's either armel or armhf.

> and need to rebuild libqt4 with an additional
> patch. 

For armel, it is unlikely that you want the Debian package unless you
have a full Xorg server on your armel board.

You probably need a custom build of QtEmbedded which needs additional patches.

http://www.linux.codehelp.co.uk/serendipity/index.php?/archives/223-Qt-embedded-armel-for-Emdebian.html

http://www.emdebian.org/trac/browser/current/emdebian/trunk/qt4-embedded/tags

You'll need this version of the package instead of what is in Debian
even if you are going to be building natively, unless you have a FULL
Xorg installation on your board.

> What is the best and fastest way to rebuild that package?

Cross build - and don't use ever aptitude for cross-building or
multiarch, it's broken. 

>    aptitude install emdebian-archive-keyring
>    echo "deb http://www.emdebian.org/debian/ squeeze main" >> /etc/apt/sources.list
>    aptitude update
>    aptitude install gcc-4.4-arm-linux-gnueabi cpp-4.4-arm-linux-gnueabi

Wrong - you need g++-4.4-arm-linux-gnueabi as Qt is C++

Installing g++ brings in gcc and cpp as dependencies plus the rest of
the stuff needed for C++.

apt-get install g++-4.4-arm-linux-gnueabi
 
> Then I did:
>    apt-get source libqt4-dev
>    dpkg-buildpackage -aarmel -j4

Drop the -j4.

Install the cross-dependencies using embuilddeps:

apt-get install xapt
apt-get source libqt4-dev
cd qt4-....
sudo embuilddeps -m -a armel
dpkg-buildpackage -aarmel -d

dpkg cannot check cross-dependencies, so you need -d to skip that check.

> 
> The build-process started but died after 3 minutes with messages like
> this:
> 
>    animation/qsequentialanimationgroup.cpp:467: warning: unused variable ‘q’
>    ../../include/QtCore/../../src/corelib/arch/qatomic_arm.h: Assembler messages:
>    ../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:131: Error: no such instruction: `swpb %al,%bpl,[%rbx]'
>    ../../include/QtCore/../../src/corelib/arch/qatomic_arm.h:131: Error: no such instruction: `swpb %al,%bpl,[%rbx]'

Due to lack of cross-dependencies, the wrong headers got included. That
resulted in x86 assembly being included into the armel cross build, not
surprisingly, that doesn't work.

It is probably best to ensure that libqt4-dev is not installed for your
build architecture (the build arch == the Big machine or the Desktop
machine - the host arch is the handheld architecture).

You don't want libqt4-dev itself when building Qt.

> I'm still searching for a practicable way of rebuilding bigger debian
> packages.
> 
> How do you do that?
> Any hints?

It will take many hours. Easily 5+. There again, building natively on a
Debian armel buildd box takes over 16hours.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAlEabwsACgkQk7DVr6iX/QLlvgCfTSY8m03y1LYqdx94NaO3sDcL
nkoAnAjUMKQFAv/rLx62EyMfAEZ4ZOaY
=T8Hp
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.