Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.2
-
None
Description
When using AppleClang 15 (which is automatically provided by Xcode 15 which is the default Xcode version on macOS right now), moc is successfully compiled, but will fail to run:
dyld[56529]: Symbol not found: __ZTVNSt3__13pmr15memory_resourceE Referenced from: <UUID> qt6/qtbase/build_arm64/libexec/moc Expected in: <UUID> /usr/lib/libc++.1.dylib
The reason for this is that memory_resource is included in qduplicatetracker_p.h, guarded by #if __has_include(<memory_resource>).
The Xcode documentation specifies that this language feature is indeed available in AppleClang 15, but requires a macOS 14 deployment target.
The preprocessor guard thus succeeds, but the dynamic library loader will not be able to resolve the symbol if the deployment target isn't correct.