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

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. These are not set in stone and can fluctuate.

Platform Package Manager Supported Skill Level Notes
Haiku OptionalPackages Yes Beginner Easiest build platform
Arch Linux pacman Yes Advanced -
BeOS pkg No - Once upon a time..
CentOS rpm Yes Intermediate -
Debian Linux apt Yes Intermediate Missing mkisofs
Fedora rpm Yes Beginner -
FreeBSD packages Yes Advanced Works very well
MacOS X MacPorts Yes Intermediate Supported
NetBSD packages Yes Advanced Untested
RedHat Linux rpm Yes Intermediate -
Solaris solaris pkg No - -
Ubuntu apt Yes Beginner Works very well
Windows Cygwin No - -
Zeta pkg No - Once upon a time..

Generalized List

Requirements for compiling the build tools

Requirements for compiling Haiku

  • Haiku (cross) compiler Only needed for non-Haiku build platforms such as Linux. (cross compile)
  • JamHaiku uses a custom fork of Jam. (include in buildtools, cross compile)
  • mkisofs (genisoimage != mkisofs)
  • wget Used to download optional pacakges
  • Yasm (0.7.0 or greater)

Requirements to compile Haiku for the ARM platform


APT-based GNU/Linux Distribution (Debian, Ubuntu...)

Here are the packages to install on Debian/Ubuntu, which uses APT and sudo.

sudo apt-get install git yasm autoconf automake texinfo flex bison gawk build-essential unzip wget zip less

For the ARM port you will also need these packages:

sudo apt-get install uboot-mkimage util-linux mtools

Another note: 64-bit versions will need "gcc-multilib" and "g++-multilib" installed. Typically "gcc-multilib" is already installed, as it is a dependency of "libc6-dev-i386".

sudo apt-get install gcc-multilib g++-multilib libc6-dev-i386


BSD Based Distribution

Package based:

sudo pkg_add -r bison git yasm gawk texinfo cdrtools-devel wget u-boot mtools linuxfdisk

Ports based:

sudo portinstall devel/bison devel/git devel/yasm lang/gawk print/texinfo sysutils/cdrtools-devel ftp/wget devel/u-boot emulators/mtools sysutils/linuxfdisk


Mac OS X

First, install MacPorts (A standard Installer package is provided)
Close your Terminal, and enter in a new one:

sudo port install cdrtools gawk gnuregex wget yasm

(You will be prompted for the administrator password of the current account)

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 OSX, MacPort has mtools but is missing sfdisk at least.


pacman (Arch Linux)

Here are the packages to install on Arch Linux which uses pacman

pacman -S base-devel bison git texinfo yasm openssh

Puppy Linux

Puppy Linux is a specialized Linux distribution that focuses on reducing its hardware footprint, while maintaining an easy to use environment.

For Puppy 4.2.1, the following needs to be installed or compiled from source.


RPM-based GNU/Linux Distribution (Fedora, CentOS...)

Here are the packages to install on Fedora/CentOS, which uses Yum (this section is WIP, please report issues).

sudo yum install git yasm autoconf automake texinfo flex bison gcc gcc-c++ make glibc-devel

Another note: 64-bit versions will need 32bit versions of some libs

sudo yum install glibc.i686 glibc-devel.i686

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


BeOS & Zeta

BeOS and Zeta are no longer maintained as active development environments. One day in the future, it is very likely that these tools will need to be updated by an individual.

Cygwin

Cygwin is not maintained as a development environment. These instructions are dependent on community contributions.
/community/forum/cygwin_nt_build_support
/community/forum/how_to_get_haiku_running_in_virtualbox
MauriceK's instructions

Solaris

Solaris is not maintained as a development environment. These instructions are dependent on community contributions.
[openbeos] Building Haiku on Solaris... mailing list thread.