Unexpected error building on Ventura 13.4

Up to now I've been building my x64 binaries on Sequioa specifying a target macOS level of 13.4. That worked fine.

In an attempt to debug a problem that was causing some pain I created a 13.4 x64 build environment and tried to build the code there.

This code:

	using CacheKeyType = std::filesystem::path;
	using CacheValueType = std::tuple<LoadedImage, int, bool>; // <image, lastUse, currentlyLoading>
	using CacheType = std::unordered_map<CacheKeyType, CacheValueType>;

	friend class ThreadLoader;

	static inline constexpr int16_t MAXIMAGESINCACHE = 20;
	static inline constinit std::atomic_int age{ 0 };
	static inline std::shared_mutex rwMutex{};
	static inline CacheType imageCache{};

got me the following errors:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__hash_table:838:5: error: static_assert failed due to requirement 'integral_constant<bool, false>::value' "the specified hash does not meet the Hash requirements"
    static_assert(__check_hash_requirements<_Key, _Hash>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__hash_table:853:1: note: in instantiation of template class 'std::__enforce_unordered_container_requirements<std::filesystem::path, std::hash<std::filesystem::path>, std::equal_to<std::filesystem::path>>' requested here
typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/unordered_map:1152:30: note: while substituting explicitly-specified template arguments into function template '__diagnose_unordered_container_requirements' 
        static_assert(sizeof(__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0)), "");
                             ^
/Users/amonra/.vs/DSS/build/DeepSkyStackerKernel/DeepSkyStackerKernel_autogen/EWIEGA46WW/../../../../DeepSkyStackerKernel/imageloader.h:60:26: note: in instantiation of member function 'std::unordered_map<std::filesystem::path, std::tuple<LoadedImage, int, bool>>::~unordered_map' requested here
        static inline CacheType imageCache{};
                                ^
2 errors generated.

Which isn't "mega-helpful" :( I thought that specifying:

set(CMAKE_OSX_DEPLOYMENT_TARGET 13.4 CACHE STRING "Minimum operating system version for deployment" FORCE)

would have made the compilations use the same headers as for Ventura above, but it seems not?

Is this to be expected?

I created a 13.4 x64 build environment and tried to build the code there.

What do you mean by that? Did you install macOS 13.4? If so, what Xcode are you running on it?

Keep in mind that Xcode has very strict system requirements. See Developer > Support > Xcode. There’s no version of Xcode 16 that runs on macOS 13, and even Xcode 15 requires macOS 13.5, not 13.4.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I forget that it stared out as 13.4 but got updated to 13.7.5. XCode 14.3 is installed.

Maybe I should install XCode 15.2? Quite likely that will give me a later version of the C++ Std library...

Unfortunately I still get:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/unordered_map:523:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__hash_table:844:5: error: static assertion failed due to requirement 'integral_constant<bool, false>::value': the specified hash does not meet the Hash requirements
    static_assert(__check_hash_requirements<_Key, _Hash>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__hash_table:859:1: note: in instantiation of template class 'std::__enforce_unordered_container_requirements<std::filesystem::path, std::hash<std::filesystem::path>, std::equal_to<std::filesystem::path>>' requested here
typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/unordered_map:1152:30: note: while substituting explicitly-specified template arguments into function template '__diagnose_unordered_container_requirements' 
        static_assert(sizeof(std::__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0)), "");
                             ^
/Users/amonra/.vs/DSS/build/DeepSkyStackerKernel/DeepSkyStackerKernel_autogen/EWIEGA46WW/../../../../DeepSkyStackerKernel/imageloader.h:60:26: note: in instantiation of member function 'std::unordered_map<std::filesystem::path, std::tuple<LoadedImage, int, bool>>::~unordered_map' requested here
        static inline CacheType imageCache{};
                                ^
2 errors generated.

So I can't actually build my code there which is a bit of nuisance.

Ho-hum: So ist das Leben!

I changed the code so it can build on this level as well

I changed the code so it can build on this level as well

So we’re all good?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unexpected error building on Ventura 13.4
 
 
Q