This is a hack. Do not apply in on PowerPC systems, it is not needed there. See comments in: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10616 --- Source/CPack/cmCPackDragNDropGenerator.cxx +++ Source/CPack/cmCPackDragNDropGenerator.cxx 2025-04-09 05:30:02.000000000 +0800 @@ -29,7 +29,7 @@ #include "cmValue.h" #include "cmXMLWriter.h" -#if HAVE_CoreServices +#if HAVE_CoreServices && defined(__clang__) // For the old LocaleStringToLangAndRegionCodes() function, to convert // to the old Script Manager RegionCode values needed for the 'LPic' data // structure used for generating multi-lingual SLAs. @@ -609,7 +609,7 @@ kCFStringEncodingMacRoman); LangCode lang = 0; RegionCode region = 0; -#if HAVE_CoreServices +#if HAVE_CoreServices && defined(__clang__) OSStatus err = LocaleStringToLangAndRegionCodes(iso_language_cstr, &lang, ®ion); if (err != noErr) @@ -620,7 +620,7 @@ << iso_language_cstr << std::endl); return 0; } -#if HAVE_CoreServices +#if HAVE_CoreServices && defined(__clang__) header_data.push_back(region); header_data.push_back(i); header_data.push_back(0); --- Source/cmGlobalXCodeGenerator.cxx +++ Source/cmGlobalXCodeGenerator.cxx 2025-04-09 05:32:50.000000000 +0800 @@ -61,7 +61,7 @@ # include # include # include -# if !TARGET_OS_IPHONE +# if !TARGET_OS_IPHONE && defined(__clang__) # define HAVE_APPLICATION_SERVICES # include # endif