~snej

California, USA


#17 Up-to-date MacOS build instructions? 1 year, 1 day ago

Ticket created by ~snej on ~duangle/scopes

The MacOS build instructions in the docs (https://scopes.readthedocs.io/en/latest/intro/) are out of date and no longer work. I attempted to build scopes on MacOS 13.4.1 (ARM); everything went OK until the final make -C build command, which very quickly failed with C++ compile errors.

The problem seems to be that clang can’t find C library headers, judging by the first error reported. After that it starts complaining about unknown types… Here’s the beginning of the output:

==== Building gensyms (debug) ====
gensyms.cpp
hash.cpp
../src/gensyms.cpp:13:10: fatal error: 'assert.h' file not found
#include <assert.h>
         ^~~~~~~~~~
In file included from ../src/hash.cpp:10:
In file included from ../external/xxhash/xxhash.h:318:
In file included from ../external/xxhash/xxhash.c:107:
/opt/homebrew/opt/llvm/bin/../include/c++/v1/stdlib.h:150:34: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                 ^

The build instructions do say "You may also need to force installation of the macOS SDK headers: Open macOS_SDK_headers_for_macOS_10.14.pkg found in /Library/Developer/CommandLineTools/Packages …” Unfortunately that directory no longer exists.

I tried editing gensyms.make and adding a -I flag with Xcode’s system include path — /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include — but that just replaced the build errors with different ones where libc++ headers are complaining about the C library headers being incorrect.

Any ideas how to resolve this?