Compilation errors when compiling CMake on Mac OSX 10.12.6 with gcc 7.1
Hi,
I tried to compile CMake 3.9.1 with gcc 7.1 on the latest Mac OSX release (10.12.6). During compilation I got the following errors
[ 10%] Building C object Utilities/cmcurl/lib/CMakeFiles/cmcurl.dir/file.c.o In file included from /System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32:0, from /System/Library/Frameworks/Security.framework/Headers/Security.h:43, from /opt/alibuild/sw/SOURCES/CMake/v3.9.1/v3.9.1/Utilities/cmcurl/lib/urldata.h:148, from /opt/alibuild/sw/SOURCES/CMake/v3.9.1/v3.9.1/Utilities/cmcurl/lib/file.c:52: /System/Library/Frameworks/Security.framework/Headers/Authorization.h:192:7: error: variably modified 'bytes' at file scope char bytes[kAuthorizationExternalFormLength]; ^~~~~
Since the problem is related to the native SSL/TLS implementation the problem could be solved by changing excluding Apple OS native SSL/TLS implementation. Please find the change in the respective CMakeLists.txt in the attached patch.
The second error is due to a missing header file which is probably included implicitly when using clang. The needed correction is also in the attached patch.
When running the tests the same tests fail as for the normal compilation with the clang compiler.
The following tests FAILED: 78 - Architecture (Failed) 174 - BundleTest (Failed) 183 - TestsWorkingDirectory (Failed) 431 - CMake.GetFilenameComponentRealpath (Failed)
Best regards
Florian Uhlig
Edited by Brad King