Building julia on MacOS 10.12.2

I have been trying to build julia from source on my mac so that I can use Clang.jl but i have been running into the following error message:

gfortran: error trying to exec ‘f951’: execvp: No such file or directory
make[4]: *** [slamch.o] Error 1
make[3]: *** [lapack_install] Error 2
make[2]: *** [netlib] Error 2
*** Clean the OpenBLAS build with ‘make -C deps clean-openblas’. Rebuild with ‘make OPENBLAS_USE_THREAD=0’ if OpenBLAS had trouble linking libpthread.so, and with ‘make OPENBLAS_TARGET_ARCH=NEHALEM’ if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[1]: *** [build/openblas-12ab1804b6ebcd38b26960d65d254314d8bc33d6/libopenblas64_.dylib] Error 1
make: *** [julia-deps] Error 2

I made sure all the dependencies were installed and I had gcc/gfortran installed with homebrew. Thanks for your help!

Possibly a corrupted homebrew install. See if brew doctor turns anything up, and potentially re-run the gcc/gfortran installation.

Thanks brew doctor turned up so many problems I ended up doing a fresh install of macOS 10.12.2 . Then I did an xcode-select --install, and used brew to install gcc (for gfortran), pkg-config, and cmake. All other required build tools were already installed. At this point, brew doctor didn’t show any problems.

I then followed the instructions in the Julia readme for building from source, and used git checkout release-0.5 and put BUILD_LLVM_CLANG=1 in Make.user inside the julia source folder. I get the following error when running make:
llvm[6]: Copying runtime library darwin/eprintf to build dir cp: /Users/ecx2093/julia/deps/build/llvm-3.7.1/build_Release/tools/clang/runtime/compiler-rt/clang_darwin/eprintf/libcompiler_rt.a: No such file or directory make[6]: *** [/Users/ecx2093/julia/deps/build/llvm-3.7.1/build_Release/Release/lib/clang/3.7.1/lib/darwin/libclang_rt.eprintf.a] Error 1 make[5]: *** [compiler-rt/.makeinstall] Error 2 make[4]: *** [install] Error 1 make[3]: *** [clang/.makeinstall] Error 2 make[2]: *** [install] Error 1 make[1]: *** [/Users/ecx2093/julia/usr/lib/libLLVMCodeGen.a] Error 2 make: *** [julia-deps] Error 2
Julia builds fine if i set BUILD_LLVM_CLANG=0. Any thoughts?

Looks like this issue may be related:

https://github.com/Keno/Cxx.jl/issues/300

Im running into the same issue of building from source

what are the minimun versions of compilers and cmake required
Ive tried using latest gcc 6.3 and gcc that come as default on the system
for example
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPP=/usr/bin/cpp
export LD=/usr/bin/ld
alias c++=/usr/bin/c++
alias g++=/usr/bin/g++
alias gcc=/usr/bin/clang
alias cpp=/usr/bin/clang++
alias cc=/usr/bin/gcc
alias ld=/usr/bin/ld

I smylink gcc to usr/local/bin
for the latest packages of the compiler
neither seems to work
anything I should be trying

tks
M

make OPENBLAS_USE_THREAD=0 OPENBLAS_TARGET_ARCH=NEHALEM

seems to have done the trick using a homebrew install of gcc g++ and gfortran
gcc version 6.3.0 (Homebrew GCC 6.3.0_1)