I’ve reached bottom and despair…
I’ve tried MANY times to build julia with MKL. I’ve done all sorts of gimmicks and tricks people mention here at GitHub and all over the internet. Repetitive failure each time more or less with a different error.
My machine:
MBP 15-inch Early 2017
2.9GHz Inter Core i7
macOS High Sierra 10.13.1
with:
MKL version 2018 Update 1
I document here my latest attempt:
.zshrc
:
source /opt/intel/mkl/bin/mklvars.sh intel64 ilp64
export TBBROOT=fdsljkfds
Make.user
:
USEICC = 0
USEIFC = 0
USE_INTEL_MKL = 1
USE_INTEL_MKL_FFT = 1
USE_INTEL_LIBM = 1
MKLROOT = /opt/intel/compilers_and_libraries/mac/mkl
LIBM = /opt/intel/compilers_and_libraries/mac/lib -limf
Then I removed the /intel64
as well as some if statements from Make.inc
as described at #18167. My Make.inc
reads now:
988 # Intel libraries
989
990 ifeq ($(USE_INTEL_LIBM), 1)
991 USE_SYSTEM_LIBM := 1
992 LIBM := -L$(MKLROOT)/../compiler/lib -limf
993 LIBMNAME := libimf
994 endif
995
996 ifeq ($(USE_INTEL_MKL), 1)
997 # ifeq ($(USE_BLAS64), 1)
998 export MKL_INTERFACE_LAYER := ILP64
999 MKLLIB := $(MKLROOT)/lib
1000 # else
1001 # MKLLIB := $(MKLROOT)/lib/ia32
1002 # endif
1003 USE_SYSTEM_BLAS:=1
1004 USE_SYSTEM_LAPACK:=1
1005 # ifeq ($(OS), WINNT)
1006 # LIBBLASNAME := mkl_rt
1007 # LIBLAPACKNAME := mkl_rt
1008 # # work around libtool issue with arpack
1009 # MKL_LDFLAGS := -L$(MKLLIB) -Wl,-lmkl_rt
1010 # else
1011 LIBBLASNAME := libmkl_rt
1012 LIBLAPACKNAME := libmkl_rt
1013 MKL_LDFLAGS := -L$(MKLLIB) -lmkl_rt
1014 # endif
1015 ifneq ($(strip $(MKLLIB)),)
1016 ifeq ($(OS), Linux)
1017 RPATH_MKL := -Wl,-rpath,$(MKLLIB)
1018 RPATH += $(RPATH_MKL)
1019 MKL_LDFLAGS += $(RPATH_MKL)
1020 endif
1021 endif
1022 LIBBLAS := $(MKL_LDFLAGS)
1023 LIBLAPACK := $(MKL_LDFLAGS)
1024 endif
1025
1026 ifeq ($(USE_INTEL_MKL_FFT), 1)
1027 USE_SYSTEM_FFTW := 1
1028 LIBFFTWNAME := libmkl_rt
1029 LIBFFTWFNAME := libmkl_rt
1030 endif
I create folder usr/lib
and link files:
ln -s /opt/intel/lib/libimf.dylib usr/lib/libimf.dylib
ln -s /opt/intel/mkl/lib/libmkl_rt.dylib usr/lib/libmkl_rt.dylib
ln -s /opt/intel/lib/libintlc.dylib usr/lib/libintlc.dylib
Then, running make
gives (this time):
CC libcurl_la-connect.lo
/Users/navid/julia/deps/srccache/curl-7.53.1/lib/connect.c:1087:12: error: 'connectx' is only available on macOS
10.11 or newer [-Werror,-Wunguarded-availability]
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
^~~~~~~~
/usr/include/sys/socket.h:713:5: note: 'connectx' has been explicitly marked partial here
int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int,
^
/Users/navid/julia/deps/srccache/curl-7.53.1/lib/connect.c:1087:12: note: enclose 'connectx' in a
__builtin_available check to silence this warning
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
^~~~~~~~
1 error generated.
make[4]: *** [libcurl_la-connect.lo] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [scratch/curl-7.53.1/build-compiled] Error 2
make: *** [julia-deps] Error 2