What you need
You will need svn before starting this process; the other tools (jam, gcc et al) are built from our repository. Before attempting to build Haiku, one must get copies of the development toolchain. Keep in mind that the process will consume around 1 GiB of disk space.
Fetching the tools
To build Haiku on Linux you must first check out and build the cross-compiler. The easiest method for doing so is to check it out in a directory just below that of the Haiku root. Navigate to the parent directory of Haiku and use a command such as:
svn checkout svn://svn.berlios.de/haiku/buildtools/trunk buildtools
You should now have a 'buildtools' folder that contains folders named 'binutils' and 'gcc' amongst others.
Change to the buildtools folder and we will start to build 'jam' which is a requirement for building Haiku. Run the following commands to generate and install the tool:
sudo ./jam0 install
Keep in mind that the above will overwrite any previous installation of 'jam', as Haiku requires a slightly modified version. You can ensure that jam is installed correctly by comparing the result of the following:
$ jam -v
Jam 2.5-haiku-20060813. OS=LINUX. Copyright 1993-2002 Christopher Seiwald.
The binutils used by Haiku will be automatically generated according to the initial configuration of the Haiku source and placed in the 'generated/cross-tools' directory of Haiku. Before generating the tools you must consider the version required, there are essentially two choices:
- 2.95: Creates BeOS compatible binaries
- 4.x: Incompatible with BeOS, but theoretically more efficient binaries
Unless there is a pressing need, choose 2.95 as the latter option can cause frequent build issues. The commands for configuration are,
./configure --build-cross-tools ../buildtools/
./configure --build-cross-tools-gcc4 x86 ../buildtools/
The process can take quite some time, but when it finishes you are ready to compile your first haiku image.