MantisBT - CMake
View Issue Details
0015762CMakeCMakepublic2015-10-01 19:152016-03-07 09:12
Damian Rouson 
 
normalblockalways
closedsuspended 
Macbook ProOS X 10.10.5
CMake 3.3 
 
0015762: bootstrap fails on OS X 10.10.5 (Yosemite)
Below is the tail of the output from running "./bootstrap --prefix=${PWD}" on OS X 10.10.5 (Yosemite). The same command completes successfully on Linux (Lubuntu).

Damian

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);
   ^
make: *** [cmBootstrapCommands1.o] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /Users/rouson/Code/sourceryinstitute/AdHoc/src/cmake/bug-xxxx/cmake-3.3.0/Bootstrap.cmk/cmake_bootstrap.log
#!/bin/bash
version=3.3
wget http://www.cmake.org/files/v$version/cmake-$version.0-1-src.tar.bz2 [^] &&
tar xvjf cmake-$version.0-1-src.tar.bz2 &&
tar xvjf cmake-$version.0.tar.bz2 &&
cd cmake-$version.0 &&
./bootstrap --prefix=${PWD} >&1 | tee build.log
The results from running the above script are viewable at https://github.com/sourceryinstitute/AdHoc/blob/master/src/cmake/bug-xxxx/build.log [^]
No tags attached.
log cmake_bootstrap.log (311,425) 2015-10-01 19:15
https://public.kitware.com/Bug/file/5534/cmake_bootstrap.log
Issue History
2015-10-01 19:15Damian RousonNew Issue
2015-10-01 19:15Damian RousonFile Added: cmake_bootstrap.log
2015-10-02 08:50Brad KingNote Added: 0039498
2015-10-02 09:24Sean McBrideNote Added: 0039499
2015-10-02 09:34Brad KingNote Added: 0039500
2015-10-02 09:42Sean McBrideNote Added: 0039501
2015-10-02 14:07Damian RousonNote Added: 0039503
2015-10-05 08:38Brad KingStatusnew => resolved
2015-10-05 08:38Brad KingResolutionopen => suspended
2016-03-07 09:12Robert MaynardNote Added: 0040599
2016-03-07 09:12Robert MaynardStatusresolved => closed

Notes
(0039498)
Brad King   
2015-10-02 08:50   
Bootstrapping on 10.10.4 works for me with Xcode 7 and no Command Line Tools installed.

What version of Xcode is installed? Since /usr/include exists do you also have the Xcode Command Line Tools installed?

Try specifying the system compilers directly:

  CC=cc CXX=c++ ./bootstrap
(0039499)
Sean McBride   
2015-10-02 09:24   
There's no bug here. Damian is using a compiler that does not support 'blocks' as required by the OS X SDK.
(0039500)
Brad King   
2015-10-02 09:34   
Re 0015762:0039499: The boostrap script is selecting 'gcc' and 'g++' by default, but on OS X these are no longer the preferred compilers. In this sense it may be a bug in the bootstrap script. I think it should pick 'cc' and 'c++' on OS X but first I'd like to make sure that actually resolves the problem.
(0039501)
Sean McBride   
2015-10-02 09:42   
Ah, interesting. gcc and g++ symlink to clang by default, but if he's got his own gcc installed, they may point there first.
(0039503)
Damian Rouson   
2015-10-02 14:07   
This bug can be closed. Someone on the Macports user mailing list explained to me that I need to build with the gcc and g++ that Apple installs with XCode rather than my own gcc and g++ (which were built by MacPorts). I'm all set.

On an unrelated note, it would be great to have a more descriptive name for the bzip2 tar files that have "-1" in the name. Someone else on the mailing list pointed out to me that those are for Cygwin so I also switched to using the gzipped tar balls. I had chosen the bzip2 ones to save on download time. It would be great if you included "Cygwin" in the name for the Cygwin tar balls. In fact, I plan to try building on Cygwin soon and would never have found the right tar balls if someone hadn't explained the naming convention.
(0040599)
Robert Maynard   
2016-03-07 09:12   
Closing resolved issues that have not been updated in more than 4 months.