Opened 5 months ago

Last modified 6 days ago

#14963 new bug

[Build System] error: 'strcmp' was not declared in this scope (on macos)

Reported by: diver Owned by: bonefish
Priority: normal Milestone: Unscheduled
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

macOS Mojave 10.14.2

  • create an image with DiskUtil and format it with Mac OS Extended (Case-sensitive, Journaled)
  • git clone https://review.haiku-os.org/buildtools
  • git clone https://review.haiku-os.org/haiku
  • cd haiku
  • replace stat -c with stat -f in configure script (macOS uses an -f argument, rather than -c)
  • mkdir generated.x86_64; cd generated.x86_64
  • ../configure --build-cross-tools x86_64 ../../buildtools
  • jam -q -j2 @nightly-anyboot

https://discuss.haiku-os.org/t/build-haiku-on-mac-failed/7876/13

Change History (3)

comment:1 Changed 5 months ago by waddlesplash

IIRC when I investigated this with jscipione, a syscall trace showed that GCC was not even looking for String.h, and instead was just including string.h, as if the filesystem was case-insensitive. I didn't find any reason for why it would do that, and asking the GCC developers, they said that their builds handled this case just fine (they did not test with our cross tools though.) So I am rather stumped.

comment:2 Changed 6 days ago by jscipione

I don't think that case-sensitivity is the issue here because I tried replacing every instance of #include <string.h> with #include <cstring> and it still ends up erroring out looking for missing symbols from string.h.

comment:3 Changed 6 days ago by waddlesplash

Guess what <cstring> does?

#include <string.h>

So, that proves nothing.

Note: See TracTickets for help on using tickets.