[CMake] CMake 3.3 and 3.2 bootstrap fails on OS X Yosemite

Nils Gladitz nilsgladitz at gmail.com
Fri Oct 2 03:23:41 EDT 2015


On 10/02/2015 01:51 AM, Damian Rouson wrote:
> All,
>
> Could someone advise me on building CMake from source on OS X 10.10.5 (Yosemite)?  At the bottom of this email is the tail of the output from the following build script:
>
> g++ -I/Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Bootstrap.cmk -I/Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Source -I/Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Bootstrap.cmk -c /Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Source/cmBootstrapCommands1.cxx -o cmBootstrapCommands1.o
> In file included from /usr/include/dispatch/dispatch.h:51:0,
>                   from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
>                   from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
>                   from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
>                   from /Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Source/cmFindProgramCommand.cxx:16,
>                   from /Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Source/cmBootstrapCommands1.cxx:52:
> /usr/include/dispatch/object.h:143:15: error: expected unqualified-id before '^' token
>   typedef void (^dispatch_block_t)(void);
>                 ^
> /usr/include/dispatch/object.h:143:15: error: expected ')' before '^' token
> /usr/include/dispatch/object.h:362:3: error: 'dispatch_block_t' has not been declared
>     dispatch_block_t notification_block);
>     ^

I found 
http://hamelot.co.uk/programming/osx-gcc-dispatch_block_t-has-not-been-declared-invalid-typedef/ 
which says this is due to that bit of syntax (I've never seen that 
either) within /usr/include/dispatch/object.h being understood by clang 
but not by gcc.

Other sources [1] seem to say that this bit of syntax is supported by 
gcc as it used to be provided by Xcode.

I am guessing you are also using gcc without apple provided patches 
(e.g. homebrew)?

Nils

[1] 
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html


More information about the CMake mailing list