Working on making a Haiku build as an ISO image for installation to standard VM options on macOS (eg, Parallels) running Apple Silicon (arm64/AArch64) for further testing and development.
I’ve gotten to the point where it appears that the system built preliminarily and successfully on macOS. I’ll just outline my steps that got me to the point where jam’s ISO building is failing so others can have context:
brew install git cmake flex bison gawk cdrtools
mkdir -p ~/dev/os/haiku
cd ~/dev/os/haiku
# important due to Haiku's build system needing case sensitivity; create a big sparse image for prolonged use and growability:
hdiutil create -size 100g -fs "Case-sensitive APFS" -type SPARSE -volname HaikuBuild HaikuBuild.sparseimage
hdiutil attach HaikuBuild.sparseimage
# just for convenience in navigation:
ln -s /Volumes/HaikuBuild build
cd build
git clone https://review.haiku-os.org/haiku && git clone https://review.haiku-os.org/buildtools
# just to keep size down; (brew install applesauce):
applesauce compress LZFSE ./
cd ..
hdiutil detach /Volumes/HaikuBuild
hdiutil compact HaikuBuild.sparseimage
hdiutil attach HaikuBuild.sparseimage
# get jam ready early:
cd build/buildtools/jam
make
cd ../../
mkdir -p haiku/generated.arm64
cd haiku/generated.arm64
../configure --cross-tools-source ../../buildtools --build-cross-tools arm64
So at this point I believe it built “okay” and here’s the log of the build if you’d like to review anything:
Now at this point is where I can’t seem to build a CD ISO image:
$ ../../buildtools/jam/jam0 -q -j$(sysctl -n hw.ncpu) @release-cd
Starting build of type regular ...
build-feature packages unavailable on arm64: giflib glu mesa ffmpeg fluidlite libvorbis fontconfig gutenprint webkit libpng libicns jasper jpeg libedit qrencode_kdl tiff libdvdread libdvdnav libraw libwebp libavif live555 zstd
AddHaikuImagePackages: package bc not available!
AddHaikuImagePackages: package icu74 not available!
AddHaikuImagePackages: package wget not available!
AddHaikuImagePackages: package bzip2 not available!
AddHaikuImagePackages: package ffmpeg6 not available!
AddHaikuImagePackages: package glu not available!
AddHaikuImagePackages: package gutenprint9 not available!
AddHaikuImagePackages: package gzip not available!
AddHaikuImagePackages: package lame not available!
AddHaikuImagePackages: package libedit not available!
AddHaikuImagePackages: package libicns not available!
AddHaikuImagePackages: package mesa not available!
AddHaikuImagePackages: package mesa_devel not available!
AddHaikuImagePackages: package mesa_swpipe not available!
AddHaikuImagePackages: package netcat not available!
AddHaikuImagePackages: package sharutils not available!
AddHaikuImagePackages: package unzip not available!
AddHaikuImagePackages: package which not available!
AddHaikuImagePackages: package zip not available!
AddHaikuImagePackages: package diffutils not available!
AddHaikuImagePackages: package grep not available!
AddHaikuImagePackages: package tar not available!
AddHaikuImagePackages: package tcpdump not available!
AddHaikuImagePackages: package zstd not available!
../src/add-ons/kernel/debugger/disasm/arm64/Jamfile: No such file or directory
../src/bin/debug/ltrace/arch/arm64/Jamfile: No such file or directory
don't know how to make @release-cd
...patience...
...found 1 target(s)...
...can't find 1 target(s)...
Any thoughts on where to go from here to get to an installable CD image?
You can’t use jam0 directly to build Haiku. It is only useful to build the actual jam.
So:
run jam0 inside the buildtools/jam directory
then use the generated complete jam to build haiku
moreover, the “cd” profile is not supported anymore. You should probably use @release-anyboot instead, this will generate an image that can be booted as a cd, or as an usb disk with both bios and efi systems.
The anyboot image may still work? It has an EFI partition so, for EFI booting it should be fine. And there is no special support in the MMC image for Apple Silicon at the moment (I think there is for some other boards which need a specific partition layout).
This doesn’t include /usr/local/Cellar, so I assume this got included via some environment variable or compiler/linker configuration (unless /opt/local/lib or /usr/local/lib are somehow linking to it?)
The error happens not when building code to run in Haiku, but code for Mac OS that is used as part of the compilation process (we need to run a few of our own tools on the host machine). This means you may be able to reproduce this by trying to write a simple test file that links against zstd, and compile it, outside of Haiku buildsystem.