From 27a823ded89d6f66189aa0b565d62a46f6e9511f Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sun, 5 Apr 2015 02:44:45 -0400 Subject: [PATCH] switch openblas to a git-external resource --- deps/.gitignore | 9 +++-- deps/Makefile | 34 ++++++++----------- deps/Versions.make | 1 - deps/checksums/openblas-v0.2.14.tar.gz/md5 | 2 +- deps/checksums/openblas-v0.2.14.tar.gz/sha512 | 2 +- deps/openblas.version | 2 ++ 6 files changed, 24 insertions(+), 26 deletions(-) create mode 100644 deps/openblas.version diff --git a/deps/.gitignore b/deps/.gitignore index cdc0b8d730082..9eeac7af247b6 100644 --- a/deps/.gitignore +++ b/deps/.gitignore @@ -20,23 +20,26 @@ /llvm-* /lldb-* /mpfr-* -/openblas-* /patchelf-* /pcre-* !pcre-gcc49-compile.patch /root /SuiteSparse-* /zlib-* -/utf8proc-* /librandom.* /virtualenv-* /julia-env /objconv* /Rmath-julia* -# git externals: +# git-externals: /libuv +/libuv-* /openblas +/openblas-* /openlibm +/openlibm-* /openspecfun +/openspecfun-* /utf8proc +/utf8proc-* diff --git a/deps/Makefile b/deps/Makefile index ff43ea35da11d..d45f247e54c43 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -946,10 +946,12 @@ install-objconv: $(OBJCONV_TARGET) ## OpenBLAS ## # LAPACK is built into OpenBLAS by default +OPENBLAS_GIT_URL = git://github.com/xianyi/OpenBLAS.git +OPENBLAS_TAR_URL = https://api.github.com/repos/xianyi/OpenBLAS/tarball/$1 +$(eval $(call git-external,openblas,OPENBLAS,Makefile,libopenblas.$(SHLIB_EXT))) -OPENBLAS_OBJ_SOURCE = openblas-$(OPENBLAS_VER)/libopenblas.$(SHLIB_EXT) +OPENBLAS_OBJ_SOURCE = $(OPENBLAS_SRC_DIR)/libopenblas.$(SHLIB_EXT) OPENBLAS_OBJ_TARGET = $(build_shlibdir)/libopenblas.$(SHLIB_EXT) - OPENBLAS_BUILD_OPTS = CC="$(CC)" FC="$(FC)" RANLIB="$(RANLIB)" FFLAGS="$(FFLAGS) $(JFFLAGS)" LDFLAGS="$(LDFLAGS)" TARGET=$(OPENBLAS_TARGET_ARCH) BINARY=$(BINARY) # Thread support @@ -1015,21 +1017,15 @@ else ifeq ($(OPENBLAS_NO_AVX2), 1) OPENBLAS_BUILD_OPTS += NO_AVX2=1 endif -openblas-$(OPENBLAS_VER).tar.gz: - $(JLDOWNLOAD) $@ https://api.github.com/repos/xianyi/OpenBLAS/tarball/$(OPENBLAS_VER) -openblas-$(OPENBLAS_VER)/config.status: openblas-$(OPENBLAS_VER).tar.gz -ifneq ($(OPENBLAS_VER),develop) - $(JLCHECKSUM) $< -endif - mkdir -p openblas-$(OPENBLAS_VER) && \ - $(TAR) -C openblas-$(OPENBLAS_VER) --strip-components 1 -xf $< - perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' openblas-$(OPENBLAS_VER)/Makefile.system - echo 1 > $@ -$(OPENBLAS_OBJ_SOURCE): openblas-$(OPENBLAS_VER)/config.status - $(MAKE) -C openblas-$(OPENBLAS_VER) $(OPENBLAS_BUILD_OPTS) || (echo "*** 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. ***" && false) +$(OPENBLAS_SRC_DIR)/config.status: $(OPENBLAS_SRC_DIR)/Makefile + perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $(OPENBLAS_SRC_DIR)/Makefile.system + touch $@ +$(OPENBLAS_OBJ_SOURCE): $(OPENBLAS_SRC_DIR)/config.status + echo $(MAKE) -C $(OPENBLAS_SRC_DIR) $(OPENBLAS_BUILD_OPTS) # echo first, so we only print the error message below in a failure case + @$(MAKE) -C $(OPENBLAS_SRC_DIR) $(OPENBLAS_BUILD_OPTS) || (echo $(WARNCOLOR)"*** 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. ***"$(ENDCOLOR) && false) touch -c $@ $(OPENBLAS_OBJ_TARGET): $(OPENBLAS_OBJ_SOURCE) | $(build_shlibdir) - cp -f openblas-$(OPENBLAS_VER)/libopenblas.$(SHLIB_EXT) $(build_shlibdir) + cp -f $(OPENBLAS_SRC_DIR)/libopenblas.$(SHLIB_EXT) $(build_shlibdir) ifeq ($(OS), Linux) cd $(build_shlibdir) && \ ln -sf libopenblas.$(SHLIB_EXT) libopenblas.$(SHLIB_EXT).0 @@ -1037,12 +1033,10 @@ endif $(INSTALL_NAME_CMD)libopenblas.$(SHLIB_EXT) $(build_shlibdir)/libopenblas.$(SHLIB_EXT) clean-openblas: - -$(MAKE) -C openblas-$(OPENBLAS_VER) clean -distclean-openblas: - -rm -rf openblas-$(OPENBLAS_VER).tar.gz openblas-$(OPENBLAS_VER) + -$(MAKE) -C $(OPENBLAS_SRC_DIR) clean -get-openblas: openblas-$(OPENBLAS_VER).tar.gz -configure-openblas: openblas-$(OPENBLAS_VER)/config.status +get-openblas: $(OPENBLAS_SRC_DIR)/Makefile +configure-openblas: $(OPENBLAS_SRC_DIR)/config.status compile-openblas: $(OPENBLAS_OBJ_SOURCE) check-openblas: compile-openblas install-openblas: $(OPENBLAS_OBJ_TARGET) diff --git a/deps/Versions.make b/deps/Versions.make index 4b9235397d6b8..6046f98389988 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -2,7 +2,6 @@ LLVM_VER = 3.3 LLVM_LIB_SUFFIX = PCRE_VER = 8.36 DSFMT_VER = 2.2.3 -OPENBLAS_VER = v0.2.14 LAPACK_VER = 3.5.0 ARPACK_VER = 3.2.0 FFTW_VER = 3.3.4 diff --git a/deps/checksums/openblas-v0.2.14.tar.gz/md5 b/deps/checksums/openblas-v0.2.14.tar.gz/md5 index d6d3a3b107583..bd6e4f69a26a7 100644 --- a/deps/checksums/openblas-v0.2.14.tar.gz/md5 +++ b/deps/checksums/openblas-v0.2.14.tar.gz/md5 @@ -1 +1 @@ -53cda7f420e1ba0ea55de536b24c9701 +d340dc3d8a03f549ae29488d737b9c30 diff --git a/deps/checksums/openblas-v0.2.14.tar.gz/sha512 b/deps/checksums/openblas-v0.2.14.tar.gz/sha512 index 1bf15be5e4ca9..f1788fe09c57d 100644 --- a/deps/checksums/openblas-v0.2.14.tar.gz/sha512 +++ b/deps/checksums/openblas-v0.2.14.tar.gz/sha512 @@ -1 +1 @@ -8ab1e50cad6fe403addd892e0eebd008cd5009e33f9b29c19a6bc4c8623b6af055fe43d896edbe3ecbda0f5f8c208c2965ad56d2c6945442cce0ec7f3606452f +5028c0cae1eea168593d951c053d2c3692ea4bf34257b2d6cd533d43dd98d1e4ab982f56c57232e53dcc358a2f8e1e51e15a746235ff6eb64d427a97b1449b60 diff --git a/deps/openblas.version b/deps/openblas.version new file mode 100644 index 0000000000000..5f672524d5d0b --- /dev/null +++ b/deps/openblas.version @@ -0,0 +1,2 @@ +OPENBLAS_BRANCH=v0.2.14 +OPENBLAS_SHA1=d0c51c4de91b2356b770f92862c6b0e1d54953cd