Compiling WebKitGTK+ on Scratchbox for ARM platform

If we would like to build WebKitGTK+ for ARM platform, Scratchbox could be a good choice. In this post I will show, how we can install and setup Scratchbox to build WebKitGTK+. First, we have to install the Scratchbox and its ARM target. Next, we install some libraries to WebKitGTK+.
Let's see how we can do that.

Installing Scratchbox

There are two scripts that will install the Scratchbox and the Maemo SDK.

  • maemo-scratchbox-install_4.1.2.sh
  • maemo-sdk-install_4.1.2.sh

Download the scripts:

$ wget http://repository.maemo.org/stable/diablo/maemo-scratchbox-install_4.1.2.sh
$ wget http://repository.maemo.org/stable/diablo/maemo-sdk-install_4.1.2.sh
$ chmod a+x ./maemo-scratchbox-install_4.1.2.sh
$ chmod a+x ./maemo-sdk-install_4.1.2.sh



Install the Scratchbox and add a user:

$ sudo ./maemo-scratchbox-install_4.1.2.sh -s ~/scratchbox
$ sudo ~/scratchbox/sbin/sbox_adduser arm-user yes



Install the Maemo SDK on Scratchbox: (ARMEL and x86 targets)

$ ./maemo-sdk-install_4.1.2.sh -s ~/scratchbox -d



Now, our Scratchbox is ready for use.
We can stop and start it with the following commands:

$ sudo ~/scratchbox/sbin/sbox_ctl stop
$ sudo ~/scratchbox/sbin/sbox_ctl start

Installing the libs

To build WebKitGTK+, we have to install several libraries. Some libraries can be installed using apt-get, but some others are pretty new and we have to install them manually.

First we need a newer autotools: (outside Scratchbox)

$ cd ~/scratchbox/tools/autotools/autoconf2.61
$ sudo cp -fr --remove-destination * ../../

$ cd ~/scratchbox/tools/autotools/automake-1.9
$ sudo cp -fr --remove-destination * ../../



Now it's time, to login to Scratchbox: (the default target is the DIABLO-ARMEL)

$ ~/scratchbox/login
[sbox-DIABLO_ARMEL: ~] _



Add these new sources to the sources.list of apt: (/etc/apt/sources.list)

deb http://repository.maemo.org/extras/ diablo free non-free
deb-src http://repository.maemo.org/extras/ diablo free
deb http://repository.maemo.org/extras-devel/ diablo free non-free
deb-src http://repository.maemo.org/extras-devel/ diablo free
deb http://repository.maemo.org/ diablo sdk/free sdk/non-free tools/free tools/non-free
deb-src http://repository.maemo.org/ diablo sdk/free sdk/non-free tools/free tools/non-free



Next, update, upgrade and install some packages:

[sbox-DIABLO_ARMEL: ~] > fakeroot apt-get update
[sbox-DIABLO_ARMEL: ~] > fakeroot apt-get upgrade
[sbox-DIABLO_ARMEL: ~] > fakeroot apt-get install gperf gtk-doc-tools libicu-dev libenchant-dev \
 libgail-dev libxslt1-dev gnome-doc-utils



As I said, some new libraries are not available via apt-get so lets do the final steps manually:

[sbox-DIABLO_ARMEL: ~] > wget http://ftp.gnome.org/pub/gnome/sources/glib/2.22/glib-2.22.2.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf glib-2.22.2.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd glib-2.22.2
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > wget http://ftp.acc.umu.se/pub/gnome/sources/libsoup/2.28/libsoup-2.28.2.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf libsoup-2.28.2.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd libsoup-2.28.2
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr --disable-ssl --without-gnome
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > wget http://ftp.gnome.org/pub/gnome/sources/pango/1.20/pango-1.20.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf pango-1.20.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd pango-1.20.0
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > wget http://ftp.gnome.org/pub/gnome/sources/gtk+/2.13/gtk+-2.13.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > rm -rf /usr/lib/gtk-2.0/2.10.0
[sbox-DIABLO_ARMEL: ~] > tar -xf gtk+-2.13.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd gtk+-2.13.0
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr --without-libjasper
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > wget http://folks.o-hand.com/jku/geoclue-releases/geoclue-0.11.1.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf geoclue-0.11.1.tar.gz
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > wget http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.20.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf gstreamer-0.10.20.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd gstreamer-0.10.20
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > http://www.cairographics.org/releases/pixman-0.10.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf pixman-0.10.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd pixman-0.10.0
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr
[sbox-DIABLO_ARMEL: ~] > make && make install

[sbox-DIABLO_ARMEL: ~] > wget http://www.cairographics.org/releases/cairo-1.6.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > tar -xf cairo-1.6.0.tar.gz
[sbox-DIABLO_ARMEL: ~] > cd cairo-1.6.0
[sbox-DIABLO_ARMEL: ~] > ./configure --prefix=/usr
[sbox-DIABLO_ARMEL: ~] > make && make install

Building WebKitGTK+

Now our Scratchbox environment is ready to build WebKitGTK+. Checkout WebKit and build:

[sbox-DIABLO_ARMEL: ~] > svn checkout http://svn.webkit.org/repository/webkit/trunk WebKit
[sbox-DIABLO_ARMEL: ~] > cd WebKit
[sbox-DIABLO_ARMEL: ~] > WebKitTools/Scripts/build-webkit --gtk



Enjoy your fresh WebKitGTK+ on ARM! :)

Anonymous (not verified) - 11/17/2009 - 10:57

It's called WebKitGTK+.

PS: Your captcha is a hell of a challenge to recognize, I'm trying my 5th time now.

gabor.rapcsanyi - 11/17/2009 - 12:49

Ok, thanks. I fixed it. :)

gabor.loki - 11/18/2009 - 08:34

FYI: if you want to enable ARM JIT, you should call 'build-webkit' with the following parameters:

$> WebKitTools/Scripts/build-webkit --gtk --makeargs='CXXFLAGS="-DENABLE_JIT=1 -DENABLE_YARR=1 -DENABLE_YARR_JIT=1"'

Anonymous (not verified) - 03/25/2010 - 07:00

what the platform is?
That is you compile gtk on directfb or x11?

gabor.rapcsanyi - 03/25/2010 - 19:12

Hi,
in this post I compiled WebKitGTK+ for X11.

Anonymous (not verified) - 04/22/2010 - 13:48

How to launch WebKit on the ARM board? Does the script build install libwebkit, libwebcore and libjavascriptcore?

gabor.rapcsanyi - 04/22/2010 - 14:02

No it doesn't. But you can do it by hand.

Anonymous (not verified) - 04/22/2010 - 14:12

Thx for your response
So, to launch WebKit on ARM board we don't need those libraries? I saw that the script generated .la and not .so

gabor.rapcsanyi - 04/22/2010 - 14:36

In the WebKitBuild/Release/.libs/ directory you can find the libwebkit-1.0.so and some static libs. So, if you want to run GtkLauncher you can do whit this.

quim (not verified) - 02/20/2011 - 22:11

Hi gabor, congratulations for your post,
asking some help to you i have this error when try to run "WebKit/Tools/Scripts/build-webkit --gtk",

[sbox-DIABLO_ARMEL: ~] > WebKit/Tools/Scripts/build-webkit --gtk
Calling configure in /home/quim/WebKit/WebKitBuild/Release

autoreconf2.50: Entering directory `.'
autoreconf2.50: configure.ac: not using Gettext
autoreconf2.50: running: aclocal
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
autoreconf2.50: configure.ac: tracing
autoreconf2.50: running: libtoolize --copy
Putting files in AC_CONFIG_AUX_DIR, `Source/autotools'.
libtoolize: `config.guess' exists: use `--force' to overwrite
libtoolize: `config.sub' exists: use `--force' to overwrite
libtoolize: `ltmain.sh' exists: use `--force' to overwrite
/usr/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
autoreconf2.50: running: /scratchbox/tools/autotools/autoconf2.61/bin/autoconf --include=Source/autotools
autoreconf2.50: running: /scratchbox/tools/autotools/autoconf2.61/bin/autoheader --include=Source/autotools
autoreconf2.50: running: automake --add-missing --copy --no-force
GNUmakefile.am: C objects in subdir but `AM_PROG_CC_C_O' not in `configure.ac'
autoreconf2.50: automake failed with exit status: 1
Failed to setup build environment using 'autotools'!

thanks
quim

gabor.rapcsanyi - 02/20/2011 - 23:16

Hi!

I think your aclocal version is not correct. You need 1.9 version. If you want to compile WebKitGTK+ from trunk you can find the needed versions of the other libraries at https://trac.webkit.org/wiki/BuildingGtk

-Gabor

quim (not verified) - 02/21/2011 - 11:56

Hi,
i'm using automake 1.9 (declare -x SBOX_DEFAULT_AUTOMAKE="1.9")
and the problem for me seems to be in "GNUmakefile.am: C objects in subdir but `AM_PROG_CC_C_O' not in `configure.ac'"
, i will take a look at https://trac.webkit.org/wiki/BuildingGtk,

thanks for your help

quim

Anonymous (not verified) - 11/18/2011 - 01:50

Hi, I met the same problem as quim's. I'm using autoconf 2.61 and automake 1.9.6. Do you have any luck to resolve this issue quim? Thanks.

Anonymous (not verified) - 11/18/2011 - 09:58

Resolved. Current WebKit requires even higher versions of automake and autoconf. I'm using automake 1.11 and autoconf 2.68 and it works fine. Thanks.

lurlFette (not verified) - 11/09/2012 - 17:00

generic cialis - cialis online , http://getagenericpills.com/#17513 buy generic cialis

lurlFette (not verified) - 11/09/2012 - 17:00

generic cialis - cialis online , http://getagenericpills.com/#17513 buy generic cialis

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • No HTML tags allowed
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank