fatal bug in master: December 26, 2023

Hello everyone, I couldn’t find much information on this online so thought I’d post this here.

Using the latest version of Spack on an apple M3 Pro:

Fails with an ats error. Looks like the ats stuff is from “Mac Catalyst 13.1–13.1” which is currently deprecated. Any advice on how to fix without changing the compiler to apple clang? It also fails on cmake 3.27.7

The full error:

56 errors found in build log:
     1676    [ 82%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalXCodeGenerator.cxx.o
     1677    [ 82%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmLocalXCodeGenerator.cxx.o
     1678    [ 82%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmGlobalWatcomWMakeGenerator.cxx.o
     1679    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATS.h:32,
     1680                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:27,
     1681                     from /private/var/folders/nv/nxs3xpbs20x9_r7sr_25ygb80000gn/T/keithhbova/spack-stage/spack-stage-cmake-master-guejrg26vbskqx44mnd2ylvp5yxrn5ya/spack-src/Source/cmGlobalXCode
             Generator.cxx:63:
  >> 1682    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:230:24: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1683      230 | ATSGetGeneration(void) ATS_UNAVAILABLE;
     1684          |                        ^~~~~~~~~~~~~~~
  >> 1685    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:370:38: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1686      370 |   ATSFontContainerRef *  oContainer) ATS_UNAVAILABLE;
     1687          |                                      ^~~~~~~~~~~~~~~
  >> 1688    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:388:35: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1689      388 |   ATSOptionFlags        iOptions) ATS_UNAVAILABLE;
     1690          |                                   ^~~~~~~~~~~~~~~
  >> 1691    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:480:38: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1692      480 |   ATSFontContainerRef *  oContainer) ATS_UNAVAILABLE;
     1693          |                                      ^~~~~~~~~~~~~~~
  >> 1694    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:518:30: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1695      518 |   Boolean          iEnabled) ATS_UNAVAILABLE;
     1696          |                              ^~~~~~~~~~~~~~~
  >> 1697    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:544:36: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1698      544 | ATSFontIsEnabled(ATSFontRef iFont) ATS_UNAVAILABLE;
     1699          |                                    ^~~~~~~~~~~~~~~
  >> 1700    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:564:43: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1701      564 |   void *                         iRefCon) ATS_UNAVAILABLE;
     1702          |                                           ^~~~~~~~~~~~~~~
  >> 1703    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:584:40: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1704      584 |   ATSFontFamilyIterator *  ioIterator) ATS_UNAVAILABLE;
     1705          |                                        ^~~~~~~~~~~~~~~
  >> 1706    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:599:66: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1707      599 | ATSFontFamilyIteratorRelease(ATSFontFamilyIterator * ioIterator) ATS_UNAVAILABLE;
     1708          |                                                                  ^~~~~~~~~~~~~~~
  >> 1709    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:619:63: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1710      619 |   ATSFontFamilyIterator *  ioIterator)                        ATS_UNAVAILABLE;
     1711          |                                                               ^~~~~~~~~~~~~~~
  >> 1712    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:636:63: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1713      636 |   ATSFontFamilyRef *      oFamily)                            ATS_UNAVAILABLE;
     1714          |                                                               ^~~~~~~~~~~~~~~
  >> 1715    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:653:30: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1716      653 |   ATSOptionFlags   iOptions) ATS_UNAVAILABLE;
     1717          |                              ^~~~~~~~~~~~~~~
  >> 1718    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:668:54: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1719      668 | ATSFontFamilyGetGeneration(ATSFontFamilyRef iFamily) ATS_UNAVAILABLE;
     1720          |                                                      ^~~~~~~~~~~~~~~
  >> 1721    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:686:29: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1722      686 |   CFStringRef *      oName) ATS_UNAVAILABLE;
     1723          |                             ^~~~~~~~~~~~~~~
  >> 1724    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:723:37: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1725      723 |   void *                   iRefCon) ATS_UNAVAILABLE;
     1726          |                                     ^~~~~~~~~~~~~~~
  >> 1727    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:744:38: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1728      744 |   ATSFontIterator *      ioIterator) ATS_UNAVAILABLE;
     1729          |                                      ^~~~~~~~~~~~~~~
  >> 1730    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:759:63: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1731      759 | ATSFontIteratorRelease(ATSFontIterator * ioIterator)          ATS_UNAVAILABLE;
     1732          |                                                               ^~~~~~~~~~~~~~~
  >> 1733    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:779:63: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1734      779 |   ATSFontIterator *      ioIterator)                          ATS_UNAVAILABLE;
     1735          |                                                               ^~~~~~~~~~~~~~~
  >> 1736    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:796:63: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1737      796 |   ATSFontRef *      oFont)                                    ATS_UNAVAILABLE;
     1738          |                                                               ^~~~~~~~~~~~~~~
  >> 1739    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:813:31: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1740      813 |   ATSOptionFlags   iOptions)  ATS_UNAVAILABLE;
     1741          |                               ^~~~~~~~~~~~~~~
  >> 1742    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:830:30: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1743      830 |   ATSOptionFlags   iOptions) ATS_UNAVAILABLE;
     1744          |                              ^~~~~~~~~~~~~~~
  >> 1745    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:850:34: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1746      850 |   ItemCount *           oCount)  ATS_UNAVAILABLE;
     1747          |                                  ^~~~~~~~~~~~~~~
  >> 1748    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:865:40: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1749      865 | ATSFontGetGeneration(ATSFontRef iFont) ATS_UNAVAILABLE;
     1750          |                                        ^~~~~~~~~~~~~~~
  >> 1751    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:883:27: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1752      883 |   CFStringRef *    oName) ATS_UNAVAILABLE;
     1753          |                           ^~~~~~~~~~~~~~~
  >> 1754    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:901:27: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1755      901 |   CFStringRef *    oName) ATS_UNAVAILABLE;
     1756          |                           ^~~~~~~~~~~~~~~
  >> 1757    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:920:53: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1758      920 |   ByteCount *  oSize)             /* can be NULL */ ATS_UNAVAILABLE;
     1759          |                                                     ^~~~~~~~~~~~~~~
  >> 1760    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:941:55: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1761      941 |   ByteCount *    oSize)             /* can be NULL */ ATS_UNAVAILABLE;
     1762          |                                                       ^~~~~~~~~~~~~~~
  >> 1763    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:959:31: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1764      959 |   ATSFontMetrics *  oMetrics) ATS_UNAVAILABLE;
     1765          |                               ^~~~~~~~~~~~~~~
  >> 1766    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:977:31: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1767      977 |   ATSFontMetrics *  oMetrics) ATS_UNAVAILABLE;
     1768          |                               ^~~~~~~~~~~~~~~
  >> 1769    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:995:60: error: expected initializer bef
             ore 'ATS_UNAVAILABLE'
     1770      995 | ATSFontFamilyFindFromQuickDrawName(ConstStr255Param iName) ATS_UNAVAILABLE;
     1771          |                                                            ^~~~~~~~~~~~~~~
  >> 1772    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1012:29: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1773     1012 |   Str255             oName) ATS_UNAVAILABLE;
     1774          |                             ^~~~~~~~~~~~~~~
  >> 1775    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1108:54: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1776     1108 |   ByteCount *  oSize)             /* can be NULL */  ATS_UNAVAILABLE;
     1777          |                                                      ^~~~~~~~~~~~~~~
  >> 1778    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1146:57: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1779     1146 |   void *                info)         /* can be NULL */ ATS_UNAVAILABLE;
     1780          |                                                         ^~~~~~~~~~~~~~~
  >> 1781    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1193:71: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1782     1193 |   ATSFontNotificationRef *  oNotificationRef)       /* can be NULL */ ATS_UNAVAILABLE;
     1783          |                                                                       ^~~~~~~~~~~~~~~
  >> 1784    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1225:72: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1785     1225 | ATSFontNotificationUnsubscribe(ATSFontNotificationRef notificationRef) ATS_UNAVAILABLE;
     1786          |                                                                        ^~~~~~~~~~~~~~~
  >> 1787    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1353:75: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1788     1353 |   const ATSFontQuerySourceContext *  context)           /* can be NULL */ ATS_UNAVAILABLE;
     1789          |                                                                           ^~~~~~~~~~~~~~~
  >> 1790    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1514:78: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1791     1514 | ATSFontSetGlobalAutoActivationSetting(ATSFontAutoActivationSetting iSetting) ATS_UNAVAILABLE;
     1792          |                                                                              ^~~~~~~~~~~~~~~
  >> 1793    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1536:45: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1794     1536 | ATSFontGetGlobalAutoActivationSetting(void) ATS_UNAVAILABLE;
     1795          |                                             ^~~~~~~~~~~~~~~
  >> 1796    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1579:55: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1797     1579 |   CFURLRef                       iApplicationFileURL) ATS_UNAVAILABLE;
     1798          |                                                       ^~~~~~~~~~~~~~~
  >> 1799    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSFont.h:1614:78: error: expected initializer be
             fore 'ATS_UNAVAILABLE'
     1800     1614 | ATSFontGetAutoActivationSettingForApplication(CFURLRef iApplicationFileURL)  ATS_UNAVAILABLE;
     1801          |                                                                              ^~~~~~~~~~~~~~~
     1802    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:21,
     1803                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9,
     1804                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11,
     1805                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35:
  >> 1806    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:392:15: error: expected unqualified-id before '^' token
     1807      392 | typedef void (^CGPathApplyBlock)(const CGPathElement * element);
     1808          |               ^
  >> 1809    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:392:15: error: expected ')' before '^' token
     1810      392 | typedef void (^CGPathApplyBlock)(const CGPathElement * element);
     1811          |              ~^
     1812          |               )
  >> 1813    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h:394:53: error: 'CGPathApplyBlock' has not been declared
     1814      394 | CG_EXTERN void CGPathApplyWithBlock(CGPathRef path, CGPathApplyBlock CF_NOESCAPE block)
     1815          |                                                     ^~~~~~~~~~~~~~~~
     1816    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:14,
     1817                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:15,
     1818                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:16,
     1819                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:23:
  >> 1820    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:103:15: error: expected unqualified-id before '^' token
     1821      103 | typedef bool (^CGPDFArrayApplierBlock)(size_t index,
     1822          |               ^
  >> 1823    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:103:15: error: expected ')' before '^' token
     1824      103 | typedef bool (^CGPDFArrayApplierBlock)(size_t index,
     1825          |              ~^
     1826          |               )
  >> 1827    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:113:5: error: 'CGPDFArrayApplierBlock' has not been declared
     1828      113 |     CGPDFArrayApplierBlock cg_nullable block, void * __nullable info)
     1829          |     ^~~~~~~~~~~~~~~~~~~~~~
  >> 1830    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:116:15: error: expected unqualified-id before '^' token
     1831      116 | typedef bool (^CGPDFDictionaryApplierBlock)(const char * key,
     1832          |               ^
  >> 1833    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:116:15: error: expected ')' before '^' token
     1834      116 | typedef bool (^CGPDFDictionaryApplierBlock)(const char * key,
     1835          |              ~^
     1836          |               )
  >> 1837    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:126:5: error: 'CGPDFDictionaryApplierBlock' has not been declar
             ed
     1838      126 |     CGPDFDictionaryApplierBlock cg_nullable block, void * __nullable info)
     1839          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     1840    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ImageIO.framework/Headers/ImageIO.h:20,
     1841                     from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:47:
  >> 1842    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:42:15: error: expected unqualified-id before '^' token
     1843       42 | typedef void (^CGImageSourceAnimationBlock)(size_t index, CGImageRef image, bool* stop);
     1844          |               ^
  >> 1845    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:42:15: error: expected ')' before '^' token
     1846       42 | typedef void (^CGImageSourceAnimationBlock)(size_t index, CGImageRef image, bool* stop);
     1847          |              ~^
     1848          |               )
  >> 1849    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:50:107: error: 'CGImageSourceAnimationBlock' has not been declared
     1850       50 | IMAGEIO_EXTERN OSStatus CGAnimateImageAtURLWithBlock(CFURLRef url, CFDictionaryRef _iio_Nullable options, CGImageSourceAnimationBlock block) IMAGEIO_AVAILABLE_STARTING(10.15, 13.0);
     1851          |                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  >> 1852    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageAnimation.h:58:108: error: 'CGImageSourceAnimationBlock' has not been declared
     1853       58 | IMAGEIO_EXTERN OSStatus CGAnimateImageDataWithBlock(CFDataRef data, CFDictionaryRef _iio_Nullable options, CGImageSourceAnimationBlock block) IMAGEIO_AVAILABLE_STARTING(10.15, 13.0);
     1854          |                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  >> 1855    make[2]: *** [Source/CMakeFiles/CMakeLib.dir/cmGlobalXCodeGenerator.cxx.o] Error 1
     1856    make[2]: *** Waiting for unfinished jobs....
  >> 1857    make[1]: *** [Source/CMakeFiles/CMakeLib.dir/all] Error 2
  >> 1858    make: *** [all] Error 2


What Xcode, macOS deployment target, and SDK is in use here?

I just have the command line Xcode installed:

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version
version: 15.1.0.0.1.1700200546

This was using Spack on osx Sonoma, the MacBook Pro 18gb (m3-pro).

I tried

cxxflags=-DwxBUILD_INSTALL=OFF 

but unfortunately that did not work either.

Downloading the latest xtools from the Apple Store did not work either. Steps to reproduce:

In a spack environment:

spack add gcc@13.2.0
spack concretize
spack install

Deactivate and create a new spack env. These are the contents of my package:

# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
  # add package specs to the `specs` list
  specs:
  - openmpi
  view: true
  concretizer:
    unify: true
  compilers:
  - compiler:
      spec: gcc@=13.2.0
      paths:
        cc: /Users/keithhbova/spack/var/spack/environments/default/.spack-env/view/bin/gcc
        cxx: /Users/keithhbova/spack/var/spack/environments/default/.spack-env/view/bin/g++
        f77: /Users/keithhbova/spack/var/spack/environments/default/.spack-env/view/bin/gfortran
        fc: /Users/keithhbova/spack/var/spack/environments/default/.spack-env/view/bin/gfortran
      flags: {}
      operating_system: sonoma
      target: aarch64
      modules: []
      environment: {}
      extra_rpaths: []

And add/ build cmake

spack add cmake
spack concretize
spack install -v -j22

Link to the thread with spack:

Maintainers:

I don’t think there’s much to be done on the CMake side. The /Applications/Xcode-15.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSDefines.h file conditionally defines ATS_UNAVAILABLE based on __has_extension(attribute_deprecated_with_message) without an #else. Either the SDK needs to handle non-Clang compilers or GCC needs to declare this feature. I’m not sure which is the right answer, but there’s no place for CMake to conditionally define this reliably as a fallback in case something changes and the SDK starts defining the symbol itself.

Update: this topic has been solved. I believe the bug is with apple. I went through and edited the source code in the application services. More details on the GitHub page.