Building on Haiku
Current status of building on Haiku

This is the first time in a while that I have tried to build one of my projects on Haiku. Here is a quick rundown of my experience.

VM Specs


Running in a VM hosted on VirtualBox 4.3.20 on FreeBSD 10.1, given 512 MB RAM and 8 GB disk.


The AMD network adapter provided by VirtualBox seems to not work well with Haiku. The networking stack was perpetually stuck trying to acquire a DHCP address. I changed the VirtualBox settings from NAT to bridged mode, but Haiku still could not acquire an IP.

I then changed the network adapter to an Intel PRO/100 MT Desktop, and Haiku recognized it flawlessly.


This build comes with default repos set. There is no need for pkgman add-repo.

I installed some build tools:

~> pkgman update
~> pkgman install cmake_x86 ninja_x86 vim


Mounted my home directory from the hosting machine via NFS:

~> mount_nfs server:/pool/chuck /pool/chuck 1000 1001


Attempting to build on NFS (so that there is a heavy read and write load on NFS) caused a kernel panic in Haiku. Moving the build directory onto the local (virtual) disk, so that NFS was only handling a read load, avoided the problem. Also, attempting to edit a file inside Haiku, which I had previously edited in the host, resulted in a similar kernel panic. Every time the panic was:

PANIC: dec_vnode_ref_count: called on busy vnode

I recall this same panic from years past. I would love to have the time to familiarize myself with the Haiku kernel.



~> cmake --version
cmake version 3.0.0

I modified my projects to recognized Haiku like this:


TODO: UnitTest++’s Config.h incorrectly identifies Haiku as WIN32.

TODO: My first configuration attempt was to use Ninja, which yielded compiler errors regarding mixing -c, -o, and multiple source files. Targeting make worked. Weird.


The gcc included with this Haiku is the ancient gcc-2.95. This yields many bogus warnings in C++ code these days. Personally I don’t care about the binary-compatibility it offers with the original BeOS.

To use the GCC 4 compiler with CMake, configure like this:

~/build> cmake -DCMAKE_C_COMPILER=gcc-x86 -DCMAKE_CXX_COMPILER=g++-x86 -DCMAKE_BUILD_TYPE=Debug path

February 10, 2015
363 words


haiku software



ccoffing on GitHub

ccoffing on LinkedIn