Open jcelerier opened 2 years ago
After we upgraded to boost 1.79.0, macOS 12.5.1 and Xcode 13.4.1 we started getting on macOS 10.14 and below:
Date/Time: 2022-09-05 16:18:07.120 +0200 OS Version: Mac OS X 10.14.6 (18G9216) Report Version: 12 Anonymous UUID: D66AD689-B4E2-6363-C03B-587A0BECA90E
Time Awake Since Boot: 2900 seconds
System Integrity Protection: enabled
Crashed Thread: 10
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x4] Symbol missing
Dyld Error Message: Symbol not found: _aligned_alloc Referenced from: /Library/N-central Agent/nagent Expected in: /usr/lib/libSystem.B.dylib
We are testing this as a fix:
if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.15")
target_compile_definitions (${PROJECT_NAME} PRIVATE -DBOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC)
endif (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.15")
The problem:
config.hpp:
yields true on macOS as the standard library "has" aligned_alloc and defines _LIBCPP_HAS_ALIGNED_ALLOC in recent macOS SDKs.
But it is only supported for macOS >= 10.15 (the function is not present in libc in 10.14 and before) which fails at runtime on this hardware.
Here's the code from Apple's libc:
The guard should be :