Pre-Requisite Software for Compiling Haiku
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 pre-alpha image of Haiku will contain all of the software needed to build a raw or vmwware image. 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.
For a very long time in the beginning, Haiku was only capable of being cross-compiled from another operating system. This functionality is still being retained. Linux, BSD, and OS X are the fairly popular build platforms, but the compiled binaries will only run on Haiku. BeOS, Zeta, Cygwin, and Solaris are no longer actively maintained as development environments and little to no support is offered for those platforms.
The following list shows the necessary tools, with platform specific notes below that.
Generalized List
- Subversion client
- Subversion does not maintain compatibility between major versions, eg 1.1.x and 1.4.x. As such, if you plan on sharing your local copy of Haiku's repository, then you must use the same version of Subversion on each platform.
- SSH Client (developers only)
- SSH is only required by developers with commit access, who chose to use svn+ssh:// instead of https://.
- Haiku (cross) compiler
- Jam
-
Haiku uses a custom fork of Jam. See this page to build jam from source.
As of August 2009, this is the current version:jam -v Jam 2.5-haiku-20090626. OS=LINUX. Copyright 1993-2002 Christopher Seiwald.
-
Haiku uses a custom fork of Jam. See this page to build jam from source.
- Yasm
- Version 0.7.0 or greater is needed.
- wget
- `wget` is used for downloading the OptionalBuildFeatures and OptionalPackages.
- mkisofs
-
This is only needed when creating an ISO based CD.
Note: genisoimage is not the true mkisofs
-
This is only needed when creating an ISO based CD.
Requirements for compiling the build tools
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 subversion yasm autoconf automake texinfo flex bison gawk build-essential
For the ARM port you will also need those 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". See Configure Option : --use-32bit for related information.
sudo apt-get install gcc-multilib g++-multilib libc6-dev-i386
In order to use xattr support, some distros may need "attr" and "attr-dev" installed. See Configure Option : --use-xattr
Puppy Linux
Puppy Linux is a specialized Linux distribution that focuses on reducing it's hardware footprint, while maintaining an easy to use environment.
For Puppy 4.2.1, the following needs to be installed or compiled from source. Alternatively, there is a Custom Puppy CD, which includes all of the necessary tools.
Other GNU/Linux Distributions
We welcome additions for the various other package managers, such as yum, pacman, or portage.
BSD Based Distribution
Package based:
sudo pkg_add -r bison subversion yasm gawk readlink texinfo cdrtools-devel wget u-boot mtools linuxfdisk
Ports based:
sudo portinstall devel/bison devel/subversion devel/yasm lang/gawk sysutils/readlink print/texinfo sysutils/cdrtools-devel ftp/wget devel/u-boot emulators/mtools sysutils/linuxfdisk
which readlink
If this returns /usr/bin/readlink, then you have the BSD version installed and the GNU version needs to be installed.
sudo portinstall sysutils/readlink
Once that is installed, ~/.profile needs to be edited. /usr/local/bin: needs to be moved so that it is before /usr/bin:. Logging out and back is one way to ensure that the modified .profile is reloaded.
If you skip this step, then the following error is likely to occur:
BuildHaikuImage1 <text> readlink: illegal option -- f usage: readlink [-n] [file ...] readlink: illegal option -- f usage: readlink [-n] [file ...]
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.
BeOS & Zeta
Disclaimer: 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.
- Subversion : [net_server, BONE]
- 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
Disclaimer: 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
Disclaimer: Solaris is not maintained as a development environment. These instructions are dependent on community contributions.
[openbeos] Building Haiku on Solaris... mailing list thread.
