#14963 closed bug (fixed)
[Build System] error: 'strcmp' was not declared in this scope (on macos) — at Version 10
Reported by: | diver | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta2 |
Component: | Build System | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
macOS Mojave 10.14.6
- create an image with DiskUtil and format it with Mac OS Extended (Case-sensitive, Journaled)
brew install autoconf xorriso gawk git wget nasm less mpfr gmp libmpc bison mtools brew link bison --force git clone --depth=1 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
https://discuss.haiku-os.org/t/build-haiku-on-mac-failed/7876/13
Change History (10)
comment:1 by , 6 years ago
comment:2 by , 5 years ago
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:4 by , 5 years ago
I've run into this on Windows with case-sensitive NTFS with MSYS2, following hrev54127. I've confirmed that the two different String.h cannot be opened with different cases, but nonetheless, the error occurs.
comment:5 by , 5 years ago
Probably needs this patch: https://gitlab.uni.lu/ehamzic/openc2x_embedded/commit/81cc26c706b2bc8c8c1eb1a322e5c5157900836e
comment:6 by , 5 years ago
I added
#define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 0
to the top of that file (as the lower defines are in #ifndef) and it did not help.
comment:7 by , 5 years ago
Ah, there are actually two copies of that file: one in binutils and one in gcc. Maybe both need to be modified.
comment:8 by , 5 years ago
Nope, that produced no difference, either. However, it looks like I have a system libiberty installed, which may be the source of this problem. I'll try removing it and see if that helps.
comment:10 by , 5 years ago
Description: | modified (diff) |
---|
../src/system/libnetwork/netresolv/irs/nslexer.l:44:10: fatal error: nsparser.h: No such file or directory
fixed by brew link bison --force
Successfully built haiku-nightly-anyboot.iso on macOS.
IIRC when I investigated this with jscipione, a syscall trace showed that GCC was not even looking for
String.h
, and instead was just includingstring.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.