From 6a95d7b7c20cf05166441516f2bc3841f1b66fa2 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 13:15:23 -0400 Subject: [PATCH 01/13] add SPEX builder --- S/SPEX/build_tarballs.jl | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 S/SPEX/build_tarballs.jl diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl new file mode 100644 index 00000000000..132f8a578e7 --- /dev/null +++ b/S/SPEX/build_tarballs.jl @@ -0,0 +1,41 @@ +using BinaryBuilder, Pkg + +name = "SPEX" +version = v"1.1.5" + +# Collection of sources required to build SuiteSparse:GraphBLAS +sources = [ + GitSource("https://github.com/clouren/SPEX", + "9471682b072419063d73bc950949bf3458b187f9") +] + +# Bash recipe for building across all platforms +script = raw""" +# Compile GraphBLAS +cd ${WORKSPACE}/srcdir/SPEX +make -j${nproc} +cp lib/libspex* ${libdir} +cp include/SPEX* ${includedir} +install_license SPEX/SPEX_Left_LU/License/lesserv3.txt +""" + +# These are the platforms we will build for by default, unless further +# platforms are passed in on the command line +platforms = supported_platforms(;experimental=true) + +# The products that we will ensure are always built +products = [ + LibraryProduct("libspexutil", :libspexutil), + LibraryProduct("libspexleftlu", :libspexleftlu) +] + +# Dependencies that must be installed before this package can be built +dependencies = [ + Dependency("SuiteSparse_jll"), + Dependency("GMP_jll"), + Dependency("MPFR_jll") +] + +# Build the tarballs, and possibly a `build.jl` as well. +build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; + julia_compat="1.6") From 29d8fa507286396e1d561a246f1f26bdb2327382 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 13:22:47 -0400 Subject: [PATCH 02/13] gcc 9 --- S/SPEX/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 132f8a578e7..ed09d7bcde4 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -38,4 +38,4 @@ dependencies = [ # Build the tarballs, and possibly a `build.jl` as well. build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; - julia_compat="1.6") + preferred_gcc_version=v"9", julia_compat="1.6") From 02bd9a6e5d42a2595e087893bf80d58f4b68d7c3 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 13:36:20 -0400 Subject: [PATCH 03/13] c99 --- S/SPEX/build_tarballs.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index ed09d7bcde4..682a1978b7c 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -13,6 +13,7 @@ sources = [ script = raw""" # Compile GraphBLAS cd ${WORKSPACE}/srcdir/SPEX +CFLAGS="${CFLAGS} -std=c99" make -j${nproc} cp lib/libspex* ${libdir} cp include/SPEX* ${includedir} @@ -38,4 +39,4 @@ dependencies = [ # Build the tarballs, and possibly a `build.jl` as well. build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; - preferred_gcc_version=v"9", julia_compat="1.6") + julia_compat="1.6") From 411749dee9efacfcde55f5aaeeda05d94b579485 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 13:42:08 -0400 Subject: [PATCH 04/13] add back gcc9 --- S/SPEX/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 682a1978b7c..42b7b461e7c 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -39,4 +39,4 @@ dependencies = [ # Build the tarballs, and possibly a `build.jl` as well. build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; - julia_compat="1.6") + preferred_gcc_version=v"9", julia_compat="1.6") From 14138b75d046c041c838d87b478acb95a5e12125 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 14:09:58 -0400 Subject: [PATCH 05/13] compile only SPEX --- S/SPEX/build_tarballs.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 42b7b461e7c..959a8f32a34 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -12,12 +12,12 @@ sources = [ # Bash recipe for building across all platforms script = raw""" # Compile GraphBLAS -cd ${WORKSPACE}/srcdir/SPEX +cd ${WORKSPACE}/srcdir/SPEX/SPEX CFLAGS="${CFLAGS} -std=c99" make -j${nproc} -cp lib/libspex* ${libdir} -cp include/SPEX* ${includedir} -install_license SPEX/SPEX_Left_LU/License/lesserv3.txt +cp ../lib/libspex* ${libdir} +cp ../include/SPEX* ${includedir} +install_license SPEX_Left_LU/License/lesserv3.txt """ # These are the platforms we will build for by default, unless further From a7b8f3cddb520bac15220d6e05e9c53e122d134c Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 14:52:55 -0400 Subject: [PATCH 06/13] patch and manually build libraries --- S/SPEX/build_tarballs.jl | 17 +++++++++++------ S/SPEX/bundled/werror.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 S/SPEX/bundled/werror.patch diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 959a8f32a34..c735ef80a76 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -6,18 +6,23 @@ version = v"1.1.5" # Collection of sources required to build SuiteSparse:GraphBLAS sources = [ GitSource("https://github.com/clouren/SPEX", - "9471682b072419063d73bc950949bf3458b187f9") + "9471682b072419063d73bc950949bf3458b187f9"), + DirectorySource("./bundled") ] # Bash recipe for building across all platforms script = raw""" # Compile GraphBLAS -cd ${WORKSPACE}/srcdir/SPEX/SPEX +cd ${WORKSPACE}/srcdir/SPEX +atomic_patch -p1 ../werror.patch CFLAGS="${CFLAGS} -std=c99" -make -j${nproc} -cp ../lib/libspex* ${libdir} -cp ../include/SPEX* ${includedir} -install_license SPEX_Left_LU/License/lesserv3.txt +cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Util +make library -j${nproc} +cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Left_LU +make library -j${nproc} +cp ${WORKSPACE}/srcdir/SPEX/include/SPEX* ${includedir} +cp ${WORKSPACE}/srcdir/SPEX/lib/libspex* ${libdir} +install_license ${WORKSPACE}/srcdir/SPEX/SPEX/License.txt """ # These are the platforms we will build for by default, unless further diff --git a/S/SPEX/bundled/werror.patch b/S/SPEX/bundled/werror.patch new file mode 100644 index 00000000000..12bdcaed7a3 --- /dev/null +++ b/S/SPEX/bundled/werror.patch @@ -0,0 +1,26 @@ +diff --git a/SPEX/SPEX_Left_LU/Lib/Makefile b/SPEX/SPEX_Left_LU/Lib/Makefile +index 72e207a..7032800 100644 +--- a/SPEX/SPEX_Left_LU/Lib/Makefile ++++ b/SPEX/SPEX_Left_LU/Lib/Makefile +@@ -22,7 +22,7 @@ SUITESPARSE ?= $(realpath $(CURDIR)/../../..) + include ../../../SuiteSparse_config/SuiteSparse_config.mk + + # uncomment for extra error checking: +-CFLAGS += -Wall -Wextra -Wpedantic -Werror ++CFLAGS += -Wall -Wextra -Wpedantic + + # SPEX_Left LU depends on SuiteSparse_config, AMD, COLAMD, M, GMP, and MPFR + LDLIBS += -lspexutil -lsuitesparseconfig -lamd -lcolamd -lm -lgmp -lmpfr +diff --git a/SPEX/SPEX_Util/Lib/Makefile b/SPEX/SPEX_Util/Lib/Makefile +index 754ab87..7ac6e88 100644 +--- a/SPEX/SPEX_Util/Lib/Makefile ++++ b/SPEX/SPEX_Util/Lib/Makefile +@@ -22,7 +22,7 @@ SUITESPARSE ?= $(realpath $(CURDIR)/../../..) + include ../../../SuiteSparse_config/SuiteSparse_config.mk + + # uncomment for extra error checking: +-CFLAGS += -Wall -Wextra -Wpedantic -Werror ++CFLAGS += -Wall -Wextra -Wpedantic + + # SPEX_Util depends on SuiteSparse_config, AMD, COLAMD, M, GMP, and MPFR + LDLIBS += -lsuitesparseconfig -lamd -lcolamd -lm -lgmp -lmpfr From a94ae4d5358c0592942acb76f06c585ae569f398 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 14:55:40 -0400 Subject: [PATCH 07/13] typo --- S/SPEX/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index c735ef80a76..7de9f2420e2 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -22,7 +22,7 @@ cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Left_LU make library -j${nproc} cp ${WORKSPACE}/srcdir/SPEX/include/SPEX* ${includedir} cp ${WORKSPACE}/srcdir/SPEX/lib/libspex* ${libdir} -install_license ${WORKSPACE}/srcdir/SPEX/SPEX/License.txt +install_license ${WORKSPACE}/srcdir/SPEX/SPEX/LICENSE.txt """ # These are the platforms we will build for by default, unless further From 9e3bce4f3e285487cf9608f2c9084558ca41f80e Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 17:59:25 -0400 Subject: [PATCH 08/13] attempt to fix windows build --- S/SPEX/build_tarballs.jl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 7de9f2420e2..f79ecd5b4ee 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -17,11 +17,21 @@ cd ${WORKSPACE}/srcdir/SPEX atomic_patch -p1 ../werror.patch CFLAGS="${CFLAGS} -std=c99" cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Util -make library -j${nproc} +if [[${target} == *mingw*]]; then + make library -j${nproc} UNAME=Windows SO_OPTS="${SO_OPTS} -shared -L${libdir}" +else + make library -j${nproc} +fi +cp ${WORKSPACE}/srcdir/SPEX/include/SPEX_Util.h ${includedir} +cp ${WORKSPACE}/srcdir/SPEX/lib/libspexutil* ${libdir} cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Left_LU -make library -j${nproc} -cp ${WORKSPACE}/srcdir/SPEX/include/SPEX* ${includedir} -cp ${WORKSPACE}/srcdir/SPEX/lib/libspex* ${libdir} +if [[${target} == *mingw*]]; then + make library UNAME=Windows SO_OPTS="${SO_OPTS} -shared -L${libdir}" +else + make library -j${nproc} +fi +cp ${WORKSPACE}/srcdir/SPEX/include/SPEX_Left_LU.h ${includedir} +cp ${WORKSPACE}/srcdir/SPEX/lib/libspexleftlu* ${libdir} install_license ${WORKSPACE}/srcdir/SPEX/SPEX/LICENSE.txt """ From f35257b8a7b3c93aa55cd5a7593f3d17c80af4b7 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Thu, 15 Sep 2022 18:02:57 -0400 Subject: [PATCH 09/13] typos in if --- S/SPEX/build_tarballs.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index f79ecd5b4ee..784073bb79b 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -17,7 +17,7 @@ cd ${WORKSPACE}/srcdir/SPEX atomic_patch -p1 ../werror.patch CFLAGS="${CFLAGS} -std=c99" cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Util -if [[${target} == *mingw*]]; then +if [[ "${target}" == *mingw* ]]; then make library -j${nproc} UNAME=Windows SO_OPTS="${SO_OPTS} -shared -L${libdir}" else make library -j${nproc} @@ -25,7 +25,7 @@ fi cp ${WORKSPACE}/srcdir/SPEX/include/SPEX_Util.h ${includedir} cp ${WORKSPACE}/srcdir/SPEX/lib/libspexutil* ${libdir} cd ${WORKSPACE}/srcdir/SPEX/SPEX/SPEX_Left_LU -if [[${target} == *mingw*]]; then +if [[ "${target}" == *mingw* ]]; then make library UNAME=Windows SO_OPTS="${SO_OPTS} -shared -L${libdir}" else make library -j${nproc} From 7af1a52acb00ca1d96fbbc5860c3e016ddd4c3a1 Mon Sep 17 00:00:00 2001 From: Ray Kimmerer Date: Fri, 16 Sep 2022 15:31:19 -0400 Subject: [PATCH 10/13] change deps, remove experimental plats --- S/SPEX/build_tarballs.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 784073bb79b..7956a80ccd2 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -37,7 +37,7 @@ install_license ${WORKSPACE}/srcdir/SPEX/SPEX/LICENSE.txt # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = supported_platforms(;experimental=true) +platforms = supported_platforms() # The products that we will ensure are always built products = [ @@ -48,8 +48,8 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("SuiteSparse_jll"), - Dependency("GMP_jll"), - Dependency("MPFR_jll") + Dependency("GMP_jll", v"6.2.1+2"), + Dependency("MPFR_jll", v"4.1.1") ] # Build the tarballs, and possibly a `build.jl` as well. From cd63506e70db0d4edefb15fa3dde812c53d4c609 Mon Sep 17 00:00:00 2001 From: Will Kimmerer Date: Fri, 16 Sep 2022 15:37:04 -0400 Subject: [PATCH 11/13] Update S/SPEX/build_tarballs.jl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mosè Giordano --- S/SPEX/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index 7956a80ccd2..fa52f0254a3 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -48,7 +48,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("SuiteSparse_jll"), - Dependency("GMP_jll", v"6.2.1+2"), + Dependency("GMP_jll", v"6.2.1"), Dependency("MPFR_jll", v"4.1.1") ] From 27d12e22d6ee07737d29730d46d33b482f9bc6ef Mon Sep 17 00:00:00 2001 From: Will Kimmerer Date: Fri, 16 Sep 2022 16:53:55 -0400 Subject: [PATCH 12/13] Try 6.1.2 GMP --- S/SPEX/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index fa52f0254a3..a1a81faee69 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -48,7 +48,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("SuiteSparse_jll"), - Dependency("GMP_jll", v"6.2.1"), + Dependency("GMP_jll", v"6.1.2"), Dependency("MPFR_jll", v"4.1.1") ] From 9c14902cbe3ecc1a61b32d669338e545cd107b18 Mon Sep 17 00:00:00 2001 From: Will Kimmerer Date: Sat, 17 Sep 2022 15:26:59 -0400 Subject: [PATCH 13/13] Try error msg recommendation --- S/SPEX/build_tarballs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S/SPEX/build_tarballs.jl b/S/SPEX/build_tarballs.jl index a1a81faee69..0a0aa0208f1 100644 --- a/S/SPEX/build_tarballs.jl +++ b/S/SPEX/build_tarballs.jl @@ -48,7 +48,7 @@ products = [ # Dependencies that must be installed before this package can be built dependencies = [ Dependency("SuiteSparse_jll"), - Dependency("GMP_jll", v"6.1.2"), + Dependency("GMP_jll", v"6.2.0"), Dependency("MPFR_jll", v"4.1.1") ]