Haiku Build on macOS

I could not reproduce your error. Could you check if you have the command line tools of xcode installed?

P.S.: I gave up on the Apple Silicon build but please continue your efforts. I installed Fedora 43 ARM in UTM (virtualization mode) and was able to compile the build tools and Haiku (x86_64) there. I am so waiting for Arm64 port for Haiku so that I can run Haiku in virtualization mode. Shout out to @dodo75: Any draft code will do! I will try to help fixing bugs. (Might be more trying than fixing.) :slight_smile:

P.P.S.:

The first error I encounter is:

static declaration of ‘strchrnul’ follows non-static declaration in ../src/libs/libsolv/solv/repodata.c:246:27

As work-around you can out-comment the method “static inline const char *strchrnul” in repodata.c

The proper solution would be to clarify why “ifndef HAVE_STRCHRNUL” was evaluated to true. I.e. why HAVE_STRCHRNUL is not defined.

Here’s the corresponding log:

generated.x86_64 % jam -q -j2 @nightly-raw 
Starting build of type regular ... 
Building Haiku Nightly 
AddHaikuImagePackages: package mawk not available! 
Asked for bios_ia32 target boot platform 
Unknown path to handle adding to image 
Asked for pxe_ia32 target boot platform 
Unknown path to handle adding to image 
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...found 104516 target(s)...
...updating 16473 target(s)...
InitScript1 haiku.image-init-vars 
AssembleNasm objects/haiku/x86_64/release/system/boot/platform/bios_ia32/stage1.bin 
AddTargetVariableToScript1 <unique!target>_target_081 
AddTargetVariableToScript1 <unique!target>_target_181 
AddTargetVariableToScript1 <unique!target>_target_281 
Link objects/darwin/arm64/release/tools/makebootable/platform/bios_ia32/makebootable 
AddTargetVariableToScript1 <unique!target>_target_381 
AddTargetVariableToScript1 <unique!target>_target_481 
Cc objects/darwin/arm64/release/build/libsolv/repodata.o 
../src/libs/libsolv/solv/repodata.c:17:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
   17 | #define _GNU_SOURCE
      |         ^
<command line>:9:9: note: previous definition is here
    9 | #define _GNU_SOURCE 1
      |         ^
ld: warning: search path '/opt/local/lib' not found
Chmod1 objects/darwin/arm64/release/tools/makebootable/platform/bios_ia32/makebootable 
AddFileDataAttribute1 objects/darwin/arm64/release/tools/makebootable/platform/bios_ia32/makebootable 
../src/libs/libsolv/solv/repodata.c:191:64: warning: variable 'len' is uninitialized when used here [-Wuninitialized]
  191 |           for (sp = data->schemadata + data->schemata[i], h = 0; *sp; len++)
      |                                                                       ^~~
../src/libs/libsolv/solv/repodata.c:180:13: note: initialize the variable 'len' to silence this warning
  180 |   int h, len, i;
      |             ^
      |              = 0
../src/libs/libsolv/solv/repodata.c:246:27: error: static declaration of 'strchrnul' follows non-static declaration
  246 | static inline const char *strchrnul(const char *str, char x)
      |                           ^
2 Likes