Eiffel on Haiku

by Manu (modified: 2008 May 02)

A while ago I've heard about Haiku through an online Google Tech Talk. I was immediately captivated because Haiku is actually a clone of BeOS and I definitely remember the BeOS days. It was when Mac OS was not up to the task anymore and BeOS seemed a promising alternative. I even met Jean Louis Gassée in 1999 at the BeOS HQ to discuss the possibility of having EiffelBench (at the time) running on BeOS.

Yesterday evening I decided to try Haiku OS in VMWare (they provide a daily build of Haiku OS on their website). Of course after a few minutes, I could not resist to try compiling Eiffel code on it. So first I needed to compile the run-time, it was not so easy because the VMWare image they provide contains nothing for development. They are actually building Haiku OS on Linux using Ubuntu 7.10.

First I add to get subversion to checkout the source code:


Then I had to get the development tools for BeOS:


And last, patching the development tools by using this version of GCC:


Once I had that in place, I checked out the runtime from our mirror repository of Origo. I had to do that because the subversion package (mentioned above) is an old one and does not support https which is the only protocol supported by Origo. This is a minor nuisance since our mirror is a read-only version and therefore I have to copy my files over a different machine to perform the commit.

After checking out the source code, I configured the runtime to get a new configuration file for Haiku. After a few attempts and hacking <be/support/Errors.h> to rename B_BUSY into B_BUSY2 (we unfortunately define B_BUSY in our run-time) I had built a finalized runtime. I've committed my changes at rev#73300 in our repository for anyone to try.

Currently I did not have time to look at 2 issues which prevents a full build of the runtime:

  • Cannot compile the workbench runtime due to our communication stuff for debugging
  • Cannot compile the multithreaded support since Haiku has its own threading model.

Once I had done that, I compiled the calculator example on Haiku to see if it worked and it did. Next step was obviously compiling the batch compiler (the graphical would not do since we rely on GTK or Win32 for our UI and none of them exist on Haiku). I had a few issue with our internationalization code (since Haiku has limited support for it or at least no `iconv' emulation) but got rid of the issues by commenting out pieces of our code. And the compiler compiled just fine and executed as well.

I've uploaded an Eiffel delivery for Haiky on our Origo and Sourceforge mirror for those who are interested in trying it. Note that it only contains the bare minimum to compile finalized executable (no workbench support and no multithreading support). To use it simply defines the following environment variable:

  • ISE_EIFFEL to the path where Eiffel62 directory is located
  • ISE_PLATFORM to haiku-x86

For more info on Developing for Haiku, read the following development page:http://www.haiku-os.org/development

Happy Eiffeling on Haiku

  • Bernd Schoeller (16 years ago 10/5/2008)

    Oh yes, the BeBox

    My BeBox 2x133 is taking on dust. Perhaps I should reactivate it to see if I can get Eiffel to work on it ;-)

    Nice job Manu, if I find some time I will have a look at your build - but it looks like the latest family extension is not keeping you sufficiently busy :D