Building Haiku on Ubuntu Linux, Step by Step

2010-January: This document is now obsolete. We are in the process of consolidating and re-organizing the website documentation. For now please refer to the in-progress website documentation.

Another article on this site already describes the basics of building Haiku on Linux. Since my distribution of choice is Ubuntu, I decided to get Haiku building on it and then provide a detailed step-by-step guide for others to follow.

I performed these steps on a fresh Ubuntu 7.04 (Feisty Fawn) install, but they should be similar for other versions and probably the same for most Debian-based distributions.

  1. Install the needed packages for building:
    sudo apt-get install subversion yasm autoconf automake texinfo flex bison gawk build-essential
  2. Create the Haiku development directories and get the Haiku build tools source:
    mkdir develop
    cd develop
    mkdir haiku
    cd haiku
    For anonymous checkout:
    svn checkout buildtools
    For an existing Haiku developer:
    svn checkout buildtools
  3. Build and install the Haiku Jam:
    cd  buildtools/jam
    sudo ./jam0 install
    cd ../..
  4. Get the Haiku source (this will take a while): For anonymous check-out:
    svn checkout trunk
    For an existing Haiku developer:
    svn checkout trunk

    If there are any errors when checking out above, just cd into the trunk directory and type "svn up" to get any missed files. This also applies when updating the code in the future.

  5. Build the cross compiler tools (GCC 2.95):
    cd ~/develop/haiku/trunk
    ./configure --build-cross-tools ../buildtools/
    To build with GCC 4.x the configure line is:
    ./configure  --build-cross-tools-gcc4 x86 ../buildtools/

    But keep in mind this will produce binaries which are not compatible with BeOS.

  6. Build the Haiku image:
    jam haiku-image
    To build for testing in VMWare:
    jam haiku-vmware-image

    A VMWare configuration file for running this image can be found at 3rdparty/vmware/haiku.vmx

That is it! Not too bad. Thanks to Ingo and the various other contributors for making the Linux compiling so easy.