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.

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
SolarissolarisNONo longer supported
BeOSpkgNOOnce upon a time…
Windowssee notesNO
ZetapkgNOOnce upon a time..

pkgman pkgman

Basic requirements:

pkgman install mtools python3

Additional requirements for ARM:

pkgman install dtc bc

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 mtools gcc-multilib python3

Additional requirements for ARM:

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

pacman pacman (ArchLinux)

Basic requirements:

sudo pacman -S base-devel bison git texinfo nasm openssh unzip curl wget flex xorriso bc mtools python

Additional requirements for ARM:

sudo pacman -S yaourt uboot-tools bc

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 mtools glibc-devel.i686 libstdc++-devel.i686 python36

Additional requirements for ARM:

sudo yum install libfdt bc

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 bc mtools

Additional requirements for ARM:

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

freebsd BSD Based Distribution (FreeBSD)

Package based:

sudo pkg install bison git nasm gawk texinfo xorriso wget u-boot-tools mtools linuxfdisk curl python3 gcc gmake

Ports based:

sudo portinstall devel/bison devel/git devel/nasm lang/gawk print/texinfo sysutils/xorriso ftp/curl ftp/wget devel/u-boot-tools emulators/mtools sysutils/linuxfdisk lang/python devel/gcc devel/gmake

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 mtools
  3. Force using the newer bison version. brew link bison --force

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 mtools

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 has mtools but 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). However, this is currently slower than running Haiku in a virtual machine and building from there.

beos BeOS & Zeta

BeOS and Zeta are no longer maintained or supported.

cygwin 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. 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.

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