BUILD NOTES
Here are some more technical notes on how I compiled inkscape. I'm posting them so they can be a reference for other people compiling this, or something similar, and so that more knowledgeable people can tell me how to do it better. Many of the issues discussed in this thread are included in the notes (although without any detail as to the "why" they are done.)
TARGET DIRECTORY
I installed the libraries and application into ~/Zaurus/Cross/install, by using the --prefix=$HOME/Zaurus/Cross/install when I configured the compilations. Anything using a previously compiled library needs to know where it is. After initializing the SDK, execute this in the shell:
export PKG_CONFIG_PATH=~/Zaurus/Cross/install/lib/pkgconfig:$PKG_CONFIG_PATH
BUILDING THE LIBRARIES
In the end, I only did need to build the libraries mentioned in
http://wiki.inkscape.org/wiki/index.php/CompilingInkscape :
- Boehm-GC
- libSigc++
- GlibMM
- GtkMM
The wiki page links to the source code, and recommends building the files as static libraries, which I did. [At some future date, I may try building them as dynamic libraries.]
My standard config line was:
CPPFLAGS=-I$HOME/Zaurus/Cross/install/include LDFLAGS=-L$HOME/Zaurus/Cross/install/lib ./configure --host=armv5tel-cacko-linux --build=i686-linux --prefix=$HOME/Zaurus/Cross/install --enable-static --disable-shared
followed by a "make" and "make install"
The order of building was also important, as later libraries depended upon the former.
GtkMM caused me a little bit of trouble. I grabbed the latest version (2.8.3), which required GTK+ >= 2.8.0. Inkscape itself only requires GTK+-2.0 >= 2.4.0. pdaXrom 1.1.0beta1 provides GTK+ 2.6.2 (and I didn't feel it was worthwhile recompiling that!)
I downloaded an earlier version of GtkMM (2.4.11), and it didn't compile right. I then tried version 2.6.5, and it didn't compile right, either. I noticed, however, that it was in the examples folder that it was having trouble, and decided to "make install" it anyways. It worked. I presume some of the examples have greater dependancies than the library itself.
BUILDING INKSCAPE
To cross-compile inkscape, you first need to patch it -- as, in one of the configure steps, it tests that the Boehm-GC library works, by trying to build something with it and then run it -- which will not work when cross-compiling.
koen provided a
patch. After applying the patch, you need to regenerate the configure script, by executing:
M4=`which m4` autoconf
Now you can configure it:
CPPFLAGS=-I$HOME/Zaurus/Cross/install/include LDFLAGS=-L$HOME/Zaurus/Cross/install/lib ./configure --host=armv5tel-cacko-linux --build=i686-linux --prefix=$HOME/Zaurus/Cross/install
This next step is a kludge. I'm sure there is a better way to do it, likely by specifying something in the configure command. If anyone knows how, please tell me!
Edit the config.h file. You need to change three paths.
INKSCAPE_DATADIR becomes "/usr/share"
INKSCAPE_LIBDIR becomes "/usr/lib"
PACKAGE_LOCALE_DIR becomes "/usr/share/locale"
Before editing, these paths were all in "~/Zaurus/Cross/install" instead of "/usr". Without making this change, assets such as the toolbar icons can not be found when you run the application.
Now, you need to "M4=`which m4` make" and then "make install"
And that's it. Not nearly as bad in retrospect as it was before I'd done it.
Finally, I'll have to admit I was amazed when I stripped the executable, and it went down in size from 52 MB to 7 MB!
Thanks for your help everyone,
Armagon