Building Haiku on Ubuntu Linux, Step by Step

Submitted by Ryan Leavengood on Sat, 2007-07-21 04:11.   Tags:  :: :: ::

Another article on this site already describes the basics of building Haiku on Linux. Since my distribution of choice is Ubuntu, I decided to get Haiku building on it and then provide a detailed step-by-step guide for others to follow.

I performed these steps on a fresh Ubuntu 7.04 (Feisty Fawn) install, but they should be similar for other versions and probably the same for most Debian-based distributions.

  1. Install the needed packages for building:
    
    sudo apt-get install subversion autoconf automake texinfo flex bison gawk build-essential
    			
  2. Create the Haiku development directories and get the Haiku build tools source:
    
    mkdir develop
    cd develop
    mkdir haiku
    cd haiku
    svn checkout svn://svn.berlios.de/haiku/buildtools/trunk buildtools
    			
  3. Build and install the Haiku Jam:
    
    cd  buildtools/jam
    make
    sudo ./jam0 install
    cd ../..
    			
  4. Get the Haiku source (this will take a while): For anonymous check-out:
    
    svn checkout svn://svn.berlios.de/haiku/haiku/trunk trunk
    			
    For an existing Haiku developer:
    
    svn checkout svn+ssh://developername@svn.berlios.de/svnroot/repos/haiku/trunk trunk
    			

    If there are any errors when checking out above, just cd into the trunk directory and type "svn up" to get any missed files. This also applies when updating the code in the future.

  5. Build the cross compiler tools (GCC 2.95):
    
    cd ~/develop/haiku/trunk
    ./configure --build-cross-tools ../buildtools/
    			
    To build with GCC 4.x the configure line is:
    
    ./configure  --build-cross-tools-gcc4 x86 ../buildtools/
    			

    But keep in mind this will produce binaries which are not compatible with BeOS.

  6. Build the Haiku image:
    
    jam haiku-image
    			
    To build for testing in VMWare:
    
    jam haiku-vmware-image
    			

    A VMWare configuration file for running this image can be found at 3rdparty/vmware/haiku.vmx

That is it! Not too bad. Thanks to Ingo and the various other contributors for making the Linux compiling so easy.



TheNerd
Submitted by TheNerd on Tue, 2007-09-04 22:21.

Thanks for the tutorial Ryan! I was able to build the Haiku VMware image on the first try.

leavengood
Submitted by Ryan Leavengood on Wed, 2007-09-05 02:58.
Quote:

Thanks for the tutorial Ryan! I was able to build the Haiku VMware image on the first try.

Great! I wanted to make it as painless as possible. Of course most of the credit for this goes to Ingo and friends for making our nice build system.

TheNerd
Submitted by TheNerd on Wed, 2007-09-05 13:58.
Quote:

Great! I wanted to make it as painless as possible. Of course most of the credit for this goes to Ingo and friends for making our nice build system.

Well I will also say thanks to Ingo and Friends as well :). I managed to get it built and even copied it to a partition and made it bootable. Unfortunately Haiku doesn't like my hardware much but the VMware image works well.

yookoala
Submitted by Koala Yeung on Tue, 2007-10-23 07:59.

Question: How do I use this image?

umccullough
Submitted by Urias McCullough on Tue, 2007-10-23 18:46.

Basically these are raw disk/partition images, so you can either copy them to a physical partition and launch Haiku natively, or you can use them in a virtual machine.

Perhaps this is a better article for you:

http://haiku-os.org/documents/dev/installing_haiku_to_a_partition_from_l...

I apologize for the short, and somewhat uninformative reply, but these are basically the same images created for download on the factory site (where you'll find links to various virtual machine links):

http://haiku-os.org/build_factory

and HaikuHost:

http://haikuhost.com/

also some links here:

http://haiku-os.org/downloads

berzirker
Submitted by berzirker on Sat, 2008-03-22 19:33.

I got successfully to the last step, but now I'm stuck. I have read through both readme files in haiku/trunk to no avail. Type 'jam haiku-image', get back "No 'BuildConfig' found in generated/build! Run ./configure in the source tree's rood directory first!" I have tried ./configure in ~/develop/haiku/trunk/generated/build and ~/develop/haiku. I get back bash: ./configure: No such file or directory. I understand this is a noob question, but I'm trying and willing to learn so give me a shot. What is the source tree's root directory? and what in there needs to be configured?

leavengood
Submitted by Ryan Leavengood on Sat, 2008-03-22 20:51.

Hi berzirker,

I think unfortunately right now the build tools are in a state of flux and I suspect step 5 above may have failed for you because of this. To fix this you can checkout a working revision of the build tools by going to the buildtools directory (which should be ~/develop/haiku/buildtools if you followed the above exactly) and typing the following:


svn update -r 24507

This will update the build tools code to the last working revision, which was 24507. If you then repeat steps 5 and 6 it should work.

The configure file that is being complained about is in the ~/develop/haiku/trunk directory and that is what you use in step 5 above. I suspect that failed because apparently it did not create the BuildConfig file you need to build.

Here is the mailing list posting that describes the problems with the build tools:

http://www.freelists.org/archives/haiku-development/03-2008/msg00454.htm...

Hope this helps,
Ryan