fix: macOS ARM64 + Xcode 26+ Hunter package compatibility#18
Open
pgarciagon wants to merge 1 commit intokoinos:masterfrom
Open
fix: macOS ARM64 + Xcode 26+ Hunter package compatibility#18pgarciagon wants to merge 1 commit intokoinos:masterfrom
pgarciagon wants to merge 1 commit intokoinos:masterfrom
Conversation
Four Hunter package fixes to allow koinos-cmake consumers to build natively on Apple Silicon (arm64) with Xcode 16+/libc++ 26+: - fizzy: use pgarciagon/fizzy fix/macos-libcxx26-char-traits; wraps bytes.hpp in clang diagnostic pragma to suppress char_traits<uint8_t> deprecation (hard error on Xcode 26 beta) - ZLIB: use pgarciagon/zlib fix/macos-fdopen-conflict; guards fdopen() NULL macro in zutil.h with !defined(__APPLE__) to avoid conflict with macOS stdio.h declaration - rocksdb: append -march=armv8-a+crc+crypto to CXX/C flags; PORTABLE=ON does not auto-detect ARM CRC when a toolchain file is active - libsecp256k1-vrf: pass GMP_LIBRARY/GMP_INCLUDE_DIR pointing at Homebrew /opt/homebrew (Apple Silicon prefix); FindGMP.cmake only searches /usr/local by default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Building koinos-chain natively on Apple Silicon (arm64) with Xcode 16+ fails in
four different Hunter-managed packages due to macOS/ARM64-specific issues:
bytes.hppusesstd::basic_string<uint8_t>which instantiateschar_traits<unsigned char>, deprecated in libc++ 16+ and a hard error inXcode 26 beta.
zutil.hdefinesfdopen(fd,mode) NULLwheneverTARGET_OS_MACis set. On macOS
TARGET_OS_MACis always true, silently replacing legitimatefdopen()calls withNULL.PORTABLE=ONand a CMake toolchain file, rocksdb's CRCauto-detection does not fire for ARM; the crc32c falls back to software and
the build may fail with strict compiler flags.
FindGMP.cmakesearches/usr/localonly; on AppleSilicon Homebrew installs GMP under
/opt/homebrew, causing configure to fail.Fix
-march=armv8-a+crc+cryptotoCMAKE_CXX_FLAGS/CMAKE_C_FLAGSGMP_LIBRARY/GMP_INCLUDE_DIRpointing at/opt/homebrewThe fizzy and ZLIB entries reference temporary forks while the upstream PRs are
reviewed; they should be reverted to canonical URLs once those PRs are merged.
Testing
Full koinos-chain build on macOS 15, Apple M3, arm64, Xcode 16.3 / Xcode 26 beta.