EnvironmentSetup/HaikuOS
From Wiki.ooo4kids.org
Contents |
Prerequisites
- a recent Haiku nightly build from http://haiku-files.org/ (release >= r39101 should be ok). A gcc2hybrid is better as it is the official flavor. It is also what i use. Unfortunately, Haiku alpha 2 ( http://www.haiku-os.org/get-haiku) has bugs that prevent a full build of OOo4kids.
- Other tools :
- Archive-Zip-1.30
- gperf
- pkg-config-0.23-haiku-2.zip
- freetype-2.3.10-r1a1-x86-gcc2-2009-10-09.zip
- fontconfig-2.6.0-gcc2-2008-12-19.zip
- ccache-2.4
- gengetopt-2.22.4
- getopt
Getting sources
svn co svn://svn.adullact.net/svnroot/ooo4kids1/trunk OOo4Kids
Please do not checkout a revision between 1217 and 1250 (included), because the build was broken in meantime in sysui, hunspell, and lingucomponent (ask ericb2 on IRC for further information)
Setup prerequisites
- Archive-Zip-1.30 :
- Uncompress the archive somewhere
- then run "perl Makefile.PL" at the root directory of the source tree
- run "make" twice (one for updating the build script, one to build the tool)
- run "make install"
- gperf :
- run "installoptionalpackage -a gperf" from a Terminal. It will install the latest version compiled from http://haiku-files.org/
- pkg-config :
- Download a recent build from http://ports-space.haiku-files.org/dev-util/
- Unzip it to /boot/
- freetype :
- Download a recent build from http://ports-space.haiku-files.org/media-libs/
- Unzip it to /boot/
- fontconfig :
- Download a recent build from ???
- Unzip it to /boot/
- libcurl :
- run "installoptionalpackage curl" on a Terminal
- you should add a symlink to "/boot/common/lib/curl.so" in "/boot/develop/abi/x86/gcc4/lib". It allow linking at compile time.
- libxml : available by default
- libxslt :
- run "installoptionalpackage libxslt" on a Terminal
- getopt : build it with haikuporter (see http://ports.haiku-files.org/ for details)
- run "haikuporter getopt -i"
- gettext :
- run "installoptionalpackage gettext" on a Terminal (needed to compile hunspell)
- libneon :
- run "installoptionalpackage neon" on a Terminal
- icu : Haiku contains icu built-in, but development tools and headers are not included. We will use haikuporter to get and build a complete version. But, you should not use the install option as the built version might be different from the system one. I will investigate this later. In the meantime, it is safer to install the necessary tools and headers "by hand" :
- copy genbrk, genccode and gencmn from /boot/develop/haikuports/dev-libs/icu/work/icu/source/bin to /boot/common/bin
- copy /boot/develop/haikuports/dev-libs/icu/work/icu/source/common/unicode to /boot/common/include/
With the above dependencies installed, you should be able to run the configure script
Configure the build system
It may be necessary to run autoconf at the root of the source repository until the next configure rebuild.
./configure --with-use-shell-bash --disable-odk --disable-mozilla --disable-binfilter --with-OOo4Kids --with-java=no \
--disable-gtk --disable-randr-link --disable-gconf --disable-gnome-vfs --with-system-libxml \
--with-system-icu --with-system-openssl --with-system-python --with-system-curl \
--with-system-neon
(in one line !)
Bootstrapping
- Update config.guess and config.sub in the dmake subdirectory with ones from Haiku (/boot/common/share/automake-1.11/).
- Run "./autogen.sh" in the dmake subdirectory to update configure script.
- Run "./configure --prefix=/boot/common"
- Run "make install"
- Run "./bootstrap" from the root directory of the source tree.
Preparing build
- Install the file command. Latest sources at http://www.darwinsys.com/file/ should compile out of the box using the usual commands :
* ./configure --prefix=/boot/common * make * make install
Workaround
I suppose there is a bug (or at least a different behavior under Haiku) regarding alias handling in the system() call (see http://dev.haiku-os.org/ticket/7922).
It prevent build.pl to run some aliased commands out of the box.
First, i prefix $job_to_do with the complete path to the solenv/bin directory.
Index: bin/build.pl
===================================================================
--- bin/build.pl (revision 1239)
+++ bin/build.pl (working copy)
@@ -1768,7 +1768,8 @@
system("cat $log_file");
};
} else {
- $error_code = system ("$job_to_do");
+ # Haiku workaround
+ $error_code = system ("/boot/src/OOo4Kids/OOo4Kids/solenv/bin/$job_to_do");
};
return $error_code;
};
Then, i create a symlink to solenv/bin/mkout.pl and solenv/bin/zipdel.pl in /boot/home/config/bin/.
Due to the hardcoded path, you will have to add dmake in solenv/bin so build.pl could launch it.
Building OOo4Kids
- run "source HaikuX86Env.Set.sh" to setup the build environment at the root of OOo4Kids source tree
- run "export LIBRARY_PATH=$LIBRARY_PATH:/boot/src/OOo4Kids/OOo4Kids/solver/1.30/haiku.pro/lib:\
/boot/src/OOo4Kids/OOo4Kids/cppu/haiku.pro/lib:/boot/src/OOo4Kids/OOo4Kids/sax/haiku.pro/lib" to fix linking with some libraries during the build (Haiku use some non standard places by default)
- run "make"
The build should start and stop on the next error to fix
To be continued...