How do I build Haiku, in Ubuntu/Lubuntu/Puppy Linux, using Git

I used to do my own builds of Haiku, but now I don’t know what to do, because the repository has been changed from Svn to Git. How much has changed about the process? Just the download of tools/source or more? There doesn’t seem to be an all-in-one document, detailing the entire build process, except mine, which is no no longer valid, because various aspects have changed. I can write up a revised one, but I need to know how much has changed and what hasn’t.

This is a snippet of my most recently updated docs, based on what I think has changed, based on what I could find:

Changes are in bold.

Ready to begin? Great! Let’s go!

Bring up the Terminal (it’s in Application → Accessories).

Type: sudo apt-get install git autoconf automake texinfo flex bison gawk build-essential

Type in your System password and hit [Enter]. Ubuntu will download/install various files.

When you see the Terminal prompt again, type:

git clone git://git.haiku-os.org/buildtools.git haiku/buildtools

When the Terminal reappears, type:

cd haiku/buildtools/jam
make
sudo ./jam0 install

Type your System password, if necessary, on the last command.

When the Terminal prompt reappears, type:

cd …/…/…

This will take you back to where Terminal started, when you first ran it.

Now type:

git clone git://git.haiku-os.org/haiku.git haiku/haiku

This will download the entire Haiku source tree.

Let me know if this is the right way to go about doing it or not. Thanks!

Yep it seems right to me, too :slight_smile:
You can then compile with:

jam -q

… but the last time I’ve tried to compile Haiku (2-3 days ago)I get a lot of build errors… and:

git pull --rebase

does nothing sadly :-(((

Is it fixed now?

I’ve updated now and I got this error:

C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATAChannel.o 
C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATADevice.o 
C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATAHelper.o 
C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATAModule.o 
C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATAPIDevice.o 
C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATARequest.o 
C++ generated/objects/haiku/x86/release/add-ons/kernel/bus_managers/ata/ATATracing.o 
C++ generated/objects/haiku_host/x86/release/tools/settype.o 
Link generated/objects/haiku_host/x86/release/tools/settype 
Chmod1 generated/objects/haiku_host/x86/release/tools/settype 
C++ generated/objects/haiku_host/x86/release/tools/mimeset.o 
C++ generated/objects/haiku_host/x86/release/tools/Mime.o 
C++ generated/objects/haiku_host/x86/release/tools/database_support.o 
C++ generated/objects/haiku_host/x86/release/tools/UpdateMimeInfoThread.o 
C++ generated/objects/haiku_host/x86/release/tools/MimeUpdateThread.o 
C++ generated/objects/haiku_host/x86/release/tools/AppFileInfo.o 
src/build/libbe/storage/AppFileInfo.cpp: In member function 'virtual status_t BAppFileInfo::GetType(char*) const':
src/build/libbe/storage/AppFileInfo.cpp:183:54: error: 'B_MIME_STRING_TYPE' was not declared in this scope
src/build/libbe/storage/AppFileInfo.cpp: In member function 'virtual status_t BAppFileInfo::SetType(const char*)':
src/build/libbe/storage/AppFileInfo.cpp:226:12: error: 'B_MIME_STRING_TYPE' was not declared in this scope
src/build/libbe/storage/AppFileInfo.cpp:229:40: error: 'B_MIME_STRING_TYPE' was not declared in this scope
src/build/libbe/storage/AppFileInfo.cpp: In member function 'status_t BAppFileInfo::GetSignature(char*) const':
src/build/libbe/storage/AppFileInfo.cpp:261:9: error: 'B_MIME_STRING_TYPE' was not declared in this scope
src/build/libbe/storage/AppFileInfo.cpp: In member function 'status_t BAppFileInfo::SetSignature(const char*)':
src/build/libbe/storage/AppFileInfo.cpp:304:12: error: 'B_MIME_STRING_TYPE' was not declared in this scope
src/build/libbe/storage/AppFileInfo.cpp:308:45: error: 'B_MIME_STRING_TYPE' was not declared in this scope

gcc -c "src/build/libbe/storage/AppFileInfo.cpp" -O2 -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar -include headers/build/HaikuBuildCompatibility.h -D_ZETA_USING_DEPRECATED_API_=1 -D_ZETA_TS_FIND_DIR_=1 -DARCH_x86 -D_NO_INLINE_ASM -DCOMPILE_FOR_R5 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAIKU_HOST_PLATFORM_HAIKU -iquote build/user_config_headers -iquote build/config_headers -iquote src/tools -iquote generated/objects/common/tools -iquote generated/objects/haiku_host/x86/common/tools -iquote generated/objects/haiku/x86/common/tools -iquote src/bin -I headers/build -I headers/build/private/app -I headers/build/private/storage -I headers/build/host/haiku_host -I headers/build/os/storage -o "generated/objects/haiku_host/x86/release/tools/AppFileInfo.o" ;

...failed C++ generated/objects/haiku_host/x86/release/tools/AppFileInfo.o ...

BUILD FAILURE:
...failed updating 1 target(s)...
...skipped 4 target(s)...
...updated 130 target(s)...

I’m doing something wrong?
I’m compilin’ on Haiku itself… I suppose this release is broken :frowning:

I’m, in reality, interested to compile only libbe.so (Support Kit) there is a way to compile only this target and not all the Haiku image (that, incidentally not compile)?

 Thanks!

Remember that live code repo may contain code which isn’t finished yet. I guess you have to check out specific revision (tag/branch) which is marked as stable.

Yes… You’ve some suggestion to checkout (or clone as git like to say) a stable release?

P.S. the checked out image was broken… extracted r43238 (that is the Haiku image in which I’m writing, and so I know it compiled :slight_smile: ) and done a branch with:

git checkout -b mybranch hrev43238

and now finally it compiles…
Another tip if you want to compile only a module you do:

jam -q MODULE NAME

for example to compile only libbe.so and all Haiku image you do:

jam -q libbe.so

Finally I can create my getNum() BString methods :slight_smile:

I tried my modifications and they work. Just did a build of both a Haiku .image and .ISO in Lubuntu 11.04 (Actually, I’m in FireFox 7 in Lubuntu right now, typing this… off an 8Gb USB thumb drive, no less!). I’ve polished v3 of my instructs, if anyone wants them. They should work in Ubuntu as well, with minor wording differences in the instructs. I can also modify v2 (which applies to Ubuntu (Intrepid Ibex)) for the most recent changes, if anyone needs it.

I am actually amazed how fast git downloads the sources for both the buildtools and Haiku! Much faster than SVN and I think it takes up a lot less diskspace, too? Or maybe it just looks that way?

I’m trying to make an old PII 266Mhz system usable, speed-wise (Ubuntu is slow and Lubuntu won’t even boot on it, so I’m going to see if Puppy Linux will do the trick (the LiveCD boots and seems to run ok) and then see what changes I need to make to my instructs, to build Haiku in Puppy Linux.