Problems Installing Julia and MKL OSX



Hello guys,

I tried to install julia with MKL but I got an error when compiling the code.
I pretty much followed what is explained here:

Do you have any hints on what to do? Here I list the steps I took:

My steps
  • Download MKL from intel website (m_mkl_2019.0.117.dmg)

  • Open m_mkl_2019.0.117.dmg and follow the installation instructions

  • Create a folder:

    mkdir  julia_from_source
  • Tell the path of MKL
source /opt/intel/mkl/bin/ intel64
  • donwload the julia git repo
    git clone
  • Checkout to a stable julia version:
    cd julia
    git checkout v1.0.1
  • Change the code in to specify to use MKL

Chage this

	## Settings for various Intel tools
	# Set to 1 to use MKL

to this

## Settings for various Intel tools
# Set to 1 to use MKL
  • install cmake
brew install cmake
  • Compile the code

Prints, after 30 min of compiling…

    CC src/cgmemmgr.o
    CC src/llvm-api.o
    LINK usr/lib/libjulia.1.0.dylib
    CC ui/repl.o
    LINK usr/bin/julia
Creating usr/etc/julia/startup.jl
Copying in usr/share/man/man1/julia.1
/Applications/julia_from_source/julia/contrib/ 755 /Applications/julia_from_source/julia/contrib/julia-config.jl /Applications/julia_from_source/julia/usr/share/julia/
    PERL base/pcre_h.jl
    PERL base/errno_h.jl
    PERL base/build_h.jl.phony
    PERL base/file_constants.jl
    PERL base/uv_constants.jl
    PERL base/version_git.jl.phony
make[1]: *** [/Applications/julia_from_source/julia/usr/lib/julia/libmkl_rt.dylib] Error 1
make: *** [julia-base] Error 2


Could you finally build it successfully?


I am thinking about trying to do this in a docker so that, If I end up beeing able to do it, anyone can use the same Dockerfile.


I’ve only done this on Linux, but I’d follow the ‘official’ steps here: (while not very detailed) rather than the ones in the StackOverflow answer. vs. is one of the differences between those two. No need to edit, that’s what Make.user is for (create if it doesn’t exist). Also, use make -j 6 e.g. to compile using 6 threads (adjust to your system), to reduce compilation time.


Oh, see also