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. Note that a build of the entire operating system on an x86_64 Haiku host will require that the buildtools are also prepared and compiled. Use the same instructions as a cross-compile in this case. The reason for this is because some 32bit elements need to be built as well and the compiler supplied by default on an x86_64 environment is insufficient for building these elements.

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.

Installing Jam

Haiku uses a custom version of Jam which needs to be built from sources. It is not possible to use the Jam version that may be packaged with Linux distributions, which is missing several features added by Haiku developers.

Haiku’s version of jam lives inside the buildtools repository. If you need to, see this page on Getting Haiku Source Code.

cd  /path/haiku/buildtools/jam/

Note, you may need to use gmake instead of make on BSD systems.


To install jam you can use one of two commands: The first requires administrative privilege, as jam will be installed to ‘/usr/local/bin/’

  • sudo ./jam0 install
  • ./jam0 -sBINDIR=$HOME/bin install

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.

Note that in addition to all the platform-specific packages, you will also need to install Haiku’s custom version of Jam.

PlatformPackage ManagerSupportedNotes
Linux Mintdeb/aptYES
RedHat Linuxrpm/yumYES
BeOSpkgNOOnce upon a time…
macOSHomebrewNONeed a working case sensitive filesystem
SolarissolarisNONo longer supported
Windowssee notesUSING WSLUsing Windows Subsystem for Linux
ZetapkgNOOnce upon a time..

pkgman pkgman (Haiku package system)

Basic requirements:

pkgman install cmd:python3 cmd:xorriso

Additional requirements for ARM:

pkgman install dtc

APT APT (Linux distributions such as Debian, Ubuntu, Mint…)

Basic requirements:

sudo apt install git nasm autoconf automake texinfo flex bison gawk build-essential unzip wget zip less zlib1g-dev xorriso libtool gcc-multilib python3

Additional requirements for ARM:

sudo apt-get install u-boot-tools util-linux device-tree-compiler

pacman pacman (ArchLinux)

Basic requirements:

sudo pacman -S base-devel multilib-devel bison git texinfo nasm openssh unzip curl wget flex xorriso python lib32-glibc

Additional requirements for ARM:

sudo pacman -S yaourt uboot-tools

yum RPM-based GNU/Linux Distributions using yum (Fedora, CentOS…)

Basic requirements:

sudo yum install git nasm autoconf automake texinfo flex bison gcc gcc-c++ make glibc-devel zlib-devel xorriso curl-devel byacc libstdc++-static glibc-devel.i686 libstdc++-devel.i686 libstdc++-devel python36

Additional requirements for ARM:

sudo yum install libfdt

zypper RPM-based GNU/Linux Distribution using zypper (openSUSE, SLES)

Basic requirements:

sudo zypper install git nasm autoconf automake texinfo flex bison gcc-c++ make glibc-devel zlib-devel curl-devel xorriso python3

gentoo Portage based GNU/Linux Distribution (Gentoo)

Basic requirements:

sudo emerge -av dev-vcs/git autoconf automake texinfo flex bison gawk tar sys-libs/zlib libisoburn wget nasm net-misc/curl

Additional requirements for ARM:

sudo emerge -av u-boot-tools util-linux dtc

freebsd FreeBSD

Basic requirements:

pkg install devel/bison devel/git devel/nasm lang/gawk print/texinfo sysutils/xorriso ftp/curl ftp/wget sysutils/u-boot-tools sysutils/linuxfdisk lang/python lang/gcc devel/gmake

The configure script has to be run with extra enviroment variables to tell it the location of gcc-ranlib and gcc-ar, for example:

$ NM=gcc-nm9 RANLIB=gcc-ranlib9 AR=gcc-ar9 ./configure --cross-tools-source ../buildtools/ --build-cross-tools x86_64

osx macOS

A case-sensitive file system is required to build Haiku. You can use Disk Utility to create a case-sensitive disk image and store the Haiku source tree on that. Case-sensitive HFS+ works fine.

First install Xcode via xcode-select --install and accept the license. xcodebuild -license

Once you have installed XCode and the command line tools as well as agreed to the end user license you can install the prerequisite software either by using MacPorts or by using Homebrew.

To install the prerequisite software using Homebrew:

  1. Install Homebrew using the ruby command line installer provided on the linked page.
  2. Next install the prerequisite software to build Haiku using the following command via brew install autoconf xorriso gawk wget nasm less mpfr gmp libmpc bison
  3. Force using the newer bison version. brew link bison --force
    • Note that Homebrew may refuse to shadow the built-in version of bison. If so, follow the instructions so that a new version of bison is in your $PATH

Note: You’ll need to install gnu less from the dupes repository as macOS comes with BSD less while Haiku requires GNU less.

To install the prerequisite software using Macports do the following:

  1. Install MacPorts (A standard Installer package is provided).
  2. Close your Terminal, open a new one and type sudo port install autoconf xorriso 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:

export PATH=/opt/local/bin:$PATH
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info

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 is missing sfdisk at least.

windows Windows

Windows is not maintained as a development environment.

It is possible to install Windows Subsystem for Linux and follow the instructions for the appropriate Linux distribution (for example, Ubuntu is available this way in the Windows store).

beos BeOS & Zeta

BeOS and Zeta are no longer maintained or supported.

solaris Solaris

Solaris is not maintained as a development environment. These instructions are dependent on community contributions.

Linux remarks - xattr

Building Haiku correctly currently requires proper xattr support on the file system you compile it with. Unfortunately, the ext4 filesystem often used with Linux does not provide sufficient support. It is recommended to use either XFS or btrfs for the partition where your generated directory is stored. There is a fallback mechanism that is used otherwise, but the build will be slower.

In order to use xattr support, some distributions may need “attr” and “attr-dev” installed. See Configure Option : --use-xattr