diff --git a/S/SuiteSparse/SuiteSparse/build_tarballs.jl b/S/SuiteSparse/SuiteSparse/build_tarballs.jl index 753933cd840..827e27756c2 100644 --- a/S/SuiteSparse/SuiteSparse/build_tarballs.jl +++ b/S/SuiteSparse/SuiteSparse/build_tarballs.jl @@ -2,57 +2,48 @@ include("../common.jl") name = "SuiteSparse" -sources = [ - sources; - DirectorySource("./bundled") -] - # Bash recipe for building across all platforms script = raw""" -cd $WORKSPACE/srcdir/SuiteSparse +apk add --upgrade cmake --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main -# Apply Jameson's shlib patch -atomic_patch -p1 ${WORKSPACE}/srcdir/patches/SuiteSparse-shlib.patch +cd $WORKSPACE/srcdir/SuiteSparse # Disable OpenMP as it will probably interfere with blas threads and Julia threads FLAGS+=(INSTALL="${prefix}" INSTALL_LIB="${libdir}" INSTALL_INCLUDE="${prefix}/include" CFOPENMP=) - if [[ ${bb_full_target} == *-sanitize+memory* ]]; then # Install msan runtime (for clang) cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/ fi -if [[ ${target} == *mingw32* ]]; then - FLAGS+=(UNAME=Windows) - FLAGS+=(LDFLAGS="${LDFLAGS} -L${libdir} -shared") -else - FLAGS+=(UNAME="$(uname)") - FLAGS+=(LDFLAGS="${LDFLAGS} -L${libdir}") -fi - -BLAS_NAME=blastrampoline -if [[ ${nbits} == 64 ]]; then - SUN="-DSUN64 -DLONGBLAS='long long'" -fi - -FLAGS+=(BLAS="-l${BLAS_NAME}" LAPACK="-l${BLAS_NAME}") - -# Disable METIS in CHOLMOD by passing -DNPARTITION and avoiding linking metis -#FLAGS+=(MY_METIS_LIB="-lmetis" MY_METIS_INC="${prefix}/include") -FLAGS+=(UMFPACK_CONFIG="$SUN" CHOLMOD_CONFIG+="$SUN -DNPARTITION" SPQR_CONFIG="$SUN") - -make -j${nproc} -C SuiteSparse_config "${FLAGS[@]}" library config - for proj in SuiteSparse_config AMD BTF CAMD CCOLAMD COLAMD CHOLMOD LDL KLU UMFPACK RBio SPQR; do - make -j${nproc} -C $proj "${FLAGS[@]}" library CFOPENMP="$CFOPENMP" - make -j${nproc} -C $proj "${FLAGS[@]}" install CFOPENMP="$CFOPENMP" + cd ${proj}/build + cmake .. \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${prefix} \ + -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \ + -DNOPENMP=ON \ + -DNPARTITION=ON \ + -DBLAS_FOUND=1 \ + -DBLAS64_SUFFIX="_64" \ + -DBLAS_LIBRARIES="${libdir}/libblastrampoline.${dlext}" \ + -DBLAS_LINKER_FLAGS="blastrampoline" \ + -DBLA_VENDOR="${BLAS_NAME}" \ + -DALLOW_64BIT_BLAS=ON \ + -DLAPACK_FOUND=1 \ + -DLAPACK_LINKER_FLAGS="blastrampoline" \ + -DLAPACK_LIBRARIES="${libdir}/libblastrampoline.${dlext}" \ + -DBLAS_UNDERSCORE=ON \ + -DCMAKE_Fortran_COMPILER="" + make -j${nproc} + make install + cd $WORKSPACE/srcdir/SuiteSparse done # For now, we'll have to adjust the name of the Lbt library on macOS and FreeBSD. # Eventually, this should be fixed upstream if [[ ${target} == *-apple-* ]] || [[ ${target} == *freebsd* ]]; then echo "-- Modifying library name for Lbt" - + BLAS_NAME="blastrampoline" for nm in libcholmod libspqr libumfpack; do # Figure out what version it probably latched on to: if [[ ${target} == *-apple-* ]]; then diff --git a/S/SuiteSparse/SuiteSparse/bundled/patches/SuiteSparse-shlib.patch b/S/SuiteSparse/SuiteSparse/bundled/patches/SuiteSparse-shlib.patch deleted file mode 100644 index fe25aa1ef38..00000000000 --- a/S/SuiteSparse/SuiteSparse/bundled/patches/SuiteSparse-shlib.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- a/SuiteSparse_config/SuiteSparse_config.mk 2018-12-22 22:15:58.000000000 -0500 -+++ b/SuiteSparse_config/SuiteSparse_config.mk 2019-02-28 01:40:51.768394370 -0500 -@@ -357,8 +357,8 @@ - #--------------------------------------------------------------------------- - - ifeq ($(UNAME),Linux) -- # add the realtime library, librt, and SuiteSparse/lib -- LDLIBS += -lrt -Wl,-rpath=$(INSTALL_LIB) -+ # add the posix realtime extensions library: librt -+ LDLIBS += -lrt - endif - - #--------------------------------------------------------------------------- -@@ -447,11 +447,14 @@ - SO_OPTS = $(LDFLAGS) - - ifeq ($(UNAME),Windows) -- # Cygwin Make on Windows (untested) -+ # Cygwin Make on Windows - AR_TARGET = $(LIBRARY).lib -- SO_PLAIN = $(LIBRARY).dll -+ SO_TARGET = $(LIBRARY).dll -+ # The following two links are just garbage copies of the real target -+ # they aren't actually supported by this OS - SO_MAIN = $(LIBRARY).$(SO_VERSION).dll -- SO_TARGET = $(LIBRARY).$(VERSION).dll -+ SO_PLAIN = $(LIBRARY).$(VERSION).dll -+ SO_OPTS += -shared - SO_INSTALL_NAME = echo - else - # Mac or Linux/Unix -@@ -472,8 +475,9 @@ - SO_PLAIN = $(LIBRARY).so - SO_MAIN = $(LIBRARY).so.$(SO_VERSION) - SO_TARGET = $(LIBRARY).so.$(VERSION) -- SO_OPTS += -shared -Wl,-soname -Wl,$(SO_MAIN) -Wl,--no-undefined -- # Linux/Unix *.so files can be moved without modification: -+ SO_OPTS += -shared -Wl,-soname -Wl,$(SO_MAIN) -Wl,--no-undefined \ -+ -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin -+ # Use rpath ORIGIN so that Linux/Unix *.so files can be moved without modification: - SO_INSTALL_NAME = echo - endif - endif diff --git a/S/SuiteSparse/common.jl b/S/SuiteSparse/common.jl index 005f0d6ee11..dce9d24cf12 100644 --- a/S/SuiteSparse/common.jl +++ b/S/SuiteSparse/common.jl @@ -1,11 +1,11 @@ using BinaryBuilder, Pkg -version = v"5.10.1" +version = v"6.0.2" # Collection of sources required to build SuiteSparse sources = [ GitSource("https://github.com/DrTimothyAldenDavis/SuiteSparse.git", - "538273cfd53720a10e34a3d80d3779b607e1ac26"), + "25fc8e8b7317dea1793828a1e95f05fd13a85470"), ] # We enable experimental platforms as this is a core Julia dependency