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.

Platform Package Manager Supported Notes
Haiku pkgman YES Easiest
ArchLinux pacman YES
BeOS pkg NO Once upon a time..
CentOS rpm/yum YES
Debian deb/apt YES Missing mkisofs
Fedora rpm/dnf YES Missing mkisofs
FreeBSD packages YES Works very well
Gentoo Portage YES
Linux Mint deb/apt YES Missing mkisofs
Mac OS X MacPorts YES
NetBSD packages YES Untested
OpenSuSE rpm/zypper YES Missing mkisofs
RedHat Linux rpm/yum YES Missing mkisofs
Solaris solaris NO No longer supported
Ubuntu deb/apt YES Missing mkisofs
Windows Cygwin NO
Zeta pkg NO Once upon a time..

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

Basic requirements:

sudo apt-get install git nasm autoconf automake texinfo flex bison gawk build-essential unzip wget zip less zlib1g-dev libcurl4-openssl-dev genisoimage libtool

Additional requirements for ARM:

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

pacman pacman (ArchLinux)

Basic requirements:

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

Additional requirements for ARM:

sudo pacman -S yaourt uboot-tools mtools 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 genisoimage curl-devel byacc libstdc++-static

Additional requirements for ARM:

sudo yum install mtools 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

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 cdrkit wget nasm net-misc/curl bc

Additional requirements for ARM:

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

freebsd BSD Based Distribution (FreeBSD)

Package based (FreeBSD < 10): sudo pkg_add -r bison git nasm gawk texinfo cdrtools-devel wget u-boot mtools linuxfdisk curl

Package based (FreeBSD >= 10): sudo pkg install bison git nasm gawk texinfo cdrtools-devel wget u-boot mtools linuxfdisk curl

Ports based: sudo portinstall devel/bison devel/git devel/nasm lang/gawk print/texinfo sysutils/cdrtools-devel ftp/curl ftp/wget devel/u-boot emulators/mtools sysutils/linuxfdisk

osx OS X

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 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 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:

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.

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 cdrtools gawk wget nasm homebrew/dupes/less mpfr gmp libmpc bison
  3. Force using the newer bison version. brew link bison --force

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

beos BeOS & Zeta

Warning
BeOS and Zeta are no longer maintained or supported.

cygwin Cygwin (Windows)

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

cygwin Solaris

Warning
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