We are seeing a crash on Big Sur 11.7.10 after switching the build system to use Xcode 15
Excerpt from crash
Time Awake Since Boot: 1700 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x4] Symbol missing
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Symbol not found: __ZNSt3__17codecvtIDiDu11__mbstate_tE2idE
Referenced from: /Applications/SecureworksTaegis.app/Contents/MacOS/com.secureworks.agent.daemon.app/Contents/MacOS/com.secureworks.agent.daemon
Expected in: /usr/lib/libc++.1.dylib
in /Applications/SecureworksTaegis.app/Contents/MacOS/com.secureworks.agent.daemon.app/Contents/MacOS/com.secureworks.agent.daemon
Build system has the following specs :
ProductName: macOS ProductVersion: 14.3.1 BuildVersion: 23D60
Xcode 15.2 Build version 15C500b
CMAKE PROPS
- set(CMAKE_CXX_STANDARD 20)
- set(CMAKE_CXX_EXTENSIONS OFF)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0)
Thanks for that. It confirms that your main executable is built correctly, that is:
-
It’s using the macOS 14.2 SDK:
sdk 14.2
-
With a deployment target of macOS 11:
minos 11.0
Comparing the macOS 11.3 and macOS 12.0 SDKs, I see that __ZNSt3__17codecvtIDiDu11__mbstate_tE2idE
is present in the latter and not in the former. That suggests that this symbol was added in macOS 12, and hence the failure you’re seeing.
Demangling the symbol I see:
% c++filt __ZNSt3__17codecvtIDiDu11__mbstate_tE2idE
std::__1::codecvt<char32_t, char8_t, __mbstate_t>::id
So, we’re talking about the converter from char32_t
to char8_t
. Digging through the SDKs again, I see that the equivalent symbol is present for other conversions, including:
// macOS 11.3 SDK
std::__1::codecvt<char32_t, char, __mbstate_t>::id
std::__1::codecvt<char16_t, char, __mbstate_t>::id
std::__1::codecvt<char, char, __mbstate_t>::id
std::__1::codecvt<wchar_t, char, __mbstate_t>::id
// macOS 12 SDK
std::__1::codecvt<char32_t, char, __mbstate_t>::id
std::__1::codecvt<char16_t, char, __mbstate_t>::id
std::__1::codecvt<char, char, __mbstate_t>::id
std::__1::codecvt<wchar_t, char, __mbstate_t>::id
std::__1::codecvt<char32_t, char8_t, __mbstate_t>::id <<< new
std::__1::codecvt<char16_t, char8_t, __mbstate_t>::id <<< new
So it seems that macOS 12 added char8_t
support.
I see two options here:
-
Raise your deployment target to macOS 12.
-
Modify your code to not rely on the
char8_t
converter.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"