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.
Building jam
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:
cd buildtools/jam
make
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.
Building binutils
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,
2.95:
cd haiku
./configure --build-cross-tools ../buildtools/
4.x
cd haiku
./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.






Hello,
I tried to do like it is described, but after the 'make' command in the jam directory I just get tons of errors saying something like
"error Makefile.c:34 in stdio.h" for nearly every headerfile that is used.
I'm using Ubuntu 6.10. Looks like a simple error caused by my stupidity. Is it possible that I created the 'buildtools'-directory at the wrong place. Now it is like
~/svn/haiku/buildtools
The text on this page is a bit confusing:
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:
First the directory should be 'below' haiku-root, then it is the 'parent directory' of Haiku...
Sorry for asking such perhaps silly questions, but I didn't find any answer elsewhere.
Thanks
Jean Rene