Skip to content

Commit

Permalink
Revert "Add BB downloading for OpenBLAS (#30497)"
Browse files Browse the repository at this point in the history
This reverts commit 87c18d8.
  • Loading branch information
Keno committed Dec 30, 2018
1 parent 0152373 commit a3816b4
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 210 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ before_install:
brew tap staticfloat/julia > /dev/null;
brew rm --force $(brew deps --HEAD julia);
brew install -v ccache gcc gmp mpfr pcre2 staticfloat/julia/openblas-julia staticfloat/julia/suite-sparse-julia staticfloat/juliadeps/libgfortran;
BUILDOPTS="-j3 USECLANG=1 USECCACHE=1 USE_BINARYBUILDER_LLVM=1 USE_BINARYBUILDER_OPENBLAS=1 BINARYBUILDER_LLVM_ASSERTS=1";
BUILDOPTS="$BUILDOPTS LLVM_CONFIG=$TRAVIS_BUILD_DIR/usr/tools/llvm-config LLVM_SIZE=$TRAVIS_BUILD_DIR/usr/tools/llvm-size";
BUILDOPTS="-j3 USECLANG=1 USECCACHE=1 BINARYBUILDER_TRIPLET=x86_64-apple-darwin14 BINARYBUILDER_LLVM_ASSERTS=1";
BUILDOPTS="$BUILDOPTS USE_BINARYBUILDER_LLVM=1 LLVM_CONFIG=$TRAVIS_BUILD_DIR/usr/tools/llvm-config LLVM_SIZE=$TRAVIS_BUILD_DIR/usr/tools/llvm-size";
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in SUITESPARSE BLAS LAPACK GMP MPFR LIBUNWIND; do
Expand Down
3 changes: 2 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ INSTALL_F := $(JULIAHOME)/contrib/install.sh 644
INSTALL_M := $(JULIAHOME)/contrib/install.sh 755

# BinaryBuilder options
USE_BINARYBUILDER_OPENBLAS := 0
# TODO: Autodiscover triplet
USE_BINARYBUILDER_LLVM := 0
# Use the Assertions build
BINARYBUILDER_LLVM_ASSERTS := 0
BINARYBUILDER_TRIPLET :=

# LLVM Options
LLVMROOT := $(build_prefix)
Expand Down
26 changes: 5 additions & 21 deletions contrib/fixup-libgfortran.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

# Run as: fixup-libgfortran.sh [--verbose] <$private_libdir>
FC=${FC:-gfortran}

# If we're invoked with "--verbose", create a `debug` function that prints stuff out
if [ "$1" = "--verbose" ] || [ "$1" = "-v" ]; then
Expand All @@ -23,7 +22,7 @@ if [ "$UNAME" = "Linux" ]; then
elif [ "$UNAME" = "Darwin" ]; then
SHLIB_EXT="dylib"
else
echo "WARNING: Could not autodetect platform type ('uname -s' = $UNAME); assuming Linux" >&2
echo "WARNING: Could not autodetect platform type ('uname -s' == $UNAME); assuming Linux" >&2
UNAME="Linux"
SHLIB_EXT="so"
fi
Expand All @@ -42,20 +41,6 @@ find_shlib()
fi
}

find_shlib_dir()
{
# Usually, on platforms like OSX we get full paths when linking. However,
# if we are inspecting, say, BinaryBuilder-built OpenBLAS libraries, we will
# only get something like `@rpath/libgfortran.5.dylib` when inspecting the
# libraries. We can, as a last resort, ask `$FC` directly what the full
# filepath for this library is, but only if we don't have a direct path to it:
if [ $(dirname "$1") = "@rpath" ]; then
dirname "$($FC -print-file-name="$(basename "$1")" 2>/dev/null)"
else
dirname "$1" 2>/dev/null
fi
}

# First, discover all the places where libgfortran/libgcc is, as well as their true SONAMES
for lib in lapack blas openblas; do
for private_libname in ${private_libdir}/lib$lib*.$SHLIB_EXT*; do
Expand All @@ -66,11 +51,10 @@ for lib in lapack blas openblas; do
LIBQUADMATH_PATH=$(find_shlib "$private_libname" libquadmath)

# Take the directories, add them onto LIBGFORTRAN_DIRS, which we use to
# search for these libraries in the future. If there is no directory, try
# asking `$FC` where such a file could be found.
LIBGFORTRAN_DIRS="$LIBGFORTRAN_DIRS $(find_shlib_dir $LIBGFORTRAN_PATH)"
LIBGFORTRAN_DIRS="$LIBGFORTRAN_DIRS $(find_shlib_dir $LIBGCC_PATH)"
LIBGFORTRAN_DIRS="$LIBGFORTRAN_DIRS $(find_shlib_dir $LIBQUADMATH_PATH)"
# search for these libraries in the future.
LIBGFORTRAN_DIRS="$LIBGFORTRAN_DIRS $(dirname $LIBGFORTRAN_PATH 2>/dev/null)"
LIBGFORTRAN_DIRS="$LIBGFORTRAN_DIRS $(dirname $LIBGCC_PATH 2>/dev/null)"
LIBGFORTRAN_DIRS="$LIBGFORTRAN_DIRS $(dirname $LIBQUADMATH_PATH 2>/dev/null)"

# Save the SONAMES
LIBGFORTRAN_SONAMES="$LIBGFORTRAN_SONAMES $(basename "$LIBGFORTRAN_PATH")"
Expand Down
125 changes: 0 additions & 125 deletions contrib/normalize_triplet.py

This file was deleted.

3 changes: 2 additions & 1 deletion contrib/windows/appveyor_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ if [ "$ARCH" = x86_64 ]; then
echo 'USE_BLAS64 = 1' >> Make.user
echo 'LIBBLAS = -L$(JULIAHOME)/usr/bin -lopenblas64_' >> Make.user
echo 'LIBBLASNAME = libopenblas64_' >> Make.user
echo 'BINARYBUILDER_TRIPLET = x86_64-w64-mingw32' >> Make.user
else
bits=32
archsuffix=86
exc=sjlj
echo "override MARCH = pentium4" >> Make.user
echo 'LIBBLAS = -L$(JULIAHOME)/usr/bin -lopenblas' >> Make.user
echo 'LIBBLASNAME = libopenblas' >> Make.user
echo 'BINARYBUILDER_TRIPLET = i686-w64-mingw32' >> Make.user
fi
echo "override JULIA_CPU_TARGET=generic;native" >> Make.user

Expand Down Expand Up @@ -196,7 +198,6 @@ if [ -n "$USEMSVC" ]; then
else
# Use BinaryBuilder
echo 'USE_BINARYBUILDER_LLVM = 1' >> Make.user
echo 'USE_BINARYBUILDER_OPENBLAS = 1' >> Make.user
echo 'BINARYBUILDER_LLVM_ASSERTS = 1' >> Make.user
echo 'override DEP_LIBS += llvm openlibm' >> Make.user
export CCACHE_DIR=/cygdrive/c/ccache
Expand Down
1 change: 0 additions & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include $(SRCDIR)/Versions.make
include $(JULIAHOME)/Make.inc
include $(SRCDIR)/tools/common.mk
include $(SRCDIR)/tools/git-external.mk
include $(SRCDIR)/tools/bb-install.mk

BUILDDIR := $(BUILDDIR)$(MAYBE_HOST)

Expand Down
20 changes: 0 additions & 20 deletions deps/blas.mk
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ endif
# Do not overwrite the "-j" flag
OPENBLAS_BUILD_OPTS += MAKE_NB_JOBS=0

ifneq ($(USE_BINARYBUILDER_OPENBLAS), 1)

$(BUILDDIR)/$(OPENBLAS_SRC_DIR)/build-configured: $(BUILDDIR)/$(OPENBLAS_SRC_DIR)/source-extracted
perl -i -ple 's/^\s*(EXTRALIB\s*\+=\s*-lSystemStubs)\s*$$/# $$1/g' $(dir $<)/Makefile.system
echo 1 > $@
Expand Down Expand Up @@ -196,21 +194,3 @@ configure-lapack: extract-lapack
compile-lapack: $(BUILDDIR)/lapack-$(LAPACK_VER)/build-compiled
fastcheck-lapack: check-lapack
check-lapack: $(BUILDDIR)/lapack-$(LAPACK_VER)/build-checked

else # USE_BINARYBUILDER_OPENBLAS


OPENBLAS_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/OpenBLAS-v$(OPENBLAS_VER)-$(OPENBLAS_BB_REL)
OPENBLAS_BB_NAME := OpenBLAS.v$(OPENBLAS_VER)-$(OPENBLAS_BB_REL)

$(eval $(call bb-install,openblas,OPENBLAS,true))
get-lapack: get-openblas
extract-lapack: extract-openblas
configure-lapack: configure-openblas
compile-lapack: compile-openblas
fastcheck-lapack: fastcheck-openblas
check-lapack: check-openblas
clean-lapack: clean-openblas
distclean-lapack: distclean-openblas
install-lapack: install-openblas
endif
33 changes: 29 additions & 4 deletions deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,37 @@ ifeq ($(USE_POLLY),1)
endif
endif
else # USE_BINARYBUILDER_LLVM
LLVM_BB_URL_BASE := https://github.com/staticfloat/LLVMBuilder/releases/download/v$(LLVM_VER)-$(LLVM_BB_REL)
LLVM_BB_URL_BASE := https://github.com/staticfloat/LLVMBuilder/releases/download
ifneq ($(BINARYBUILDER_LLVM_ASSERTS), 1)
LLVM_BB_NAME := LLVM.v$(LLVM_VER)
LLVM_BB_NAME := LLVM
else
LLVM_BB_NAME := LLVM.asserts.v$(LLVM_VER)
LLVM_BB_NAME := LLVM.asserts
endif
LLVM_BB_NAME := $(LLVM_BB_NAME).v$(LLVM_VER)
LLVM_BB_URL := $(LLVM_BB_URL_BASE)/v$(LLVM_VER)-$(LLVM_BB_REL)/$(LLVM_BB_NAME).$(BINARYBUILDER_TRIPLET).tar.gz

$(eval $(call bb-install,llvm,LLVM,false))

$(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL):
mkdir -p $@

$(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL)/LLVM.$(BINARYBUILDER_TRIPLET).tar.gz: | $(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL)
$(JLDOWNLOAD) $@ $(LLVM_BB_URL)

$(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL)/build-compiled: | $(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL)/LLVM.$(BINARYBUILDER_TRIPLET).tar.gz
echo 1 > $@

$(eval $(call staged-install,llvm,llvm-$$(LLVM_VER)-$$(LLVM_BB_REL),,,,))

#Override provision of stage tarball
$(build_staging)/llvm-$(LLVM_VER)-$(LLVM_BB_REL).tgz: $(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL)/LLVM.$(BINARYBUILDER_TRIPLET).tar.gz | $(build_staging)
cp $< $@

clean-llvm:
distclean-llvm:
get-llvm: $(BUILDDIR)/llvm-$(LLVM_VER)-$(LLVM_BB_REL)/LLVM.$(BINARYBUILDER_TRIPLET).tar.gz
extract-llvm:
configure-llvm:
compile-llvm:
fastcheck-llvm:
check-llvm:
endif # USE_BINARYBUILDER_LLVM
2 changes: 0 additions & 2 deletions deps/openblas.version
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
OPENBLAS_BRANCH=v0.3.3
OPENBLAS_SHA1=fd8d1868a126bb9f12bbc43b36ee30d1ba943fbb
OPENBLAS_VER=0.3.3
OPENBLAS_BB_REL=0
33 changes: 0 additions & 33 deletions deps/tools/bb-install.mk

This file was deleted.

0 comments on commit a3816b4

Please sign in to comment.