#14963 closed bug (fixed)
[Build System] error: 'strcmp' was not declared in this scope (on macos)
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 (13)
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.
follow-up: 12 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.
comment:11 by , 5 years ago
That's already in the build instructions at https://www.haiku-os.org/guides/building/pre-reqs
And I guess make macOS a supported OS again there?
comment:12 by , 5 years ago
Replying to diver:
../src/system/libnetwork/netresolv/irs/nslexer.l:44:10: fatal error: nsparser.h: No such file or directoryfixed by
brew link bison --force
Successfully built haiku-nightly-anyboot.iso on macOS.
Does this build on the latest macOS i.e. Catalina (10.15.4) Most likely people will try the latest Xcode to attempt building Haiku which is 11.4.1 (11E503a).
Replying to pulkomandy:
And I guess make macOS a supported OS again there?
That depends on the version of macOS and Xcode. I'm not sure if this fixes building on High Sierra and later, but ideally we should support building on the latest stable versions of both macOS and Xcode. I'm trying out a build on Catalina and the latest Xcode myself. I'll report here if it builds or not.
comment:13 by , 5 years ago
Milestone: | Unscheduled → R1/beta2 |
---|
Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone
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.