Building and Contributing to Haiku on x86_64

Hey guys, so I installed Haiku and was learning development on its API using the Learning to Program series by DarkWym. Finally I decided to build the source myself, in order to get my feet wet with contributions.
So, I was able to compile the buildtools and image using JAM, without much issues using the following two commands

../configure --cross-tools-source ../../buildtools --build-cross-tools x86_64

jam -q -j3 @nightly-raw

which created a haiku-nightly.image file of around 700MB.
So, my main motive was to try my hand at #9640 and remove compilation warnings, so I uncommented the line

EnableWerror src add-ons kernel file_systems xfs ;

from /haiku/build/jam/ArchitectureRules and ran the commands again, expecting an error but nothing happened. So wanted to know, what is that I’m doing wrong?

Edit
Platform: Ubuntu 22.10

1 Like

Hello, welcome here :smiley:

There are multiple possible reasons for this:

  • xfs is not included in the nightly image. So you need to compile it separately: jam -q -j3 xfs
  • When changing a jamfile, jam does not correctly track dependencies and does not rebuild the affected files. So, every time you uncomment an “EnableWerror” line, you have to delete the corresponding object files (something like rm generated/objects/haiku/release/add-ons/kernel/file_systems/xfs/*.o) and make sure they are built again
  • Sometimes the warnings/errors will only be present in the 32 bit version of Haiku. One simple way to handle this is to push your change for review, and let the commit checker bot compile it on all architectures.
  • It may happen that one of the directories in fact has no warnings, even if -Werror was not yet enabled.

Hope this helps!

1 Like

Alright, I’ll check it out and give an update. Thanks for the reply.

Welcome aboard, (I’m just a user, myself, & very recent at that), we look forwards to your contributions, the more able people, the better, should help towards a first major release.

1 Like

Usually i just use jam clean to for the same reason, isn’t that the same?

1 Like

ayy thanks for the warm welcome, I’m just now getting into OS development and all. Haiku really looks like a great place to get involved in.

yep, works. Thanks a lot for the help

Depending on your setup, jam clean does not always work (for example when xattrs emulation is used). Also, you can only clean everything, not just a single directory.

Otherwise, yes, it is very similar.