Compiling Julia master on High Sierra


#1

I have been compiling Julia on MacOS for a couple of years now. I can no longer successfully compile on High Sierra (10.13.2) though. Compilation always fails in libuv with the following error:

$ make CC=gcc-7 CXX=g++-7
  CC       src/libuv_la-threadpool.lo
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Security.framework/Headers/AuthSession.h:32:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:43,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/CSIdentity.h:43,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/OSServices.framework/Headers/OSServices.h:27,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/IconsCore.h:23,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:22,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:39,
                 from /Users/daniel.casimiro/src/julia/deps/srccache/libuv-d8ab1c6a33e77bf155facb54215dd8798e13825d/src/unix/internal.h:53,
                 from /Users/daniel.casimiro/src/julia/deps/srccache/libuv-d8ab1c6a33e77bf155facb54215dd8798e13825d/src/threadpool.c:25:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:193:7: error: variably modified 'bytes' at file scope
  char bytes[kAuthorizationExternalFormLength];
       ^~~~~
make[2]: *** [src/libuv_la-threadpool.lo] Error 1
make[1]: *** [scratch/libuv-d8ab1c6a33e77bf155facb54215dd8798e13825d/build-compiled] Error 2
make: *** [julia-deps] Error 2

Google has not been very useful. What is the trick?

I used homebrew to install gcc.

$ gcc-7 --version
gcc-7 (Homebrew GCC 7.2.0) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

XCode is at Version 9.2 (9C40b).


#2

Why not use clang?

cc -v
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Found CUDA installation: /usr/local/cuda, version 8.0

I use it every day to build the most recent 0.7-DEV Julia version …


#3

Same here, I’m also on High Sierra, and I rebuild julia 2-3 times a day :wink:


#4

It looks like clang is working. Thanks. I thought that I had to use gcc for compatibility with gfortran.