Building Haiku_x64 from within Haiku_x64

It’s been a long while since I’ve tinkered with Haiku_x64, but decided to pick it up again on a whim. Downloaded the buildtools, the Haiku sources, make’d and ./configure’d the buildtools and then ran jam -q haiku-image. Shortly thereafter, ran into the exact same error I ran into years ago! It’s still there! If I leave off -q, it gets a lot further, but still dies (Build Failure) at the end.

I can’t believe that JAM’ing Haiku-x64 is still impossible after over a year. Surely there must be something I’m doing wrong.

Here is what I did in the exact order, in Terminal:

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

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

cd buildtools/jam
make
./jam0 install

cd …/…/…

cd haiku

./configure

jam -q haiku-image

Is any of that wrong or done in the wrong order or using the wrong commands?

If so, I’d appreciate someone giving me the EXACT steps I need to take, to build Haiku_x64 from within Haiku_x64 correctly/successfully.

Instruction for building Haiku x86_64, work on 32 and 64 bit Haiku:

git clone https://review.haiku-os.org/buildtools
git clone https://review.haiku-os.org/haiku
cd haiku
mkdir generated.x86_64
cd generated.x86_64
../configure --build-cross-tools x86_64 ../../buildtools
jam -q -j2 @nightly-anyboot
2 Likes

The exact steps are documented on the website:
https://www.haiku-os.org/guides/building/compiling-x86_64

The ones you used are a mix of instructions from Linux (installing Jam, which is not needed on Haiku), and the instructions for 32bit Haiku (running configure without --build-cross-tools). So they wouldn’t work anywhere.

1 Like

Ok, here’s the tail end of following those instructions:

AddVariableToScript1 haiku.image-init-vars
warning: using independent target /boot/home/haiku/generated.x86_64/./haiku.image-init-vars
warning: using independent target /boot/home/haiku/generated.x86_64/./haiku.image-make-dirs
warning: using independent target /boot/home/haiku/generated.x86_64/./haiku.image-copy-files
warning: using independent target /boot/home/haiku/generated.x86_64/./haiku.image-extract-files
BuildHaikuImage1 haiku.image
…/build/scripts/build_haiku_image: line 81: --uses-fifos: command not found

Creating image …
…/build/scripts/build_haiku_image: line 264: -i600M: command not found

export imagePath=“haiku.image”
export isImage=“1”
export isVMwareImage=""
…/build/scripts/build_haiku_image /boot/home/haiku/generated.x86_64/./haiku.image-init-vars /boot/home/haiku/generated.x86_64/./haiku.image-make-dirs /boot/home/haiku/generated.x86_64/./haiku.image-copy-files /boot/home/haiku/generated.x86_64/./haiku.image-extract-files

…failed BuildHaikuImage1 haiku.image …

BUILD FAILURE:
…failed updating 2 target(s)…
…skipped 2 target(s)…
…updated 1743 target(s)…
~/haiku/generated.x86_64>

What went wrong? I followed the instructions, to the letter, and it still failed. What next?

The fs_shell command is missing. Please include a full build log, not just the last part. There is likely an other error earlier on in the build.

Is it possible that I need to update Haiku (no matter how recent the revision), to install a necessary or updated component that is needed by Jam? I’m doing that right now.

I was following the instructions given to me by X512, exactly in the order he listed them. Assuming nothing he quoted was wrong or in the wrong order, it should work, correct?

So, how could the fs_shell command be missing? Is it not automatically included with the nightly revisions or the cross build tools I downloaded?

As PulkoMandy said, you should check the build log. fs_shell is in the haiku source tree.

Where is the build log located?

In your terminal window.

You copied “the tail end” of it. We need all of it, because usually Jam will continue for a while after the first error it hits. the last message is rarely the root cause of problems.

It is probably a better idea to not directly posting it here, but using pastebin, for example.

I found this on the pre-requisite software page, for Haiku:

pkgman (Haiku package system)

Basic requirements:

pkgman install mtools cmd:python3 cmd:xorriso

Could NOT installing this software cause the build issue I was having?

Is your buildtools in a sub-directory of haiku? I build on 64 bit occasionally, and it took me a while to figure out how to get it working right.

The instructions I got from X512 are exactly how I ran things (each line executed in sequential order), from a clean install of Haiku x86_64, only a few revisions old.

I’d appreciate any suggestions or steps or advice you could offer in this regard. If someone could just make a complete “package” (directory) of a working/buildable Haiku x86_64 setup, that would really solve the problem. At this point, I’m not concerned WHY things don’t work, I just want them TO work. :smiley:

Uh, possibly, yes. If installing them fixes the problem, we should try to improve the error message.

1 Like

Actually, what needs to be done is to have someone write up an instruction page (step-by-step, much as I did in the past) on how to build Haiku from within Haiku. Right now, all there is are bits and pieces of information scattered across pages, that, to someone like me, is quite confusing. And, since the last time I update my build instructions, most of the information has become obsolete or changed so radically, none of it works anymore.

For example, let me show you the last instruction I wrote for building Haiku from within Haiku and you append it to show what the NEW instructions should be:


These instructions assume you have Haiku64 installed and running on your system.

Ready to begin? Great! Let’s go!

NOTE: If you copy and paste the bold text, to the Terminal prompts, where instructed, you will save yourself a lot of typing!

Click on the Haiku Leaf (in Deskbar) and go to Applications -> Terminal and click, to open Terminal.

At the prompt, type:

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

To update the build tools, go to this same directory and type: git pull

When the prompt reappears, type:

cd haiku/buildtools/jam
make
./jam0 install

When the prompt reappears, type:

cd …/…/…

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

To download the 64-bit version of Haiku, type:

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

This will download the entire Haiku source tree.
To update the Haiku source tree, go to the haiku/haiku directory and type: git pull

When the prompt reappears, type:

cd haiku/haiku

To make a 64-bit (GCC4) build of Haiku, type:

./configure

If you want to create just a Haiku image file, at the prompt, type:

jam -q haiku-image

If you want to create a CD image of Haiku, in the Generated folder, change the above final command to:

jam -q haiku-cd

If you want to create an Anyboot image of Haiku, in the Generated folder, change the above final command to:

jam -q haiku-anyboot-image

Install the chosen versions of Haiku to it’s appropriate media.


A page should exist on the website that is a “Building Haiku for Dummies” reference. Written in (as I call it) “Fool’s English” (so simple, even a fool could understand it). I’d be more than glad to maintain the page, provided devs keep me up-to-date on the latest changes to the rules.

Can you please include a full build log? Because we still don’t know what the problem was. How can we fix our instruction pages if we don’t know what the problem is when they don’t work?

The instructions already have a single entry point: https://www.haiku-os.org/guides/building and are split in multiple pages because otherwise we would repeat the same instructions a thousand times (when building from 32bit haiku, when building from 64bit haiku, when building from ubuntu, when building from debian, when building from archlinux, …; and also when you want to submit patches vs when you don’t ; when you want to build for x86 vs. when you want to build for ARM, etc.) and most of these pages would be out of date whenever we change something. This is why you have to keep your brain connected when you follow these instructions, and pick the steps that apply to your case.

From this page it is obvious to me that you need to:

  1. Install the needed software
  2. Get the sourcecode
  3. Build for x86_64

And the instructions can be combined in different ways, for example if you want to build the SPARC port from Debian:

  1. Install the needed software
  2. Get the sourcecode
  3. Build for x86_64

And you can very easily derive the instructions for any other case as well. This looks simple enough to me? I’m sorry but I would say the problem is that you did not check this page at all, and went with “I know how to do this!”.

Also, these instructions are also given in ReadMe.Compiling.Md in Haiku sources at the root directory, which you clearly also didn’t check. Would listing the same instructions again in a third place help? I’m not so sure…

2 Likes

Installing them, using a current haiku and buildtools checkout on a recent 64 bit Haiku install following X512’s steps results a successful build here, it runs in qemu:

Maybe using jam -q j2 @nightly-raw instead don’t need this packages?

Python3 is definitely needed in general now. xorriso should not be under that target, yes.