[webkit-help] Cross-compiling webkit for ARM platform on Linux-x86 machine

Jilu Oommen jilu at tataelxsi.co.in
Thu Aug 27 06:28:39 PDT 2009


Thanks for all at Webkit-help mailing list for your support.

For building Webkit-QT port for ARM, I built QtEmbedded-4.5.2 for ARM, 
pointed the QTDIR variable to this location and
 changed the PATH variable also accordingly.
I also had to crosscompile libraries like freetype, fontconfig, libxml 
etc also for ARM.
Then I was able to successfully build Webkit for ARM using "build-webkit 

A couple of tips for anyone out there who is having a tough time 
building webkit on ARM

1) While building Qt-Embedded Linux
         i)  make sure that the PATH variable points correctly to the
 'bin' folderof your cross-tool chain folder, for example

        ii) invoke configure with
*./configure -embedded arm -xplatform qws/linux-arm-g++ -L 
-make tools*
Only then libQtUiTools will be built which is required for building webkit
(P.S the default configuration of Qt-embedded linux does not build 
sudo make install*

2) While building webkit ensure that QTDIR points to the Qt-embedded 
If your QT version is not up to date,  you will get qmake -r unknown 
option while invoking build-webkit.

*export QTDIR=/usr/local/Trolltech/QtEmbedded-4.5.2-arm
export PATH=$QTDIR/bin:$PATH*
 *./WebKitTools/Scripts/build-webkit --qt*

3) while building dependant libraries like freetype, fontconfig, libxml etc
take care that the PATH variable points to the ARM cross-tool-chain bin 
Also take care that ARM platform is specified while invoking configure 

*./configure --host=arm-linux 
sudo make install*

my experience is that if you give another prefix other than the QT 
folder, you may get some
linking errors like

/warning: libxml2.so.2, needed by 
not found
(try using -rpath or -rpath-link)/

in case you get errors like arm-linux-gcc or arm-linux-ranlib not found, 
while doing make install,
you can edit the libtool file and specify the entire path for the variables
for example
invoke make install again

4) when building webkit, you are likely to get some typecast errors like :

/WebKit-r47266/WebKitTools/DumpRenderTree/qt/ImageDiff.cpp:122: error: 
no matching function for call to 'qMax(qreal&,
/difference = qMax(difference, 0.01); ->  difference = qMax(difference, 

/Solution is to modify the line as
d/ifference = qMax(difference, 0.01); ->  difference = qMax(difference, 
/and invoke build-webkit again/

Thanks and best regards,

nkbai baink wrote:
> first ,you should export QTDIR variable to the qt version compiled 
> with arm-softfloat-linux-gnu-g++.
> then export  PATH=$QTDIR/bin:$PATH
> force  build-webkit --qt to use your own qmake ,not the system qmake.
> it works when compiling webkit nightly build on my own machine.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20090827/62c10f90/attachment.html>

More information about the webkit-help mailing list