I'm currently compiling webkit - mainly to pinch the javascriptcore library from it.
As such, here are my findings for anyone else wanting to go near it to use webkit for the use of building a browser, for instance.
The joys of cross-compiling a large scale library with many many dependencies!
I'm using the yactfeau toolchain, in my own custom VM ( which has NFS mounts to my dev drives on my main box.. but that shouldn't matter much to you, you'll just need PLENTY of space for this in your VM )
I'm compiling webkit from SVN as well, so it's relatively recent ( mine might be a few commits out now, but it's verified working. )
Anyway, create a project folder (mine shall be called glesgae, and checkout ( or link to ) recent versions of webkit, glib, libsoup, cairo, pixman, glib-networking, gnutls, libnettle, gstreamer, gstreamer-plugins-base
Specifically, I'm using webkit revision 105733, glib 2.31.12, cairo 1.10.0, pixman 0.18.4, libsoup 2.37.1, glib-networking 2.31.6, gnutls 2.12.12, libnettle 2.1, gstreamer 0.10.30, gst-plugins-base 0.10.30
First up, glib.
If your system's version of glib is lower than the one we're compiling, you'll need to build this version for the host.
If you're using Ubuntu, you have additional fun in that you have to clean up Ubuntu's mess... you'll need to delete the old glib libraries in /usr/lib and the one in /lib for your newly compiled version to be found and used correctly.
If your glib is fine (you'll find out if you get weird errors in the configure stage for the Pandora) we'll move on to the Pandora compile.
Create a pandora.cache file with the following in it:
ac_cv_func_posix_getpwuid_r=yes
ac_cv_func_posix_getgrgid_r=yes
glib_cv_uscore=no
glib_cv_stack_grows=no
Then run configure as follows:
LIBFFI_CFLAGS=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/arm-angstrom-linux-gnueabi pndconfigure --cache-file=pandora.cache
Then
make
If you're really lucky, it'll compile without issue.
If you end up with the cryptic error of:
GEN stamp-testmarshal.h
You should give exactly one directory name
You'll need to do the following:
cd tests/gobject
glib-genmarshal --prefix=test_marshal testmarshal.list --header >> xgen-gmh
(cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h;)
rm -f xgen-gmh xgen-gmh
glib-genmarshal --prefix=test_marshal testmarshal.list --body >> xgen-gmc
cp xgen-gmc testmarshal.c
rm -f xgen-gmc xgen-gmc~
cd ../..
make
The Makefile is supposed to do this, but seems to get confused, for some reason.. either way, it should continue afterwards.
Once it's done,
make install
as usual for it to dump itself into your project's end structure - /mnt/utmp/glesgae
Next, pixman.
This one's straightforward enough, it's just
pndconfigure && make && make install
Next, cairo.
This also requires a pandora.cache file, this time containing:
ax_cv_c_float_words_bigendian=no
Then it's just:
pndconfigure --cache-file=pandora.cache && make && make install
Next, libnettle.
pndconfigure && make && make install
I got errors during install while building tests, but it seemed happy enough to copy the includes and libs over, which is what we needed anyway.
Next, gnutls.
pndconfigure --without-p11-kit && make && make install
For the host, I needed glib-networking to be built here, if I was building for host as well.
Now for libsoup.
Again, it's just:
pndconfigure && make
I got errors during making the tests.. I brazenly ignored them and issued
make install
To which I got the same errors, but it had already built the libs and headers, and copied them into place.
On to gstreamer.
I had to specify the lib folder of where all the glesgae is being dumped...
LDFLAGS=-L/mnt/utmp/glesgae/lib/pndconfigure && make && make install
Other than that, a nice and easy library to compile...
Now gstreamer-plugins-base.
I again had to specify the lib folder of where all the glesgae is being dumped...
LDFLAGS=-L/mnt/utmp/glesgae/lib/ pndconfigure
make
I got an error during the compile about something including a part of glib directly.
It was an easy fix, though.. I just had to edit gst/typefind/gsttypefindfunctions.c and change the line to #include <glib.h>
make install
Now the big bugger, webkit:
LIBSOUP_CFLAGS="-pthread -I/mnt/utmp/glesgae/include -I/mnt/utmp/glesgae/include/glib-2.0 -I/mnt/utmp/glesgae/lib/glib-2.0/include -I/mnt/utmp/glesgae/include/libsoup-2.4 -I/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi/usr/include/libxml2" LIBSOUP_LIBS=-L/mnt/utmp/glesgae/lib pndconfigure --with-gtk=2.0 --with-unicode-backend=glib
Unless you feel like compiling GTK 3.0? No?

The LIBSOUP stuff is required as it doesn't seem to have updated pkg-config correctly - probably due to the errors in the tests.
Again, it points to where glesgae is all going out to.
make jsc
It'll give up building the interpreter, but we don't need that... we just need the library and the include files.
Specifically, these are hiding in .libs, and the header files in Source/JavaScriptCore/API
I couldn't get the full webkit to build ( just issuing "make" ) due to glib-genmarshal errors again.. but I now have JavaScriptCore compiled and ready.
.... after three days on and off of attempting to compile the bugger, hence this post.
Edited by stuckie, 10 February 2012 - 08:42 PM.