How to compile bfs_fuse for m1 mac

I am at a loss how to compile bfs_fuse on my m1 macbook.
i have compiled the haiku jam and put it in my PATH

coolcoder613@ebmacbook /Volumes/HAIKU_BUILD/haiku master @ jam '<build>bfs_fuse'
 

Starting build of type regular ... 
AddHaikuImagePackages: package bash not available! 
AddHaikuImagePackages: package bc not available! 
AddHaikuImagePackages: package freetype not available! 
AddHaikuImagePackages: package libsolv not available! 
AddHaikuImagePackages: package zlib not available! 
AddHaikuImagePackages: package coreutils not available! 
AddHaikuImagePackages: package icu66 not available! 
AddHaikuImagePackages: package gcc_syslibs not available! 
/Volumes/HAIKU_BUILD/haiku/src/add-ons/kernel/bus_managers/isa/arch/Jamfile: No such file or directory

Segmentation fault

Possibly related #16171 ([bfs_fuse] Segmentation fault: 11 on macOS) – Haiku

jam ‘@bfs_fuse’
outputs:

Starting build of type regular ... 
Build profile <build>bfs_fuse not defined. 

jam ‘@bfs_fuse

This command makes no sense. The @ is used to reference a build profile. For example @nightly-anyboot if you want to build a nightly image in anyboot format. It is independant of the target you want to build, which is just given by name, for example jam bfs_fuse (this would compile a version of bfs_fuse that runs on Haiku).

In your case you want to run bfs_fuse on your Mac, so jam <build>bfs_fuse is indeed the correct command.

The segmentation fault you get (if there is no other output) seems to be a crash of jam? Is there a way to get a debug report for it on Mac OS in some way?

when i do jam ‘bfs_fuse’ it looks to me like it is ignoring it, and trying to build an image, because why would it be running AddHaikuImagePackages?

To build an executable, it has to first build all libraries it depends on. So it will compile several things, and before it does that, it also needs to download and extract all dependencies. AddHaikuImagePackages may be invoked during that step. Maybe some dependencies could be optimized and more fine-grained here.

i did ./configure --host-only because otherwise it fails with:

  CCLD     libbfd.la
/opt/homebrew/bin/x86_64-elf-ar: internal stat error on //
make[4]: *** [libbfd.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-bfd] Error 2
make: *** [all] Error 2