Pre-requisite Software

The tools you need to compile software for Haiku, or to compile Haiku itself, depend on the platform that is used for building.

Currently, Haiku is arguably the most convenient development environment. A nightly image (or stable release) of Haiku should contain all of the software needed to build its sources for x86.

So while Haiku is not the fastest, being able to immediately test the freshly compiled binaries and having the tool chain pre-installed certainly reduces the chances of headaches. On occasion, building Haiku on Haiku can be problematic if the host version is significantly out of date compared to the version being built. In this case, cross-compiling from another OS, or updating to a newer Haiku may be required to get things working again.

Haiku currently supports building itself, or having itself cross compiled on another platform.

Build platform support matrix

Below are common build platforms and their statuses. This is not meant as a complete list, and the build specifics might change with new versions of those platforms. Further below you’ll find more specific help on how to set up the build.

Close your Terminal, open a new one and type sudo port install autoconf cdrtools gawk wget nasm less mpfr gmp libmpc bison

If you get an error “port: command not found”, the MacPorts shell configuration, stored in ~/.profile, is probably not taken into account.
If you’re using Bash, you probably have a ~/.bash_profile or ~/.bash_login file, preventing bash to read ~/.profile.
Check the file used by Bash (in the mentioned order) and add these lines to the used file:

If you are using another shell, take a look a the shell documentation to see which file is parsed at login, and add the required commands.
You can now retry the port install… command in a new Terminal.

Note: the ARM port is not yet supported for OS X, MacPorts has mtools but is missing sfdisk at least.

To install the prerequisite software using Homebrew:

Install Homebrew using the ruby command line installer provided on the linked page.

Solaris

Linux remarks - xattr

Building Haiku correctly currently requires proper xattr support on the file system you compile it with.
Currently, your options are unfortunately rather limited, as for example, ext4 does not sufficiently support this feature.
Recommended file systems to use under Linux are XFS, and ReiserFS at this time.

There is a fallback mechanism that is used otherwise, but this is known to be problematic sometimes.