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. 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 | Skill Level | Notes |
| Haiku | OptionalPackages | Yes | Beginner | Easiest build platform |
| Arch Linux | pacman | Yes | Advanced | - |
| BeOS | pkg | No | - | Once upon a time.. |
| CentOS | rpm/yum | Yes | Intermediate | - |
| Debian Linux | apt | Yes | Intermediate | Missing mkisofs |
| Fedora | rpm/yum | Yes | Beginner | - |
| FreeBSD | packages | Yes | Advanced | Works very well |
| Linux Mint | apt | Yes | Beginner | Works very well |
| Mac OS X | MacPorts | Yes | Intermediate | Works |
| NetBSD | packages | Yes | Advanced | Untested |
| OpenSUSE | rpm/zypper | Yes | Intermediate | - |
| RedHat Linux | rpm/yum | 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
- Git client To clone source code from project
- SSH Client Only needed for commiters
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)
- Jam Haiku 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
Linux remarks
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.
Below you find further instructions for several distributions.
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 zlib1g-dev
For the ARM port you will also need these packages:
sudo apt-get install uboot-mkimage util-linux mtools device-tree-compiler
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
pacman (Arch Linux)
Here are the packages to install on Arch Linux which uses pacman
pacman -S base-devel bison git texinfo yasm openssh unzip
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 Distributions using yum(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 zlib-devel
With Fedora, you will also need to install the libstc++-static package if the build fails because of a missing libsupc++:
sudo yum install libstdc++-static
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
RPM-based GNU/Linux Distribution using zypper (OpenSUSE, SLES)
Here are the packages to install on OpenSUSE/SUSE Enterprise which uses zypper (this section is WIP, please report issues).
sudo zypper install git yasm autoconf automake texinfo flex bison gcc-c++ make glibc-devel zlib-devel
Another note: 64-bit versions will need 32bit versions of some libs
sudo zypper install linux32 glibc.i686 glibc-devel-32bit gcc-c++-32bit
In order to use xattr support, some distributions may need "attr" and "attr-dev" installed. See Configure Option : --use-xattr
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
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.
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 less mpfr gmp libmpc libiconv
(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, MacPorts has mtools but is missing sfdisk at least.
BeOS & Zeta
- Git : not available
- SSH : [net_server, BONE]
- Development Tools (contains obsolete GCC version; please use version linked below instead)
- GCC compiler 2.95.3
- GCC Haiku cross compiler 2.95.3 (extract to /boot to install)
- Jam, 2008-03-37
- yasm 0.8.0 for BONE
- wget
Cygwin
/community/forum/cygwin_nt_build_support
/community/forum/how_to_get_haiku_running_in_virtualbox
MauriceK's instructions
Solaris
[openbeos] Building Haiku on Solaris... mailing list thread.
