diff --git a/packages/bazel/add-include-limits-0.25.patch b/packages/bazel/add-include-limits-0.25.patch deleted file mode 100644 index 643bde5facc17c7530257e0f4c1ddecc7aaf1a8c..0000000000000000000000000000000000000000 --- a/packages/bazel/add-include-limits-0.25.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -pur third_party/ijar/mapped_file_unix.cc third_party/ijar/mapped_file_unix.cc ---- third_party/ijar/mapped_file_unix.cc 2021-10-05 15:24:37.243946507 +0200 -+++ third_party/ijar/mapped_file_unix.cc 2021-10-05 15:24:28.707823401 +0200 -@@ -19,6 +19,7 @@ - #include <sys/mman.h> - - #include <algorithm> -+#include <limits> - - #include "third_party/ijar/mapped_file.h" - diff --git a/packages/bazel/add-include-limits-zlib_client.patch b/packages/bazel/add-include-limits-zlib_client.patch deleted file mode 100644 index bb64145dbb519fcbba9cad9584272e44121df5f7..0000000000000000000000000000000000000000 --- a/packages/bazel/add-include-limits-zlib_client.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -pur third_party/ijar/zlib_client.h third_party/ijar/zlib_client.h ---- third_party/ijar/zlib_client.h 2021-10-07 09:32:57.087301302 +0200 -+++ third_party/ijar/zlib_client.h 1980-01-01 00:00:00.000000000 +0100 -@@ -16,6 +16,7 @@ - #define THIRD_PARTY_IJAR_ZLIB_CLIENT_H_ - - #include <limits.h> -+#include <limits> - - #include "third_party/ijar/common.h" - diff --git a/packages/bazel/apple-clang-14.0.3.patch b/packages/bazel/apple-clang-14.0.3.patch deleted file mode 100644 index c826951b5c9699a2fa9394a34a1faa34343b9b9e..0000000000000000000000000000000000000000 --- a/packages/bazel/apple-clang-14.0.3.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/third_party/zlib/gzguts.h 1980-01-01 00:00:00 -+++ b/third_party/zlib/gzguts.h 2023-04-03 12:23:10 -@@ -3,6 +3,10 @@ - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -+#ifndef _WIN32 -+ #include <unistd.h> -+#endif -+ - #ifdef _LARGEFILE64_SOURCE - # ifndef _LARGEFILE_SOURCE - # define _LARGEFILE_SOURCE 1 diff --git a/packages/bazel/bazelconfiguration-0.3.patch b/packages/bazel/bazelconfiguration-0.3.patch deleted file mode 100644 index e6a974a98a9cbb6dd4118c3d056c61949571af07..0000000000000000000000000000000000000000 --- a/packages/bazel/bazelconfiguration-0.3.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java -+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java -@@ -150,6 +150,13 @@ - builder.put("PATH", null); - builder.put("LD_LIBRARY_PATH", null); - } -+ -+ Map<String, String> spackEnv = System.getenv(); -+ for (String envName : spackEnv.keySet()) { -+ if (envName.startsWith("SPACK_")) { -+ builder.put(envName, spackEnv.get(envName)); -+ } -+ } - } - - private static PathFragment determineShellExecutable(OS os, PathFragment fromOption) { diff --git a/packages/bazel/bazelruleclassprovider-0.14.patch b/packages/bazel/bazelruleclassprovider-0.14.patch deleted file mode 100644 index b0aebdf359b6cd2e69bdca3820aa6faab9b03040..0000000000000000000000000000000000000000 --- a/packages/bazel/bazelruleclassprovider-0.14.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -@@ -168,6 +168,13 @@ public class BazelRuleClassProvider { - env.put("PATH", null); - } - -+ Map<String, String> spackEnv = System.getenv(); -+ for (String envName : spackEnv.keySet()) { -+ if (envName.startsWith("SPACK_")) { -+ env.put(envName, spackEnv.get(envName)); -+ } -+ } -+ - // Shell environment variables specified via options take precedence over the - // ones inherited from the fragments. In the long run, these fragments will - // be replaced by appropriate default rc files anyway. diff --git a/packages/bazel/bazelruleclassprovider-0.25.patch b/packages/bazel/bazelruleclassprovider-0.25.patch deleted file mode 100644 index 0d68cd98d97c1a2ca718577f449605878d48af07..0000000000000000000000000000000000000000 --- a/packages/bazel/bazelruleclassprovider-0.25.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -@@ -181,6 +181,13 @@ public class BazelRuleClassProvider { - env.put("PATH", null); - } - -+ Map<String, String> spackEnv = System.getenv(); -+ for (String envName : spackEnv.keySet()) { -+ if (envName.startsWith("SPACK_")) { -+ env.put(envName, spackEnv.get(envName)); -+ } -+ } -+ - // Shell environment variables specified via options take precedence over the - // ones inherited from the fragments. In the long run, these fragments will - // be replaced by appropriate default rc files anyway. diff --git a/packages/bazel/bazelruleclassprovider_fj-0.25.patch b/packages/bazel/bazelruleclassprovider_fj-0.25.patch deleted file mode 100644 index 709e5ee0202c07e6bc5b6202d654dbe2b97168a7..0000000000000000000000000000000000000000 --- a/packages/bazel/bazelruleclassprovider_fj-0.25.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -@@ -185,7 +185,7 @@ public class BazelRuleClassProvider { - - Map<String, String> spackEnv = System.getenv(); - for (String envName : spackEnv.keySet()) { -- if (envName.startsWith("SPACK_")) { -+ if ((envName.startsWith("SPACK_")) || (envName.equals("fcc_ENV")) || (envName.equals("FCC_ENV"))) { - env.put(envName, spackEnv.get(envName)); - } - } diff --git a/packages/bazel/blaze_util_posix-0.29.1.patch b/packages/bazel/blaze_util_posix-0.29.1.patch deleted file mode 100644 index aa773a33a5d7a4a87086c17b8cdb56b685e3c67c..0000000000000000000000000000000000000000 --- a/packages/bazel/blaze_util_posix-0.29.1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur a/src/main/cpp/blaze_util_posix.cc b/src/main/cpp/blaze_util_posix.cc ---- a/src/main/cpp/blaze_util_posix.cc 1980-01-01 00:00:00.000000000 -0800 -+++ b/src/main/cpp/blaze_util_posix.cc 2022-06-30 23:34:08.000000000 -0700 -@@ -600,7 +600,7 @@ - // Prefer OFD locks if available. POSIX locks can be lost "accidentally" - // due to any close() on the lock file, and are not reliably preserved - // across execve() on Linux, which we need for --batch mode. -- if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0; -+ if (fcntl(fd, F_SETLK, lock) == 0) return 0; - if (errno != EINVAL) { - if (errno != EACCES && errno != EAGAIN) { - BAZEL_DIE(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR) diff --git a/packages/bazel/build-0.29.1.patch b/packages/bazel/build-0.29.1.patch deleted file mode 100644 index c3ed9ab254b253066ce37f9b0eb497ebb1e589d4..0000000000000000000000000000000000000000 --- a/packages/bazel/build-0.29.1.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 9c9d27561780bc56d9f0867e325c7421a94ee1cb Mon Sep 17 00:00:00 2001 -From: Harsh Bhatia <bhatia4@llnl.gov> -Date: Tue, 15 Dec 2020 15:56:10 -0800 -Subject: [PATCH] https://github.com/bazelbuild/bazel/commit/ab62a6e097590dac5ec946ad7a796ea0e8593ae0 - ---- - src/conditions/BUILD | 6 ++++++ - third_party/BUILD | 8 ++++++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/conditions/BUILD b/src/conditions/BUILD -index 2b28e28057..faa41a439d 100644 ---- a/src/conditions/BUILD -+++ b/src/conditions/BUILD -@@ -10,6 +10,12 @@ filegroup( - visibility = ["//src:__pkg__"], - ) - -+config_setting( -+ name = "linux_ppc", -+ values = {"cpu": "ppc"}, -+ visibility = ["//visibility:public"], -+) -+ - config_setting( - name = "linux_x86_64", - values = {"cpu": "k8"}, -diff --git a/third_party/BUILD b/third_party/BUILD -index 159006d741..4fcae54c00 100644 ---- a/third_party/BUILD -+++ b/third_party/BUILD -@@ -523,12 +523,13 @@ UNNECESSARY_DYNAMIC_LIBRARIES = select({ - "//src/conditions:darwin": "*.so *.dll", - "//src/conditions:darwin_x86_64": "*.so *.dll", - "//src/conditions:linux_x86_64": "*.jnilib *.dll", -+ "//src/conditions:linux_ppc": "*.so *.jnilib *.dll", - # The .so file is an x86 one, so we can just remove it if the CPU is not x86 - "//src/conditions:arm": "*.so *.jnilib *.dll", - "//src/conditions:linux_aarch64": "*.so *.jnilib *.dll", - # Play it safe -- better have a big binary than a slow binary - # zip -d does require an argument. Supply something bogus. -- "//conditions:default": "*.bogusextension", -+ "//conditions:default": "", - }) - - # Remove native libraries that are for a platform different from the one we are -@@ -537,7 +538,10 @@ genrule( - name = "filter_netty_dynamic_libs", - srcs = ["netty_tcnative/netty-tcnative-boringssl-static-2.0.24.Final.jar"], - outs = ["netty_tcnative/netty-tcnative-filtered.jar"], -- cmd = "cp $< $@ && zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES, -+ cmd = "cp $< $@ && " + -+ # End successfully if there is nothing to be deleted from the archive -+ "if [ -n '" + UNNECESSARY_DYNAMIC_LIBRARIES + "' ]; then " + -+ "zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES + "; fi", - ) - - java_import( --- -2.21.0 (Apple Git-122.2) - diff --git a/packages/bazel/cc_configure-0.3.0.patch b/packages/bazel/cc_configure-0.3.0.patch deleted file mode 100644 index 79e12269a6bfeb05e684400a68450a9f3a709470..0000000000000000000000000000000000000000 --- a/packages/bazel/cc_configure-0.3.0.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/tools/cpp/cc_configure.bzl -+++ b/tools/cpp/cc_configure.bzl -@@ -173,8 +173,19 @@ - else: - inc_dirs = result.stderr[index1 + 1:index2].strip() - -- return [repository_ctx.path(_cxx_inc_convert(p)) -- for p in inc_dirs.split("\n")] -+ default_inc_directories = [ -+ repository_ctx.path(_cxx_inc_convert(p)) -+ for p in inc_dirs.split("\n") -+ ] -+ -+ env = repository_ctx.os.environ -+ if "SPACK_INCLUDE_DIRS" in env: -+ for path in env["SPACK_INCLUDE_DIRS"].split(":"): -+ default_inc_directories.append( -+ repository_ctx.path(_cxx_inc_convert(path)) -+ ) -+ -+ return default_inc_directories - - def _add_option_if_supported(repository_ctx, cc, option): - """Checks that `option` is supported by the C compiler.""" diff --git a/packages/bazel/cc_configure-0.5.0.patch b/packages/bazel/cc_configure-0.5.0.patch deleted file mode 100644 index 470986bec6650579a8a58951752fb0bfc43943a7..0000000000000000000000000000000000000000 --- a/packages/bazel/cc_configure-0.5.0.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/tools/cpp/cc_configure.bzl -+++ b/tools/cpp/cc_configure.bzl -@@ -200,8 +200,19 @@ - else: - inc_dirs = result.stderr[index1 + 1:index2].strip() - -- return [_escape_string(repository_ctx.path(_cxx_inc_convert(p))) -- for p in inc_dirs.split("\n")] -+ default_inc_directories = [ -+ _escape_string(repository_ctx.path(_cxx_inc_convert(p))) -+ for p in inc_dirs.split("\n") -+ ] -+ -+ env = repository_ctx.os.environ -+ if "SPACK_INCLUDE_DIRS" in env: -+ for path in env["SPACK_INCLUDE_DIRS"].split(":"): -+ default_inc_directories.append( -+ repository_ctx.path(_cxx_inc_convert(path)) -+ ) -+ -+ return default_inc_directories - - - def _add_option_if_supported(repository_ctx, cc, option): diff --git a/packages/bazel/cc_env.patch b/packages/bazel/cc_env.patch deleted file mode 100644 index 034fb77c9dd26a0d3663aaaaf853668bde1217e9..0000000000000000000000000000000000000000 --- a/packages/bazel/cc_env.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/compile.sh b/compile.sh -index ed506d2..a5474ac 100755 ---- a/compile.sh -+++ b/compile.sh -@@ -92,7 +92,7 @@ display "." - log "Building output/bazel" - # We set host and target platform directly since the defaults in @bazel_tools - # have not yet been generated. --bazel_build "src:bazel_nojdk${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel_nojdk${EXE_EXT}" \ - --host_platform=@bazel_tools//platforms:host_platform \ - --platforms=@bazel_tools//platforms:target_platform \ - || fail "Could not build Bazel" diff --git a/packages/bazel/compile-0.13.patch b/packages/bazel/compile-0.13.patch deleted file mode 100644 index 13c82e7631bbcde85d0fd4301297166a32815721..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.13.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -92,7 +92,7 @@ - log "Building output/bazel" - # We set host and target platform directly since the defaults in @bazel_tools - # have not yet been generated. --bazel_build "src:bazel${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel${EXE_EXT}" \ - --host_platform=@bazel_tools//platforms:host_platform \ - --platforms=@bazel_tools//platforms:target_platform \ - || fail "Could not build Bazel" diff --git a/packages/bazel/compile-0.16.patch b/packages/bazel/compile-0.16.patch deleted file mode 100644 index f61f521a15b9affe110a6b8c703c6ad31c234fa0..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.16.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -92,7 +92,7 @@ display "." - log "Building output/bazel" - # We set host and target platform directly since the defaults in @bazel_tools - # have not yet been generated. --bazel_build "src:bazel_nojdk${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel_nojdk${EXE_EXT}" \ - --host_platform=@bazel_tools//platforms:host_platform \ - --platforms=@bazel_tools//platforms:target_platform \ - || fail "Could not build Bazel" diff --git a/packages/bazel/compile-0.21.patch b/packages/bazel/compile-0.21.patch deleted file mode 100644 index d666a0f055ca04560c5cb0c885708b8c42acd794..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.21.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -92,7 +92,7 @@ display "." - log "Building output/bazel" - # We set host and target platform directly since the defaults in @bazel_tools - # have not yet been generated. --bazel_build "src:bazel_nojdk${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel_nojdk${EXE_EXT}" \ - --action_env=PATH \ - --host_platform=@bazel_tools//platforms:host_platform \ - --platforms=@bazel_tools//platforms:target_platform \ diff --git a/packages/bazel/compile-0.29.patch b/packages/bazel/compile-0.29.patch deleted file mode 100644 index 6cb2eb0b57277f39bbb6d7d3f372e8adfa27722e..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.29.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -63,7 +63,7 @@ - log "Building output/bazel" - # We set host and target platform directly because we are building for the local - # host. --bazel_build "src:bazel_nojdk${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel_nojdk${EXE_EXT}" \ - --action_env=PATH \ - --host_platform=@local_config_platform//:host \ - --platforms=@local_config_platform//:host \ diff --git a/packages/bazel/compile-0.3.patch b/packages/bazel/compile-0.3.patch deleted file mode 100644 index 82db6efb6e86f766c169d93f11e8272385e30eba..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -99,7 +99,7 @@ - new_step 'Building Bazel with Bazel' - display "." - log "Building output/bazel" -- bazel_build "src:bazel${EXE_EXT}" -+ CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel${EXE_EXT}" - cp -f "bazel-bin/src/bazel${EXE_EXT}" "output/bazel${EXE_EXT}" - chmod 0755 "output/bazel${EXE_EXT}" - BAZEL="$(pwd)/output/bazel${EXE_EXT}" diff --git a/packages/bazel/compile-0.4.patch b/packages/bazel/compile-0.4.patch deleted file mode 100644 index 80eab26a88279781198f6a23e6ccf4675175dd45..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.4.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -124,7 +124,7 @@ - new_step 'Building Bazel with Bazel' - display "." - log "Building output/bazel" -- bazel_build "src:bazel${EXE_EXT}" \ -+ CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel${EXE_EXT}" \ - || fail "Could not build Bazel" - bazel_bin_path="$(get_bazel_bin_path)/src/bazel${EXE_EXT}" - [ -e "$bazel_bin_path" ] \ diff --git a/packages/bazel/compile-0.6.patch b/packages/bazel/compile-0.6.patch deleted file mode 100644 index 64eb408e5df8743d6083e904d7b3049575115c49..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.6.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -85,7 +85,7 @@ - log "Building output/bazel" - # We set host and target platform directly since the defaults in @bazel_tools - # have not yet been generated. --bazel_build "src:bazel${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel${EXE_EXT}" \ - --experimental_host_platform=//tools/platforms:host_platform \ - --experimental_platforms=//tools/platforms:target_platform \ - || fail "Could not build Bazel" diff --git a/packages/bazel/compile-0.9.patch b/packages/bazel/compile-0.9.patch deleted file mode 100644 index 135de3a00fdadc3e1e4fa3b6d64d1da90f2ec67e..0000000000000000000000000000000000000000 --- a/packages/bazel/compile-0.9.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/compile.sh -+++ b/compile.sh -@@ -92,7 +92,7 @@ - log "Building output/bazel" - # We set host and target platform directly since the defaults in @bazel_tools - # have not yet been generated. --bazel_build "src:bazel${EXE_EXT}" \ -+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel${EXE_EXT}" \ - --host_platform=//tools/platforms:host_platform \ - --platforms=//tools/platforms:target_platform \ - || fail "Could not build Bazel" diff --git a/packages/bazel/cppcompileaction-0.3.0.patch b/packages/bazel/cppcompileaction-0.3.0.patch deleted file mode 100644 index dd23972d9925de9b9631361ad5d7759e985f6d66..0000000000000000000000000000000000000000 --- a/packages/bazel/cppcompileaction-0.3.0.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java.orig 2020-06-08 13:42:14.035342560 -0400 -+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java 2020-06-08 13:42:25.149375458 -0400 -@@ -963,7 +963,7 @@ - // are, it's probably due to a non-hermetic #include, & we should stop - // the build with an error. - if (execPath.startsWith(execRoot)) { -- execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path -+ // execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path - } else { - problems.add(execPathFragment.getPathString()); - continue; diff --git a/packages/bazel/cppcompileaction-0.3.2.patch b/packages/bazel/cppcompileaction-0.3.2.patch deleted file mode 100644 index c15d3bf64a180050bbdd00e59620f40b0fb2d168..0000000000000000000000000000000000000000 --- a/packages/bazel/cppcompileaction-0.3.2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java.orig 2020-03-25 08:54:37.914186251 -0400 -+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 2020-03-25 08:55:01.356250657 -0400 -@@ -148,7 +148,7 @@ - if (execPath.startsWith(execRoot)) { - execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path - } else { -- problems.add(execPathFragment.getPathString()); -+ // problems.add(execPathFragment.getPathString()); - continue; - } - } diff --git a/packages/bazel/disabledepcheck.patch b/packages/bazel/disabledepcheck.patch deleted file mode 100644 index c15d3bf64a180050bbdd00e59620f40b0fb2d168..0000000000000000000000000000000000000000 --- a/packages/bazel/disabledepcheck.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java.orig 2020-03-25 08:54:37.914186251 -0400 -+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 2020-03-25 08:55:01.356250657 -0400 -@@ -148,7 +148,7 @@ - if (execPath.startsWith(execRoot)) { - execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path - } else { -- problems.add(execPathFragment.getPathString()); -+ // problems.add(execPathFragment.getPathString()); - continue; - } - } diff --git a/packages/bazel/disabledepcheck_old.patch b/packages/bazel/disabledepcheck_old.patch deleted file mode 100644 index dd23972d9925de9b9631361ad5d7759e985f6d66..0000000000000000000000000000000000000000 --- a/packages/bazel/disabledepcheck_old.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java.orig 2020-06-08 13:42:14.035342560 -0400 -+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java 2020-06-08 13:42:25.149375458 -0400 -@@ -963,7 +963,7 @@ - // are, it's probably due to a non-hermetic #include, & we should stop - // the build with an error. - if (execPath.startsWith(execRoot)) { -- execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path -+ // execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path - } else { - problems.add(execPathFragment.getPathString()); - continue; diff --git a/packages/bazel/gcc11_1.patch b/packages/bazel/gcc11_1.patch deleted file mode 100644 index 5868f20291ee13c0a8988b312c05e2e7f1fefa3c..0000000000000000000000000000000000000000 --- a/packages/bazel/gcc11_1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h -index ed6616362fcc..c4b051e0100c 100644 ---- a/third_party/ijar/zlib_client.h -+++ b/third_party/ijar/zlib_client.h -@@ -16,6 +16,7 @@ - #define THIRD_PARTY_IJAR_ZLIB_CLIENT_H_ - - #include <limits.h> -+#include <limits> - - #include "third_party/ijar/common.h" - diff --git a/packages/bazel/gcc11_2.patch b/packages/bazel/gcc11_2.patch deleted file mode 100644 index aac5b08b07348e4db69e4d76a715c49e52e5a32e..0000000000000000000000000000000000000000 --- a/packages/bazel/gcc11_2.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h -index c4b051e0100c..0a917ff0a99a 100644 ---- a/third_party/ijar/zlib_client.h -+++ b/third_party/ijar/zlib_client.h -@@ -16,7 +16,9 @@ - #define THIRD_PARTY_IJAR_ZLIB_CLIENT_H_ - - #include <limits.h> -+ - #include <limits> -+#include <stdexcept> - - #include "third_party/ijar/common.h" - diff --git a/packages/bazel/gcc11_3.patch b/packages/bazel/gcc11_3.patch deleted file mode 100644 index 78d24e768ebe18619cb624ae4dc0be1a6e5a855a..0000000000000000000000000000000000000000 --- a/packages/bazel/gcc11_3.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc -index 6e3a90871844..65179e3290ec 100644 ---- a/third_party/ijar/mapped_file_unix.cc -+++ b/third_party/ijar/mapped_file_unix.cc -@@ -15,10 +15,11 @@ - #include <errno.h> - #include <fcntl.h> - #include <stdio.h> --#include <unistd.h> - #include <sys/mman.h> -+#include <unistd.h> - - #include <algorithm> -+#include <limits> - - #include "third_party/ijar/mapped_file.h" - diff --git a/packages/bazel/gcc11_4.patch b/packages/bazel/gcc11_4.patch deleted file mode 100644 index 972c9035d648f9df6c6da75dd41c96318d95e3f8..0000000000000000000000000000000000000000 --- a/packages/bazel/gcc11_4.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/third_party/grpc/grpc_1.33.1.patch -+++ b/third_party/grpc/grpc_1.33.1.patch -@@ -58,6 +58,14 @@ index 09fcad95a2..9b737e5deb 100644 - ) - - native.bind( -+@@ -245,6 +245,7 @@ def grpc_deps(): -+ "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz", -+ "https://github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz", -+ ], -++ patches = ["@com_github_grpc_grpc//:third_party/abseil-cpp/absl.patch"], -+ ) -+ -+ if "bazel_toolchains" not in native.existing_rules(): - diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl - index 4c1dfad2e8..f63c54ddef 100644 - --- a/bazel/grpc_extra_deps.bzl -@@ -120,3 +128,25 @@ index c047f0c515..7c24fbc617 100644 - ":windows": "@com_github_grpc_grpc//third_party/cares:config_windows/ares_config.h", - ":android": "@com_github_grpc_grpc//third_party/cares:config_android/ares_config.h", - "//conditions:default": "@com_github_grpc_grpc//third_party/cares:config_linux/ares_config.h", -+ -+--- /dev/null -++++ b/third_party/abseil-cpp/absl.patch -+@@ -0,0 +1,18 @@ -++0e2c62da1dcaf6529abab952bdcc96c6de2d9506 by Abseil Team <absl-team@google.com>: -++ -++Add missing <limits> include -++ -++PiperOrigin-RevId: 339054753 -++ -++-- -++ -++--- absl/synchronization/internal/graphcycles.cc -+++++ absl/synchronization/internal/graphcycles.cc -++@@ -37,6 +37,7 @@ -++ -++ #include <algorithm> -++ #include <array> -+++#include <limits> -++ #include "absl/base/internal/hide_ptr.h" -++ #include "absl/base/internal/raw_logging.h" -++ #include "absl/base/internal/spinlock.h" - diff --git a/packages/bazel/linux_ppc-0.29.1.patch b/packages/bazel/linux_ppc-0.29.1.patch deleted file mode 100644 index c3ed9ab254b253066ce37f9b0eb497ebb1e589d4..0000000000000000000000000000000000000000 --- a/packages/bazel/linux_ppc-0.29.1.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 9c9d27561780bc56d9f0867e325c7421a94ee1cb Mon Sep 17 00:00:00 2001 -From: Harsh Bhatia <bhatia4@llnl.gov> -Date: Tue, 15 Dec 2020 15:56:10 -0800 -Subject: [PATCH] https://github.com/bazelbuild/bazel/commit/ab62a6e097590dac5ec946ad7a796ea0e8593ae0 - ---- - src/conditions/BUILD | 6 ++++++ - third_party/BUILD | 8 ++++++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/conditions/BUILD b/src/conditions/BUILD -index 2b28e28057..faa41a439d 100644 ---- a/src/conditions/BUILD -+++ b/src/conditions/BUILD -@@ -10,6 +10,12 @@ filegroup( - visibility = ["//src:__pkg__"], - ) - -+config_setting( -+ name = "linux_ppc", -+ values = {"cpu": "ppc"}, -+ visibility = ["//visibility:public"], -+) -+ - config_setting( - name = "linux_x86_64", - values = {"cpu": "k8"}, -diff --git a/third_party/BUILD b/third_party/BUILD -index 159006d741..4fcae54c00 100644 ---- a/third_party/BUILD -+++ b/third_party/BUILD -@@ -523,12 +523,13 @@ UNNECESSARY_DYNAMIC_LIBRARIES = select({ - "//src/conditions:darwin": "*.so *.dll", - "//src/conditions:darwin_x86_64": "*.so *.dll", - "//src/conditions:linux_x86_64": "*.jnilib *.dll", -+ "//src/conditions:linux_ppc": "*.so *.jnilib *.dll", - # The .so file is an x86 one, so we can just remove it if the CPU is not x86 - "//src/conditions:arm": "*.so *.jnilib *.dll", - "//src/conditions:linux_aarch64": "*.so *.jnilib *.dll", - # Play it safe -- better have a big binary than a slow binary - # zip -d does require an argument. Supply something bogus. -- "//conditions:default": "*.bogusextension", -+ "//conditions:default": "", - }) - - # Remove native libraries that are for a platform different from the one we are -@@ -537,7 +538,10 @@ genrule( - name = "filter_netty_dynamic_libs", - srcs = ["netty_tcnative/netty-tcnative-boringssl-static-2.0.24.Final.jar"], - outs = ["netty_tcnative/netty-tcnative-filtered.jar"], -- cmd = "cp $< $@ && zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES, -+ cmd = "cp $< $@ && " + -+ # End successfully if there is nothing to be deleted from the archive -+ "if [ -n '" + UNNECESSARY_DYNAMIC_LIBRARIES + "' ]; then " + -+ "zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES + "; fi", - ) - - java_import( --- -2.21.0 (Apple Git-122.2) - diff --git a/packages/bazel/package.py b/packages/bazel/package.py deleted file mode 100644 index a2cc4d96d205f9f0743b9bdbf2bdc22eb003113d..0000000000000000000000000000000000000000 --- a/packages/bazel/package.py +++ /dev/null @@ -1,588 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import re - -from spack.package import * - - -class Bazel(Package): - """Bazel is an open-source build and test tool similar to Make, Maven, and - Gradle. It uses a human-readable, high-level build language. Bazel supports - projects in multiple languages and builds outputs for multiple platforms. - Bazel supports large codebases across multiple repositories, and large - numbers of users.""" - - homepage = "https://bazel.build/" - url = "https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-dist.zip" - - tags = ["build-tools"] - - version("6.1.1", sha256="6b900f26d676c7eca1d2e7dff9b71890dabd3ff59cab2a2d2178bc8a0395342a") - version("6.1.0", sha256="c4b85675541cf66ee7cb71514097fdd6c5fc0e02527243617a4f20ca6b4f2932") - version("6.0.0", sha256="7bc0c5145c19a56d82a08fce6908c5e1a0e75e4fbfb3b6f12b4deae7f4b38cbc") - version("5.4.0", sha256="a1c62d9bcb4e03106ddf0b7bd96196ba246e1c9b7a935daf8d9beda8bbdcb8a1") - version("5.3.2", sha256="3880ad919592d1e3e40c506f13b32cd0a2e26f129d87cb6ba170f1801d7d7b82") - version("5.3.1", sha256="18486e7152ca26b26585e9b2a6f49f332b116310d3b7e5b70583f1f1f24bb8ae") - version("5.3.0", sha256="ee801491ff0ec3a562422322a033c9afe8809b64199e4a94c7433d4e14e6b921") - version("5.2.0", sha256="820a94dbb14071ed6d8c266cf0c080ecb265a5eea65307579489c4662c2d582a") - version("5.1.1", sha256="7f5d3bc1d344692b2400f3765fd4b5c0b636eb4e7a8a7b17923095c7b56a4f78") - version("5.1.0", sha256="4de301f509fc6d0cbc697b2017384ecdc94df8f36245bbcbedc7ea6780acc9f5") - version("5.0.0", sha256="072dd62d237dbc11e0bac02e118d8c2db4d0ba3ba09f1a0eb1e2a460fb8419db") - version("4.2.3", sha256="b0e84d0538f3ec2b95a49bae31a5066f0967281a3ca99965016fbe178acd2d3d") - version("4.2.2", sha256="9981d0d53a356c4e87962847750a97c9e8054e460854748006c80f0d7e2b2d33") - version("4.2.1", sha256="12ea7aa11e2bdb12de1dceb9939a22e96f5a480437cb17c123379d8e0fdf5e82") - version("4.2.0", sha256="74814b63920aaee47dbbbee7082e5c4317e4eebaf07e03c5fb5626e1716f1034") - version("4.1.0", sha256="f377d755c96a50f6bd2f423562598d822f43356783330a0b780ad442864d6eeb") - version("4.0.0", sha256="d350f80e70654932db252db380d2ec0144a00e86f8d9f2b4c799ffdb48e9cdd1") - version("3.7.2", sha256="de255bb42163a915312df9f4b86e5b874b46d9e8d4b72604b5123c3a845ed9b1") - version("3.7.1", sha256="c9244e5905df6b0190113e26082c72d58b56b1b0dec66d076f083ce4089b0307") - version("3.7.0", sha256="63873623917c756d1be49ff4d5fc23049736180e6b9a7d5236c6f204eddae3cc") - version("3.6.0", sha256="3a18f24febb5203f11b0985b27e120ac623058d1d5ca79cd6df992e67d57240a") - version("3.5.1", sha256="67eae714578b22d24192b0eb3a2d35b07578bbd57a33c50f1e74f8acd6378b3c") - version("3.5.0", sha256="334429059cf82e222ca8a9d9dbbd26f8e1eb308613463c2b8655dd4201b127ec") - version("3.4.1", sha256="27af1f11c8f23436915925b25cf6e1fb07fccf2d2a193a307c93437c60f63ba8") - version("3.4.0", sha256="7583abf8905ba9dd5394294e815e8873635ac4e5067e63392e8a33b397e450d8") - version("3.3.1", sha256="e0f1f43c65c4e0a38522b37e81f6129d8a1f7cd3d8884847be306544a7492747") - version("3.3.0", sha256="05a03960de09d5775839c5766ad8a0a30f261feaba5fa53ce3e49168d1eee826") - version("3.2.0", sha256="44ec129436f6de45f2230e14100104919443a1364c2491f5601666b358738bfa") - version("3.1.0", sha256="d7f40d0cac95a06cea6cb5b7f7769085257caebc3ee84269dd9298da760d5615") - version("3.0.0", sha256="530f5132e0a50da7ebb0ed08d9b6f1ddfd0d7d9b5d0beb2df5d687a4c8daf6b3") - version("2.2.0", sha256="9379878a834d105a47a87d3d7b981852dd9f64bc16620eacd564b48533e169a7") - version("2.1.1", sha256="83f67f28f4e47ff69043307d1791c9bffe83949e84165d49058b84eded932647") - version("2.1.0", sha256="3371cd9050989173a3b27364668328653a65653a50a85c320adc53953b4d5f46") - version("2.0.1", sha256="a863ed9e6fc420fbd92e63a12fe1a5b9be1a7a36f11f61f1fdc582c813bbe543") - version("2.0.0", sha256="724da3c656f68e787a86ebb9844773aa1c2e3a873cc39462a8f1b336153d6cbb") - version( - "1.2.1", - sha256="255da49d0f012bc4f2c1d6d3ccdbe578e22fe97b8d124e1629a486fe2a09d3e1", - deprecated=True, - ) - version( - "1.2.0", - sha256="9cb46b0a18b9166730307a0e82bf4c02281a1cc6da0fb11239e6fe4147bdee6e", - deprecated=True, - ) - version( - "1.1.0", - sha256="4b66a8c93af7832ed32e7236cf454a05f3aa06d25a8576fc3f83114f142f95ab", - deprecated=True, - ) - version( - "1.0.1", - sha256="f4d2dfad011ff03a5fae41b9b02cd96cd7297c1205d496603d66516934fbcfee", - deprecated=True, - ) - version( - "1.0.0", - sha256="c61daf0b69dd95205c695b2f9022d296d052c727062cfd396d54ffb2154f8cac", - deprecated=True, - ) - version( - "0.29.1", - sha256="872a52cff208676e1169b3e1cae71b1fe572c4109cbd66eab107d8607c378de5", - deprecated=True, - ) - version( - "0.29.0", - sha256="01cb6f2e808bd016cf0e217e12373c9efb808123e58b37885be8364458d3a40a", - deprecated=True, - ) - version( - "0.28.1", - sha256="2cea463d611f5255d2f3d41c8de5dcc0961adccb39cf0ac036f07070ba720314", - deprecated=True, - ) - version( - "0.28.0", - sha256="26ad8cdadd413b8432cf46d9fc3801e8db85d9922f85dd8a7f5a92fec876557f", - deprecated=True, - ) - version( - "0.27.2", - sha256="5e1bf2b48e54eb7e518430667d29aef53695d6dd7c718665a52131ab27aadab2", - deprecated=True, - ) - version( - "0.27.1", - sha256="8051d77da4ec338acd91770f853e4c25f4407115ed86fd35a6de25921673e779", - deprecated=True, - ) - version( - "0.27.0", - sha256="c3080d3b959ac08502ad5c84a51608c291accb1481baad88a628bbf79b30c67a", - deprecated=True, - ) - version( - "0.26.1", - sha256="c0e94f8f818759f3f67af798c38683520c540f469cb41aea8f5e5a0e43f11600", - deprecated=True, - ) - version( - "0.26.0", - sha256="d26dadf62959255d58e523da3448a6222af768fe1224e321b120c1d5bbe4b4f2", - deprecated=True, - ) - version( - "0.25.3", - sha256="23eafd3e439bc71baba9c592b52cb742dabc8640a13b9da1751fec090a2dda99", - deprecated=True, - ) - version( - "0.25.2", - sha256="7456032199852c043e6c5b3e4c71dd8089c1158f72ec554e6ec1c77007f0ab51", - deprecated=True, - ) - version( - "0.25.1", - sha256="a52bb31aeb1f821e649d25ef48023cfb54a12887aff875c6349ebcac36c2f056", - deprecated=True, - ) - version( - "0.25.0", - sha256="f624fe9ca8d51de192655369ac538c420afb7cde16e1ad052554b582fff09287", - deprecated=True, - ) - version( - "0.24.1", - sha256="56ea1b199003ad832813621744178e42b39e6206d34fbae342562c287da0cd54", - deprecated=True, - ) - version( - "0.24.0", - sha256="621d2a97899a88850a913eabf9285778331a309fd4658b225b1377f80060fa85", - deprecated=True, - ) - version( - "0.23.2", - sha256="293a5a7d851e0618eeb5e6958d94a11d45b6a00f2ba9376de61ac2bd5f917439", - deprecated=True, - ) - version( - "0.23.1", - sha256="dd47199f92452bf67b2c5d60ad4b7143554eaf2c6196ab6e8713449d81a0491d", - deprecated=True, - ) - version( - "0.23.0", - sha256="2daf9c2c6498836ed4ebae7706abb809748b1350cacd35b9f89452f31ac0acc1", - deprecated=True, - ) - version( - "0.22.0", - sha256="6860a226c8123770b122189636fb0c156c6e5c9027b5b245ac3b2315b7b55641", - deprecated=True, - ) - version( - "0.21.0", - sha256="6ccb831e683179e0cfb351cb11ea297b4db48f9eab987601c038aa0f83037db4", - deprecated=True, - ) - version( - "0.20.0", - sha256="1945afa84fd8858b0a3c68c09915a4bc81065c61df2591387b2985e2297d30bd", - deprecated=True, - ) - version( - "0.19.2", - sha256="11234cce4f6bdc62c3ac688f41c7b5c178eecb6f7e2c4ba0bcf00ba8565b1d19", - deprecated=True, - ) - version( - "0.19.1", - sha256="c9405f7b8c79ebc81f9f0e49bb656df4a0da246771d010c2cdd6bb30e2500ac0", - deprecated=True, - ) - version( - "0.19.0", - sha256="ee6135c5c47306c8421d43ad83aabc4f219cb065376ee37797f2c8ba9a615315", - deprecated=True, - ) - version( - "0.18.1", - sha256="baed9f28c317000a4ec1ad2571b3939356d22746ca945ac2109148d7abb860d4", - deprecated=True, - ) - version( - "0.18.0", - sha256="d0e86d2f7881ec8742a9823a986017452d2da0dfe4e989111da787cb89257155", - deprecated=True, - ) - version( - "0.17.2", - sha256="b6e87acfa0a405bb8b3417c58477b66d5bc27dc0d31ba6fa12bc255b9278d33b", - deprecated=True, - ) - version( - "0.17.1", - sha256="23e4281c3628cbd746da3f51330109bbf69780bd64461b63b386efae37203f20", - deprecated=True, - ) - version( - "0.16.1", - sha256="09c66b94356c82c52f212af52a81ac28eb06de1313755a2f23eeef84d167b36c", - deprecated=True, - ) - version( - "0.16.0", - sha256="c730593916ef0ba62f3d113cc3a268e45f7e8039daf7b767c8641b6999bd49b1", - deprecated=True, - ) - version( - "0.15.2", - sha256="bf53ec73be3a6d412d85ef612cec6e9c85db45da42001fab0cf1dad44cfc03f1", - deprecated=True, - ) - version( - "0.15.1", - sha256="c62b351fa4c1ba5aeb34d0a137176f8e8f1d89a32f548a10e96c11df176ffc6c", - deprecated=True, - ) - version( - "0.15.0", - sha256="c3b716e6625e6b8c323350c95cd3ae0f56aeb00458dddd10544d5bead8a7b602", - deprecated=True, - ) - version( - "0.14.1", - sha256="d49cdcd82618ae7a7a190e6f0a80d9bf85c1a66b732f994f37732dc14ffb0025", - deprecated=True, - ) - version( - "0.14.0", - sha256="259627de8b9d415cc80904523facf3d50e6e8e68448ab968eb1c9cb8ca1ef843", - deprecated=True, - ) - version( - "0.13.1", - sha256="b0269e75b40d87ff87886e5f3432cbf88f70c96f907ab588e6c21b2922d72db0", - deprecated=True, - ) - version( - "0.13.0", - sha256="82e9035084660b9c683187618a29aa896f8b05b5f16ae4be42a80b5e5b6a7690", - deprecated=True, - ) - version( - "0.12.0", - sha256="3b3e7dc76d145046fdc78db7cac9a82bc8939d3b291e53a7ce85315feb827754", - deprecated=True, - ) - version( - "0.11.1", - sha256="e8d762bcc01566fa50952c8028e95cfbe7545a39b8ceb3a0d0d6df33b25b333f", - deprecated=True, - ) - version( - "0.11.0", - sha256="abfeccc94728cb46be8dbb3507a23ccffbacef9fbda96a977ef4ea8d6ab0d384", - deprecated=True, - ) - version( - "0.10.1", - sha256="708248f6d92f2f4d6342006c520f22dffa2f8adb0a9dc06a058e3effe7fee667", - deprecated=True, - ) - version( - "0.10.0", - sha256="47e0798caaac4df499bce5fe554a914abd884a855a27085a4473de1d737d9548", - deprecated=True, - ) - version( - "0.9.0", - sha256="efb28fed4ffcfaee653e0657f6500fc4cbac61e32104f4208da385676e76312a", - deprecated=True, - ) - version( - "0.8.1", - sha256="dfd0761e0b7e36c1d74c928ad986500c905be5ebcfbc29914d574af1db7218cf", - deprecated=True, - ) - version( - "0.8.0", - sha256="aa840321d056abd3c6be10c4a1e98a64f9f73fff9aa89c468dae8c003974a078", - deprecated=True, - ) - version( - "0.7.0", - sha256="a084a9c5d843e2343bf3f319154a48abe3d35d52feb0ad45dec427a1c4ffc416", - deprecated=True, - ) - version( - "0.6.1", - sha256="dada1f60a512789747011184b2767d2b44136ef3b036d86947f1896d200d2ba7", - deprecated=True, - ) - version( - "0.6.0", - sha256="a0e53728a9541ef87934831f3d05f2ccfdc3b8aeffe3e037be2b92b12400598e", - deprecated=True, - ) - version( - "0.5.4", - sha256="2157b05309614d6af0e4bbc6065987aede590822634a0522161f3af5d647abc9", - deprecated=True, - ) - version( - "0.5.3", - sha256="76b5c5880a0b15f5b91f7d626c5bc3b76ce7e5d21456963c117ab711bf1c5333", - deprecated=True, - ) - version( - "0.5.2", - sha256="2418c619bdd44257a170b85b9d2ecb75def29e751b725e27186468ada2e009ea", - deprecated=True, - ) - version( - "0.5.1", - sha256="85e6a18b111afeea2e475fe991db2a441ec3824211d659bee7b0012c36be9a40", - deprecated=True, - ) - version( - "0.5.0", - sha256="ebba7330a8715e96a6d6dc0aa085125d529d0740d788f0544c6169d892e4f861", - deprecated=True, - ) - version( - "0.4.5", - sha256="2b737be42678900470ae9e48c975ac5b2296d9ae23c007bf118350dbe7c0552b", - deprecated=True, - ) - version( - "0.4.4", - sha256="d52a21dda271ae645711ce99c70cf44c5d3a809138e656bbff00998827548ebb", - deprecated=True, - ) - version( - "0.4.3", - sha256="cbd2ab580181c17317cf18b2bf825bcded2d97cab01cd5b5fe4f4d520b64f90f", - deprecated=True, - ) - version( - "0.4.2", - sha256="8e6f41252abadcdb2cc7a07f910ec4b45fb12c46f0a578672c6a186c7efcdb36", - deprecated=True, - ) - version( - "0.4.1", - sha256="008c648d3c46ece063ae8b5008480d8ae6d359d35967356685d1c09da07e1064", - deprecated=True, - ) - version( - "0.4.0", - sha256="6474714eee72ba2d4e271ed00ce8c05d67a9d15327bc03962b821b2af2c5ca36", - deprecated=True, - ) - version( - "0.3.2", - sha256="ca5caf7b2b48c7639f45d815b32e76d69650f3199eb8caa541d402722e3f6c10", - deprecated=True, - ) - version( - "0.3.1", - sha256="218d0e28b4d1ee34585f2ac6b18d169c81404d93958815e73e60cc0368efcbb7", - deprecated=True, - ) - version( - "0.3.0", - sha256="357fd8bdf86034b93902616f0844bd52e9304cccca22971ab7007588bf9d5fb3", - deprecated=True, - ) - version( - "0.2.0", - sha256="e9ba2740d9727ae6d0f9b1ac0c5df331814fd03518fe4b511396ed10780d5272", - deprecated=True, - ) - version( - "0.1.4", - sha256="f3c395f5cd78cfef96f4008fe842f327bc8b03b77f46999387bc0ad223b5d970", - deprecated=True, - ) - version( - "0.1.1", - sha256="c6ae19610b936a0aa940b44a3626d6e660fc457a8187d295cdf0b21169453d20", - deprecated=True, - ) - - variant( - "nodepfail", - default=True, - description="Disable failing dependency checks due to injected absolute paths - " - "required for most builds using bazel with spack", - ) - - # https://bazel.build/install/compile-source#bootstrap-unix-prereq - depends_on("java", type=("build", "run")) - depends_on("java@11", when="@5.3:", type=("build", "run")) - depends_on("java@8,11", when="@3.3:5.2", type=("build", "run")) - depends_on("java@8", when="@0.6:3.2", type=("build", "run")) - depends_on("java@7:8", when="@:0.5", type=("build", "run")) - depends_on("python+pythoncmd", type=("build", "run")) - depends_on("zip", when="platform=linux", type=("build", "run")) - - # Pass Spack environment variables to the build - patch("bazelruleclassprovider-0.25.patch", when="@0.25:") - patch("bazelruleclassprovider-0.14.patch", when="@0.14:0.24") - patch("bazelconfiguration-0.3.patch", when="@:0.13") - - # Inject include paths - patch("unix_cc_configure-3.0.patch", when="@3:") - patch("unix_cc_configure-0.15.patch", when="@0.15:2") - patch("unix_cc_configure-0.10.patch", when="@0.10:0.14") - patch("unix_cc_configure-0.5.3.patch", when="@0.5.3:0.9") - patch("cc_configure-0.5.0.patch", when="@0.5.0:0.5.2") - patch("cc_configure-0.3.0.patch", when="@0.3:0.4") - - # Set CC and CXX - patch("compile-0.29.patch", when="@0.29:") - patch("compile-0.21.patch", when="@0.21:0.28") - patch("compile-0.16.patch", when="@0.16:0.20") - patch("compile-0.13.patch", when="@0.13:0.15") - patch("compile-0.9.patch", when="@0.9:0.12") - patch("compile-0.6.patch", when="@0.6:0.8") - patch("compile-0.4.patch", when="@0.4:0.5") - patch("compile-0.3.patch", when="@0.2:0.3") - - # Disable dependency search - patch("cppcompileaction-0.3.2.patch", when="@0.3.2:+nodepfail") - patch("cppcompileaction-0.3.0.patch", when="@0.3.0:0.3.1+nodepfail") - - # https://github.com/bazelbuild/bazel/issues/17956 - patch("apple-clang-14.0.3.patch", when="@0.3:5.4.0,6.0:6.1") - - # https://github.com/bazelbuild/bazel/issues/17958 - patch( - "https://github.com/bazelbuild/bazel/commit/43dadb275b3f9690242bf2d94a0757c721d231a9.patch?full_index=1", - sha256="af73a49006baa05475b1b79dad83e1e014ebfe22f38aa55774f9a465404aed54", - when="@5.0:5.4.0,6.0", - ) - - # Fix build on power9 (2x commits) - # https://github.com/bazelbuild/bazel/commit/5cff4f1edf8b95bf0612791632255852332f72b5 - # https://github.com/bazelbuild/bazel/commit/ab62a6e097590dac5ec946ad7a796ea0e8593ae0 - patch("build-0.29.1.patch", when="@0.29.1") - - # Fix build with Fujitsu compiler - patch("blaze_util_posix-0.29.1.patch", when="@0.29.1:%fj") - patch("unix_cc_configure_fj-5.2.patch", when="@5.2:%fj") - patch("unix_cc_configure_fj-5.0.patch", when="@5.0:5.1%fj") - patch("unix_cc_configure_fj-0.29.1.patch", when="@0.29.1:4%fj") - patch("bazelruleclassprovider_fj-0.25.patch", when="@0.25:%fj") - conflicts( - "%fj", - when="@:0.24.1", - msg="Fujitsu Compiler cannot build 0.24.1 or less, " "please use a newer release.", - ) - - # https://blog.bazel.build/2021/05/21/bazel-4-1.html - conflicts("platform=darwin target=aarch64:", when="@:4.0") - - # patches for compiling bazel-4.1:4 with gcc-11 - # these are derived from - # https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29084/ - patch("gcc11_1.patch", when="@0.3.2:4%gcc@11:") - patch("gcc11_2.patch", when="@0.3.2:4%gcc@11:") - patch("gcc11_3.patch", when="@0.3:4%gcc@11:") - patch("gcc11_4.patch", when="@4.1:4%gcc@11:") - - # bazel-4.0.0 does not compile with gcc-11 - # newer versions of grpc and abseil dependencies are needed but are not in - # bazel-4.0.0 - conflicts("@:0.2,4.0.0", when="%gcc@11:") - - executables = ["^bazel$"] - - @classmethod - def determine_version(cls, exe): - output = Executable(exe)("version", output=str, error=str) - match = re.search(r"Build label: ([\d.]+)", output) - return match.group(1) if match else None - - def url_for_version(self, version): - if version >= Version("0.4.1"): - url = "https://github.com/bazelbuild/bazel/releases/download/{0}/bazel-{0}-dist.zip" - else: - url = "https://github.com/bazelbuild/bazel/archive/{0}.tar.gz" - - return url.format(version) - - def setup_build_environment(self, env): - # fix the broken linking (on power9) - # https://github.com/bazelbuild/bazel/issues/10327 - env.set("BAZEL_LINKOPTS", "") - env.set("BAZEL_LINKLIBS", "-lstdc++") - - env.set( - "EXTRA_BAZEL_ARGS", - # Spack's logs don't handle colored output well - "--color=no --host_javabase=@local_jdk//:jdk" - # Enable verbose output for failures - " --verbose_failures" - # Ask bazel to explain what it's up to - # Needs a filename as argument - " --explain=explainlogfile.txt" - # Increase verbosity of explanation, - " --verbose_explanations" - # Show (formatted) subcommands being executed - " --subcommands=pretty_print" " --jobs={0}".format(make_jobs), - ) - - @run_before("install") - def bootstrap(self): - bash = which("bash") - bash("./compile.sh") - - def install(self, spec, prefix): - mkdir(prefix.bin) - install("output/bazel", prefix.bin) - - @run_after("install") - @on_package_attributes(run_tests=True) - def install_test(self): - # https://github.com/Homebrew/homebrew-core/blob/master/Formula/bazel.rb - - # Bazel does not work properly on NFS, switch to /tmp - with working_dir("/tmp/spack/bazel/spack-test", create=True): - touch("WORKSPACE") - - with open("ProjectRunner.java", "w") as f: - f.write( - """\ -public class ProjectRunner { - public static void main(String args[]) { - System.out.println("Hi!"); - } -}""" - ) - - with open("BUILD", "w") as f: - f.write( - """\ -java_binary( - name = "bazel-test", - srcs = glob(["*.java"]), - main_class = "ProjectRunner", -)""" - ) - - # Spack's logs don't handle colored output well - bazel = Executable(self.spec["bazel"].command.path) - bazel( - "--output_user_root=/tmp/spack/bazel/spack-test", - "build", - "--color=no", - f"--jobs={make_jobs}", - "//:bazel-test", - ) - - exe = Executable("bazel-bin/bazel-test") - assert exe(output=str) == "Hi!\n" - - def setup_dependent_package(self, module, dependent_spec): - module.bazel = Executable(self.spec["bazel"].command.path) - - @property - def parallel(self): - return not self.spec.satisfies("%fj") diff --git a/packages/bazel/patch_for_fcc.patch b/packages/bazel/patch_for_fcc.patch deleted file mode 100644 index d90448b0bae90cd963ea533f6e3b05a6f02b98cd..0000000000000000000000000000000000000000 --- a/packages/bazel/patch_for_fcc.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/main/cpp/blaze_util_posix.cc b/src/main/cpp/blaze_util_posix.cc -index 87ba899180..1c967ee818 100644 ---- a/src/main/cpp/blaze_util_posix.cc -+++ b/src/main/cpp/blaze_util_posix.cc -@@ -565,7 +565,8 @@ static int setlk(int fd, struct flock *lock) { - // Prefer OFD locks if available. POSIX locks can be lost "accidentally" - // due to any close() on the lock file, and are not reliably preserved - // across execve() on Linux, which we need for --batch mode. -- if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0; -+ //if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0; -+ if (fcntl(fd, F_SETLK, lock) == 0) return 0; - if (errno != EINVAL) { - if (errno != EACCES && errno != EAGAIN) { - BAZEL_DIE(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR) -diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl -index ccb18a431a..0c5c8fd6f0 100644 ---- a/tools/cpp/unix_cc_configure.bzl -+++ b/tools/cpp/unix_cc_configure.bzl -@@ -379,7 +379,8 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools): - "", - False, - ), ":") -- gold_linker_path = _find_gold_linker_path(repository_ctx, cc) -+ #gold_linker_path = _find_gold_linker_path(repository_ctx, cc) -+ gold_linker_path = None - cc_path = repository_ctx.path(cc) - if not str(cc_path).startswith(str(repository_ctx.path(".")) + "/"): - # cc is outside the repository, set -B -@@ -468,7 +469,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools): - # Security hardening requires optimization. - # We need to undef it as some distributions now have it enabled by default. - "-U_FORTIFY_SOURCE", -- "-fstack-protector", -+ #"-fstack-protector", - # All warnings are enabled. Maybe enable -Werror as well? - "-Wall", - # Enable a few more warnings that aren't part of -Wall. diff --git a/packages/bazel/patch_for_fcc2.patch b/packages/bazel/patch_for_fcc2.patch deleted file mode 100644 index 709e5ee0202c07e6bc5b6202d654dbe2b97168a7..0000000000000000000000000000000000000000 --- a/packages/bazel/patch_for_fcc2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java -@@ -185,7 +185,7 @@ public class BazelRuleClassProvider { - - Map<String, String> spackEnv = System.getenv(); - for (String envName : spackEnv.keySet()) { -- if (envName.startsWith("SPACK_")) { -+ if ((envName.startsWith("SPACK_")) || (envName.equals("fcc_ENV")) || (envName.equals("FCC_ENV"))) { - env.put(envName, spackEnv.get(envName)); - } - } diff --git a/packages/bazel/rename-gettid-functions-0.25.patch b/packages/bazel/rename-gettid-functions-0.25.patch deleted file mode 100644 index fe06a6fc1825c9d70c5e84c8572d6b59c1511db6..0000000000000000000000000000000000000000 --- a/packages/bazel/rename-gettid-functions-0.25.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d1d017390b799c59d6fdf7b8afa6136d218bdd61 Mon Sep 17 00:00:00 2001 -From: Benjamin Peterson <benjamin@dropbox.com> -Date: Fri, 3 May 2019 08:11:00 -0700 -Subject: [PATCH] Rename gettid() functions. - -glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts. ---- - src/core/lib/gpr/log_linux.cc | 4 ++-- - src/core/lib/gpr/log_posix.cc | 4 ++-- - src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git third_party/grpc/src/core/lib/gpr/log_linux.cc.orig src/core/lib/gpr/log_linux.cc -index 561276f0c20..8b597b4cf2f 100644 ---- third_party/grpc/src/core/lib/gpr/log_linux.cc.orig 2019-06-21 10:42:13.235611417 -0400 -+++ third_party/grpc/src/core/lib/gpr/log_linux.cc 2019-06-21 10:42:16.686608855 -0400 -@@ -40,7 +40,7 @@ - #include <time.h> - #include <unistd.h> - --static long gettid(void) { return syscall(__NR_gettid); } -+static long sys_gettid(void) { return syscall(__NR_gettid); } - - void gpr_log(const char* file, int line, gpr_log_severity severity, - const char* format, ...) { -@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* - gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); - struct tm tm; - static __thread long tid = 0; -- if (tid == 0) tid = gettid(); -+ if (tid == 0) tid = sys_gettid(); - - timer = static_cast<time_t>(now.tv_sec); - final_slash = strrchr(args->file, '/'); -diff --git third_party/grpc/src/core/lib/gpr/log_posix.cc.orig src/core/lib/gpr/log_posix.cc -index b6edc14ab6b..2f7c6ce3760 100644 ---- third_party/grpc/src/core/lib/gpr/log_posix.cc.orig 2019-06-21 10:42:13.242611412 -0400 -+++ third_party/grpc/src/core/lib/gpr/log_posix.cc 2019-06-21 10:42:22.794604319 -0400 -@@ -30,7 +30,7 @@ - #include <string.h> - #include <time.h> - --static intptr_t gettid(void) { return (intptr_t)pthread_self(); } -+static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } - - void gpr_log(const char* file, int line, gpr_log_severity severity, - const char* format, ...) { -@@ -85,7 +85,7 @@ void gpr_default_log(gpr_log_func_args* - char* prefix; - gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]", - gpr_log_severity_string(args->severity), time_buffer, -- (int)(now.tv_nsec), gettid(), display_file, args->line); -+ (int)(now.tv_nsec), sys_gettid(), display_file, args->line); - - fprintf(stderr, "%-70s %s\n", prefix, args->message); - gpr_free(prefix); -diff --git third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc.orig src/core/lib/iomgr/ev_epollex_linux.cc -index 08116b3ab53..76f59844312 100644 ---- third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc.orig 2019-06-21 10:42:13.247611408 -0400 -+++ third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc 2019-06-21 10:42:29.767599141 -0400 -@@ -1150,7 +1150,7 @@ static void end_worker(grpc_pollset* pol - } - - #ifndef NDEBUG --static long gettid(void) { return syscall(__NR_gettid); } -+static long sys_gettid(void) { return syscall(__NR_gettid); } - #endif - - /* pollset->mu lock must be held by the caller before calling this. -@@ -1170,7 +1170,7 @@ static grpc_error* pollset_work(grpc_pol - #define WORKER_PTR (&worker) - #endif - #ifndef NDEBUG -- WORKER_PTR->originator = gettid(); -+ WORKER_PTR->originator = sys_gettid(); - #endif - if (grpc_polling_trace.enabled()) { - gpr_log(GPR_INFO, diff --git a/packages/bazel/unix_cc_configure-0.10.patch b/packages/bazel/unix_cc_configure-0.10.patch deleted file mode 100644 index bdd24e1152b5ac76c027690b720068550c9ef8e6..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure-0.10.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/tools/cpp/unix_cc_configure.bzl -+++ b/tools/cpp/unix_cc_configure.bzl -@@ -147,9 +147,18 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, additional_flags = []): - else: - inc_dirs = result.stderr[index1 + 1:index2].strip() - -- return [_prepare_include_path(repository_ctx, _cxx_inc_convert(p)) -- for p in inc_dirs.split("\n")] -+ default_inc_directories = [ -+ _prepare_include_path(repository_ctx, _cxx_inc_convert(p)) -+ for p in inc_dirs.split("\n") -+ ] -+ -+ env = repository_ctx.os.environ -+ if "SPACK_INCLUDE_DIRS" in env: -+ for path in env["SPACK_INCLUDE_DIRS"].split(":"): -+ default_inc_directories.append(path) -+ -+ return default_inc_directories - - - def _is_option_supported(repository_ctx, cc, option): diff --git a/packages/bazel/unix_cc_configure-0.15.patch b/packages/bazel/unix_cc_configure-0.15.patch deleted file mode 100644 index 74fd8bfb79b868dc2f8a9d0ac83fdd878b432495..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure-0.15.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/tools/cpp/unix_cc_configure.bzl -+++ b/tools/cpp/unix_cc_configure.bzl -@@ -145,11 +145,18 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, lang_flag, additional_fl - else: - inc_dirs = result.stderr[index1 + 1:index2].strip() - -- return [ -+ default_inc_directories = [ - _prepare_include_path(repository_ctx, _cxx_inc_convert(p)) - for p in inc_dirs.split("\n") - ] - -+ env = repository_ctx.os.environ -+ if "SPACK_INCLUDE_DIRS" in env: -+ for path in env["SPACK_INCLUDE_DIRS"].split(":"): -+ default_inc_directories.append(path) -+ -+ return default_inc_directories -+ - def _is_compiler_option_supported(repository_ctx, cc, option): - """Checks that `option` is supported by the C compiler. Doesn't %-escape the option.""" - result = repository_ctx.execute([ diff --git a/packages/bazel/unix_cc_configure-0.5.3.patch b/packages/bazel/unix_cc_configure-0.5.3.patch deleted file mode 100644 index 79b583ba84606d75fa35797229e08f723f538dc6..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure-0.5.3.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/tools/cpp/unix_cc_configure.bzl -+++ b/tools/cpp/unix_cc_configure.bzl -@@ -117,9 +117,19 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc): - else: - inc_dirs = result.stderr[index1 + 1:index2].strip() - -- return [escape_string(repository_ctx.path(_cxx_inc_convert(p))) -- for p in inc_dirs.split("\n")] -+ default_inc_directories = [ -+ escape_string(repository_ctx.path(_cxx_inc_convert(p))) -+ for p in inc_dirs.split("\n") -+ ] - -+ env = repository_ctx.os.environ -+ if "SPACK_INCLUDE_DIRS" in env: -+ for path in env["SPACK_INCLUDE_DIRS"].split(":"): -+ default_inc_directories.append( -+ repository_ctx.path(_cxx_inc_convert(path)) -+ ) -+ -+ return default_inc_directories - - def _add_option_if_supported(repository_ctx, cc, option): - """Checks that `option` is supported by the C compiler. Doesn't %-escape the option.""" diff --git a/packages/bazel/unix_cc_configure-3.0.patch b/packages/bazel/unix_cc_configure-3.0.patch deleted file mode 100644 index 1140b0c306c5ef89519d5b82767e18c34a5119f7..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure-3.0.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl -index 5feb10b76a..cde0b8f8f1 100644 ---- a/tools/cpp/unix_cc_configure.bzl -+++ b/tools/cpp/unix_cc_configure.bzl -@@ -151,8 +151,14 @@ def get_escaped_cxx_inc_directories(repository_ctx, cc, lang_flag, additional_fl - ).stdout.strip() + "/share" - inc_directories.append(_prepare_include_path(repository_ctx, resource_dir)) - -+ env = repository_ctx.os.environ -+ if "SPACK_INCLUDE_DIRS" in env: -+ for path in env["SPACK_INCLUDE_DIRS"].split(":"): -+ inc_directories.append(path) -+ - return inc_directories - -+ - def _is_compiler_option_supported(repository_ctx, cc, option): - """Checks that `option` is supported by the C compiler. Doesn't %-escape the option.""" - result = repository_ctx.execute([ diff --git a/packages/bazel/unix_cc_configure_fj-0.29.1.patch b/packages/bazel/unix_cc_configure_fj-0.29.1.patch deleted file mode 100644 index 376aeee2f20e04562d1f13a2c86e9af7d05f034b..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure_fj-0.29.1.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl ---- a/tools/cpp/unix_cc_configure.bzl 1980-01-01 00:00:00.000000000 -0800 -+++ b/tools/cpp/unix_cc_configure.bzl 2022-06-30 23:53:17.000000000 -0700 -@@ -379,7 +379,7 @@ - "", - False, - ), ":") -- gold_linker_path = _find_gold_linker_path(repository_ctx, cc) -+ gold_linker_path = None - cc_path = repository_ctx.path(cc) - if not str(cc_path).startswith(str(repository_ctx.path(".")) + "/"): - # cc is outside the repository, set -B -@@ -468,7 +468,6 @@ - # Security hardening requires optimization. - # We need to undef it as some distributions now have it enabled by default. - "-U_FORTIFY_SOURCE", -- "-fstack-protector", - # All warnings are enabled. Maybe enable -Werror as well? - "-Wall", - # Enable a few more warnings that aren't part of -Wall. diff --git a/packages/bazel/unix_cc_configure_fj-5.0.patch b/packages/bazel/unix_cc_configure_fj-5.0.patch deleted file mode 100644 index 5f1304b7247904f64b41968b198bc62af63bdea7..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure_fj-5.0.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Naur a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl ---- a/tools/cpp/unix_cc_configure.bzl 1980-01-01 00:00:00.000000000 -0800 -+++ b/tools/cpp/unix_cc_configure.bzl 2022-06-30 23:35:14.000000000 -0700 -@@ -417,10 +417,7 @@ - bazel_linklibs, - False, - ), ":") -- gold_or_lld_linker_path = ( -- _find_linker_path(repository_ctx, cc, "lld", is_clang) or -- _find_linker_path(repository_ctx, cc, "gold", is_clang) -- ) -+ gold_or_lld_linker_path = None - cc_path = repository_ctx.path(cc) - if not str(cc_path).startswith(str(repository_ctx.path(".")) + "/"): - # cc is outside the repository, set -B -@@ -531,7 +528,6 @@ - # Security hardening requires optimization. - # We need to undef it as some distributions now have it enabled by default. - "-U_FORTIFY_SOURCE", -- "-fstack-protector", - # All warnings are enabled. Maybe enable -Werror as well? - "-Wall", - # Enable a few more warnings that aren't part of -Wall. diff --git a/packages/bazel/unix_cc_configure_fj-5.2.patch b/packages/bazel/unix_cc_configure_fj-5.2.patch deleted file mode 100644 index f7ad3e30815341d95f305e2dfa2a8b4fdbd9dbde..0000000000000000000000000000000000000000 --- a/packages/bazel/unix_cc_configure_fj-5.2.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Naur a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl ---- a/tools/cpp/unix_cc_configure.bzl 1980-01-01 00:00:00.000000000 -0800 -+++ b/tools/cpp/unix_cc_configure.bzl 2022-06-30 23:58:26.945067883 -0700 -@@ -419,10 +419,7 @@ - bazel_linklibs, - False, - ), ":") -- gold_or_lld_linker_path = ( -- _find_linker_path(repository_ctx, cc, "lld", is_clang) or -- _find_linker_path(repository_ctx, cc, "gold", is_clang) -- ) -+ gold_or_lld_linker_path = None - cc_path = repository_ctx.path(cc) - if not str(cc_path).startswith(str(repository_ctx.path(".")) + "/"): - # cc is outside the repository, set -B -@@ -530,7 +527,6 @@ - "%{cxx_builtin_include_directories}": get_starlark_list(builtin_include_directories), - "%{compile_flags}": get_starlark_list( - [ -- "-fstack-protector", - # All warnings are enabled. Maybe enable -Werror as well? - "-Wall", - # Enable a few more warnings that aren't part of -Wall. diff --git a/packages/py-deap/package.py b/packages/py-deap/package.py deleted file mode 100644 index afafdcf7407bd2a2bf63c4a878a7e0d06638af2b..0000000000000000000000000000000000000000 --- a/packages/py-deap/package.py +++ /dev/null @@ -1,23 +0,0 @@ -# this package was backported from the spack develop upstream to support newer setuptools - -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyDeap(PythonPackage): - """Distributed Evolutionary Algorithms in Python.""" - - homepage = "https://deap.readthedocs.org/" - pypi = "deap/deap-1.3.1.tar.gz" - - version("1.3.3", sha256="8772f1b0fff042d5e516b0aebac2c706243045aa7d0de8e0b8658f380181cf31") - version("1.3.1", sha256="11f54493ceb54aae10dde676577ef59fc52d52f82729d5a12c90b0813c857a2f") - - depends_on("py-setuptools", type="build") - # uses 2to3 - depends_on("py-setuptools@:57", type="build", when="@1.3.1") - depends_on("py-numpy", type=("build", "run")) diff --git a/packages/py-etils/package.py b/packages/py-etils/package.py deleted file mode 100644 index 6fd0d1887ffbea0b3bf8ee690cf30a194e1b4d27..0000000000000000000000000000000000000000 --- a/packages/py-etils/package.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyEtils(PythonPackage): - """etils (eclectic utils) is an open-source collection of utils - for python.""" - - homepage = "https://github.com/google/etils" - pypi = "etils/etils-0.9.0.tar.gz" - - version("0.9.0", sha256="489103e9e499a566765c60458ee15d185cf0065f2060a4d16a68f8f46962ed0d") - - variant("epath", default=False, description="with epath module") - - depends_on("python@3.7:", type=("build", "run")) - - depends_on("py-importlib-resources", type=("build", "run"), when="+epath") - depends_on("py-typing-extensions", type=("build", "run"), when="+epath") - depends_on("py-zipp", type=("build", "run"), when="+epath") - - depends_on("py-flit-core@3.5:3", type="build") diff --git a/packages/py-ipyparallel/package.py b/packages/py-ipyparallel/package.py deleted file mode 100644 index 84537a0cd96ebf43b2fe0158920982890a9f6dcb..0000000000000000000000000000000000000000 --- a/packages/py-ipyparallel/package.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyIpyparallel(PythonPackage): - """IPython's architecture for parallel and distributed computing.""" - - homepage = "https://github.com/ipython/ipyparallel" - pypi = "ipyparallel/ipyparallel-7.1.0.tar.gz" - - version("8.4.1", sha256="670bbe05755381742e1ea01177dc428ff8f3e94af1f0d5642c9d19f37ca8289b") - version("8.0.0", sha256="95305a886f2c42e9603c034ea684e5c031d9d4222c66ed6d85eb3ae15d631e4b") - version("7.1.0", sha256="ea756df0d2485bac19cccb0dbf4cafbc855c922b9b5905b4906e6cfac8b3c648") - version("6.3.0", sha256="0a97b276c62db633e9e97a816282bdd166f9df74e28204f0c8fa54b71944cfdc") - version("6.2.5", sha256="33416179665f9c2f567011ab1a618232bc32c0845c0a3a5c388f6c71048bc053") - version("6.2.4", sha256="76c7b028962b0ba762e4e45b450ee3a4353e7221526a8af812e817d7ef6ac065") - - depends_on("python@3.6:", type=("build", "run"), when="@7.1:") - depends_on("python@3.5:", type=("build", "run"), when="@6.3:") - depends_on("python@2.7,3.4:", type=("build", "run")) - - depends_on("py-jupyterlab@3.0:3", type="build", when="@7.1:") - depends_on("py-packaging", type="build", when="@7.1:8.0.0") - depends_on("py-setuptools@40.8:", type="build", when="@7.1:8.2") - depends_on("py-setuptools@:60", type="build", when="@:8.2.0") - depends_on("py-hatchling@0.25:", type="build", when="@8.4:") - - depends_on("py-ipython-genutils", type=("build", "run"), when="@:6.3") - depends_on("py-entrypoints", type=("build", "run"), when="@7.1:") - depends_on("py-decorator", type=("build", "run")) - depends_on("py-pyzmq@18:", type=("build", "run"), when="@7.1:") - depends_on("py-pyzmq@13:", type=("build", "run")) - depends_on("py-traitlets@4.3:", type=("build", "run")) - depends_on("py-ipython@4:", type=("build", "run")) - depends_on("py-jupyter-client", type=("build", "run")) - depends_on("py-ipykernel@4.4:", type=("build", "run")) - depends_on("py-tornado@5.1:", type=("build", "run"), when="@7.1:") - depends_on("py-tornado@4:", type=("build", "run")) - depends_on("py-psutil", type=("build", "run"), when="@7.1:") - depends_on("py-python-dateutil@2.1:", type=("build", "run")) - depends_on("py-tqdm", type=("build", "run"), when="@7.1:") \ No newline at end of file diff --git a/packages/py-jax/package.py b/packages/py-jax/package.py deleted file mode 100644 index 279e4a00f7e309232d012c33a8a5d3dc9325360d..0000000000000000000000000000000000000000 --- a/packages/py-jax/package.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - - -from spack.package import * - - -class PyJax(PythonPackage): - """JAX is Autograd and XLA, brought together for high-performance - machine learning research. With its updated version of Autograd, - JAX can automatically differentiate native Python and NumPy - functions. It can differentiate through loops, branches, - recursion, and closures, and it can take derivatives of - derivatives of derivatives. It supports reverse-mode - differentiation (a.k.a. backpropagation) via grad as well as - forward-mode differentiation, and the two can be composed - arbitrarily to any order.""" - - homepage = "https://github.com/google/jax" - pypi = "jax/jax-0.2.25.tar.gz" - - version("0.4.3", sha256="d43f08f940aa30eb339965cfb3d6bee2296537b0dc2f0c65ccae3009279529ae") - version("0.3.23", sha256="bff436e15552a82c0ebdef32737043b799e1e10124423c57a6ae6118c3a7b6cd") - version("0.2.25", sha256="822e8d1e06257eaa0fdc4c0a0686c4556e9f33647fa2a766755f984786ae7446") - - depends_on("python@3.8:", when="@0.4:", type=("build", "run")) - depends_on("py-setuptools", type="build") - depends_on("py-numpy@1.20:", when="@0.3:", type=("build", "run")) - depends_on("py-numpy@1.18:", type=("build", "run")) - depends_on("py-opt-einsum", type=("build", "run")) - depends_on("py-scipy@1.5:", when="@0.3:", type=("build", "run")) - depends_on("py-scipy@1.2.1:", type=("build", "run")) - - # See _minimum_jaxlib_version in jax/version.py - jax_to_jaxlib = { - "0.4.3": "0.4.2", - "0.3.23": "0.3.15", - "0.2.25": "0.1.69", - } - - for jax, jaxlib in jax_to_jaxlib.items(): - depends_on(f"py-jaxlib@{jaxlib}:", when=f"@{jax}", type=("build", "run")) - - # Historical dependencies - depends_on("py-absl-py", when="@:0.3", type=("build", "run")) - depends_on("py-typing-extensions", when="@:0.3", type=("build", "run")) - depends_on("py-etils+epath", when="@0.3", type=("build", "run")) diff --git a/packages/py-jaxlib/package.py b/packages/py-jaxlib/package.py deleted file mode 100644 index 7d0c8b99dae31a7a0ac4343fbbc073d41f824f7d..0000000000000000000000000000000000000000 --- a/packages/py-jaxlib/package.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import tempfile - -from spack.package import * - - -class PyJaxlib(PythonPackage, CudaPackage): - """XLA library for Jax""" - - homepage = "https://github.com/google/jax" - url = "https://github.com/google/jax/archive/refs/tags/jaxlib-v0.1.74.tar.gz" - - tmp_path = "" - buildtmp = "" - - version("0.4.3", sha256="2104735dc22be2b105e5517bd5bc6ae97f40e8e9e54928cac1585c6112a3d910") - version("0.3.22", sha256="680a6f5265ba26d5515617a95ae47244005366f879a5c321782fde60f34e6d0d") - version("0.1.74", sha256="bbc78c7a4927012dcb1b7cd135c7521f782d7dad516a2401b56d3190f81afe35") - - variant("cuda", default=True, description="Build with CUDA") - - # jaxlib/setup.py - depends_on("python@3.8:", when="@0.4:", type=("build", "run")) - depends_on("py-setuptools", type="build") - depends_on("py-numpy@1.20:", when="@0.3:", type=("build", "run")) - depends_on("py-numpy@1.18:", type=("build", "run")) - depends_on("py-scipy@1.5:", type=("build", "run")) - - # .bazelversion - depends_on("bazel@5.1.1:5.9", when="@0.3:", type="build") - # https://github.com/google/jax/issues/8440 - depends_on("bazel@4.1:4", when="@0.1", type="build") - - # README.md - depends_on("cuda@11.4:", when="@0.4:+cuda") - depends_on("cuda@11.1:", when="@0.3+cuda") - # https://github.com/google/jax/issues/12614 - depends_on("cuda@11.1:11.7.0", when="@0.1+cuda") - depends_on("cudnn@8.2:", when="@0.4:+cuda") - depends_on("cudnn@8.0.5:", when="+cuda") - - # Historical dependencies - depends_on("py-absl-py", when="@:0.3", type=("build", "run")) - depends_on("py-flatbuffers@1.12:2", when="@0.1", type=("build", "run")) - - def patch(self): - self.tmp_path = tempfile.mkdtemp(prefix="spack") - self.buildtmp = tempfile.mkdtemp(prefix="spack") - filter_file( - 'f"--output_path={output_path}",', - 'f"--output_path={output_path}",' - f' "--sources_path={self.tmp_path}",' - ' "--nohome_rc",' - ' "--nosystem_rc",' - f' "--jobs={make_jobs}",', - "build/build.py", - string=True, - ) - filter_file( - "args = parser.parse_args()", - "args, junk = parser.parse_known_args()", - "build/build_wheel.py", - string=True, - ) - - def install(self, spec, prefix): - args = [] - args.append("build/build.py") - if "+cuda" in spec: - args.append("--enable_cuda") - args.append("--cuda_path={0}".format(self.spec["cuda"].prefix)) - args.append("--cudnn_path={0}".format(self.spec["cudnn"].prefix)) - capabilities = ",".join( - "{0:.1f}".format(float(i) / 10.0) for i in spec.variants["cuda_arch"].value - ) - args.append("--cuda_compute_capabilities={0}".format(capabilities)) - args.append( - "--bazel_startup_options=" - "--output_user_root={0}".format(self.wrapped_package_object.buildtmp) - ) - python(*args) - with working_dir(self.wrapped_package_object.tmp_path): - args = std_pip_args + ["--prefix=" + self.prefix, "."] - pip(*args) - remove_linked_tree(self.wrapped_package_object.tmp_path) - remove_linked_tree(self.wrapped_package_object.buildtmp) diff --git a/packages/py-nilearn/package.py b/packages/py-nilearn/package.py deleted file mode 100644 index 0bbc024662fcfedad0ff31f4a38063cde22aecb6..0000000000000000000000000000000000000000 --- a/packages/py-nilearn/package.py +++ /dev/null @@ -1,90 +0,0 @@ -# this package was added from spack develop: -# https://github.com/spack/spack/blob/c10b84f08d1febce6d1f64a5f8b9cbff73e461d9/var/spack/repos/builtin/packages/py-nilearn/package.py -# to fix a typo in 0.19.2 version (https://github.com/spack/spack/pull/34284) - -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyNilearn(PythonPackage): - """Statistical learning for neuroimaging in Python.""" - - homepage = "https://nilearn.github.io/" - pypi = "nilearn/nilearn-0.7.1.tar.gz" - git = "https://github.com/nilearn/nilearn" - - version("0.10.0", sha256="cc7f1068e038076527ead1bd363436f88f5e8d21e8bb57b323b30b926fc7553a") - version("0.9.2", sha256="8da8d3835d92cd7b8a6cc92455a489d7e7f5994cf64fc71bce653e362773b9e4") - version("0.9.0", sha256="f9c8e30adef51489910aec7724b5699de178427d3ae63873dad9b23dd321fe76") - version("0.8.1", sha256="a0489940855130f35bbc4cac0750479a6f82025215ea7b1d778faca064219298") - version("0.8.0", sha256="f2d3dc81005f829f3a183efa6c90d698ea6818c06264d2e3f03e805c4340febb") - version("0.7.1", sha256="8b1409a5e1f0f6d1a1f02555c2f11115a2364f45f1e57bcb5fb3c9ea11f346fa") - version("0.6.2", sha256="cfc6cfda59a6f4247189f8ccf92e364de450460a15c0ec21bdb857c420dd198c") - version("0.4.2", sha256="5049363eb6da2e7c35589477dfc79bf69929ca66de2d7ed2e9dc07acf78636f4") - - depends_on("python@3.7:", when="@0.10:", type=("build", "run")) - depends_on("python@3.6:", when="@0.8:", type=("build", "run")) - depends_on("python@3.5:", when="@0.6:", type=("build", "run")) - depends_on("python@2.7:", type=("build", "run")) - depends_on("py-setuptools", type="build") - - variant("plotting", default=False, description="Enable plotting functionalities") - - depends_on("py-joblib@1:", when="@0.10:", type=("build", "run")) - depends_on("py-joblib@0.15:", when="@0.9.1:", type=("build", "run")) - depends_on("py-joblib@0.12:", when="@0.7:", type=("build", "run")) - depends_on("py-joblib@0.11:", when="@0.6:", type=("build", "run")) - depends_on("py-lxml", when="@0.9.1:", type=("build", "run")) - depends_on("py-nibabel@3.2:", when="@0.10:", type=("build", "run")) - depends_on("py-nibabel@3:", when="@0.9.1:", type=("build", "run")) - depends_on("py-nibabel@2.5:", when="@0.8:", type=("build", "run")) - depends_on("py-nibabel@2.0.2:", type=("build", "run")) - depends_on("py-numpy@1.19:", when="@0.10:", type=("build", "run")) - depends_on("py-numpy@1.18:", when="@0.9.1:", type=("build", "run")) - depends_on("py-numpy@1.16:", when="@0.8:", type=("build", "run")) - depends_on("py-numpy@1.11:", when="@0.5:", type=("build", "run")) - depends_on("py-numpy@1.6.1:", type=("build", "run")) - depends_on("py-pandas@1.1.5:", when="@0.10:", type=("build", "run")) - depends_on("py-pandas@1:", when="@0.9.1:", type=("build", "run")) - depends_on("py-pandas@0.24.0:", when="@0.8:", type=("build", "run")) - depends_on("py-pandas@0.18.0:", when="@0.7:", type=("build", "run")) - depends_on("py-requests@2.25:", when="@0.10:", type=("build", "run")) - depends_on("py-requests@2:", when="@0.7:", type=("build", "run")) - depends_on("py-scikit-learn@1:", when="@0.10:", type=("build", "run")) - depends_on("py-scikit-learn@0.22:", when="@0.9.1:", type=("build", "run")) - depends_on("py-scikit-learn@0.21:", when="@0.8:", type=("build", "run")) - depends_on("py-scikit-learn@0.19:", when="@0.7:", type=("build", "run")) - # sklearn.linear_model.base was deprecated in py-scikit.learn@0.24 - depends_on("py-scikit-learn@0.19:0.23", when="@0.6.0:0.6", type=("build", "run")) - # older py-nilearn versions use import sklearn.external.joblib which was - # deprecated in py-scikit-learn@0.23: - depends_on("py-scikit-learn@0.15:0.22", when="@:0.5", type=("build", "run")) - depends_on("py-scipy@1.6:", when="@0.10:", type=("build", "run")) - depends_on("py-scipy@1.5:", when="@0.9.1:", type=("build", "run")) - depends_on("py-scipy@1.2:", when="@0.8:", type=("build", "run")) - depends_on("py-scipy@0.19:", when="@0.6:", type=("build", "run")) - depends_on("py-scipy@0.17:", when="@0.5:", type=("build", "run")) - depends_on("py-scipy@0.14:", type=("build", "run")) - - depends_on("py-matplotlib@3.3:", when="@0.10: +plotting", type=("build", "run")) - depends_on("py-matplotlib@3:", when="@0.9.1: +plotting", type=("build", "run")) - depends_on("py-matplotlib@2:", when="@0.6: +plotting", type=("build", "run")) - # older py-nilearn versions use matplotlib.cm.revcmap which was deprecated - # in py-matplotlib@3.4: - depends_on("py-matplotlib@1.5.1:3.3", when="@:0.5 +plotting", type=("build", "run")) - depends_on("py-matplotlib@1.1.1:3.3", when="@0.4.2 +plotting", type=("build", "run")) - - @property - def skip_modules(self): - modules = [] - - if self.spec.satisfies("~plotting"): - modules.append("nilearn.plotting") - if self.spec.satisfies("@0.7:"): - modules.append("nilearn.reporting") - - return modules diff --git a/packages/py-nptyping/package.py b/packages/py-nptyping/package.py deleted file mode 100644 index f59291190d8090bf90875ad76a18fcc44a0f9358..0000000000000000000000000000000000000000 --- a/packages/py-nptyping/package.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyNptyping(PythonPackage): - """Type hints for numpy""" - - homepage = "https://github.com/ramonhagenaars/nptyping" - url = "https://github.com/ramonhagenaars/nptyping/archive/v2.4.1.tar.gz" - # avoid pypi for now: https://github.com/ramonhagenaars/nptyping/issues/98 - - version("2.4.1", sha256="1c1b2b08220d271f3e52dbf2bd9190e4dd15b3c04abfcf7a04ec533d3cc9fdab") - version("1.4.1", sha256="bbcedb967f8be1302dffdd999eb531b99712c6914078294b4411758d5899b3b6") - version("1.0.1", sha256="a00e672bfdaddc99aa6b25dd1ae89d7d58d2b76e8ad099bd69577bac2598589f") - - depends_on("py-setuptools", type="build") - depends_on("py-typish@1.7.0:", type=("build", "run")) - depends_on("py-numpy@1.21.5", when="^python@:3.7", type=("build", "run")) - depends_on("py-numpy@1.20.0:1", when="^python@3.8:", type=("build", "run")) - depends_on("py-typing-extensions@4.0.0:4", when="^python@:3.9", type=("build", "run")) diff --git a/packages/py-numpy/add_fj_compiler.patch b/packages/py-numpy/add_fj_compiler.patch deleted file mode 100644 index 50df963581ff5bd876ea1e1d40d37fad2ff74f77..0000000000000000000000000000000000000000 --- a/packages/py-numpy/add_fj_compiler.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -urN numpy-1.19.4.org/numpy/distutils/fcompiler/fujitsu.py numpy-1.19.4/numpy/distutils/fcompiler/fujitsu.py ---- numpy-1.19.4.org/numpy/distutils/fcompiler/fujitsu.py 1970-01-01 09:00:00.000000000 +0900 -+++ numpy-1.19.4/numpy/distutils/fcompiler/fujitsu.py 2020-11-10 17:21:43.324928283 +0900 -@@ -0,0 +1,40 @@ -+from numpy.distutils.fcompiler import FCompiler -+ -+compilers = ['FujitsuFCompiler'] -+ -+class FujitsuFCompiler(FCompiler): -+ compiler_type = 'fujitsu' -+ description = 'Fujitsu Fortran Compiler' -+ -+ possible_executables = ['frt'] -+ version_pattern = r'frt \(FRT\) (?P<version>[a-z\d.]+)' -+ # $ frt --version -+ # frt (FRT) x.x.x yyyymmdd -+ -+ executables = { -+ 'version_cmd' : ["<F77>", "--version"], -+ 'compiler_f77' : ["frt", "-Fixed"], -+ 'compiler_fix' : ["frt", "-Fixed"], -+ 'compiler_f90' : ["frt"], -+ 'linker_so' : ["frt", "-shared"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : ["ranlib"] -+ } -+ pic_flags = ['-KPIC'] -+ module_dir_switch = '-M' -+ module_include_switch = '-I' -+ -+ def get_flags_opt(self): -+ return ['-O3'] -+ def get_flags_debug(self): -+ return ['-g'] -+ def runtime_library_dir_option(self, dir): -+ return f'-Wl,-rpath={dir}' -+ def get_libraries(self): -+ return ['fj90f', 'fj90i', 'fjsrcinfo'] -+ -+if __name__ == '__main__': -+ from distutils import log -+ from numpy.distutils import customized_fcompiler -+ log.set_verbosity(2) -+ print(customized_fcompiler('fujitsu').get_version()) -diff -urN numpy-1.19.4.org/numpy/distutils/fcompiler/__init__.py numpy-1.19.4/numpy/distutils/fcompiler/__init__.py ---- numpy-1.19.4.org/numpy/distutils/fcompiler/__init__.py 2020-11-09 10:51:35.693490207 +0900 -+++ numpy-1.19.4/numpy/distutils/fcompiler/__init__.py 2020-11-16 17:48:49.316744476 +0900 -@@ -746,7 +746,7 @@ - 'intelvem', 'intelem', 'flang')), - ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')), - ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'nv', 'absoft', 'nag', 'vast', 'compaq', -- 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor')), -+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fujitsu')), - ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')), - ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')), - ('irix.*', ('mips', 'gnu', 'gnu95',)), diff --git a/packages/py-numpy/add_fj_compiler2.patch b/packages/py-numpy/add_fj_compiler2.patch deleted file mode 100644 index 4526ddeadb06468c1ae212953fa20ef681ea49fa..0000000000000000000000000000000000000000 --- a/packages/py-numpy/add_fj_compiler2.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -urN spack-src.org/numpy/distutils/fcompiler/fujitsu.py spack-src/numpy/distutils/fcompiler/fujitsu.py ---- spack-src.org/numpy/distutils/fcompiler/fujitsu.py 1970-01-01 09:00:00.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/fujitsu.py 2020-11-16 17:55:57.608802456 +0900 -@@ -0,0 +1,40 @@ -+from numpy.distutils.fcompiler import FCompiler -+ -+compilers = ['FujitsuFCompiler'] -+ -+class FujitsuFCompiler(FCompiler): -+ compiler_type = 'fujitsu' -+ description = 'Fujitsu Fortran Compiler' -+ -+ possible_executables = ['frt'] -+ version_pattern = r'frt \(FRT\) (?P<version>[a-z\d.]+)' -+ # $ frt --version -+ # frt (FRT) x.x.x yyyymmdd -+ -+ executables = { -+ 'version_cmd' : ["<F77>", "--version"], -+ 'compiler_f77' : ["frt", "-Fixed"], -+ 'compiler_fix' : ["frt", "-Fixed"], -+ 'compiler_f90' : ["frt"], -+ 'linker_so' : ["frt", "-shared"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : ["ranlib"] -+ } -+ pic_flags = ['-KPIC'] -+ module_dir_switch = '-M' -+ module_include_switch = '-I' -+ -+ def get_flags_opt(self): -+ return ['-O3'] -+ def get_flags_debug(self): -+ return ['-g'] -+ def runtime_library_dir_option(self, dir): -+ return f'-Wl,-rpath={dir}' -+ def get_libraries(self): -+ return ['fj90f', 'fj90i', 'fjsrcinfo'] -+ -+if __name__ == '__main__': -+ from distutils import log -+ from numpy.distutils import customized_fcompiler -+ log.set_verbosity(2) -+ print(customized_fcompiler('fujitsu').get_version()) -diff -urN spack-src.org/numpy/distutils/fcompiler/__init__.py spack-src/numpy/distutils/fcompiler/__init__.py ---- spack-src.org/numpy/distutils/fcompiler/__init__.py 2020-11-16 17:55:31.638677631 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2020-11-16 17:56:29.978957954 +0900 -@@ -746,7 +746,7 @@ - 'intelvem', 'intelem', 'flang')), - ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')), - ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', -- 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor')), -+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fujitsu')), - ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')), - ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')), - ('irix.*', ('mips', 'gnu', 'gnu95',)), diff --git a/packages/py-numpy/add_fj_compiler3.patch b/packages/py-numpy/add_fj_compiler3.patch deleted file mode 100644 index 034cac069b8625a60994bdadaecb6203105f0fbc..0000000000000000000000000000000000000000 --- a/packages/py-numpy/add_fj_compiler3.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -urN spack-src.org/numpy/distutils/fcompiler/fujitsu.py spack-src/numpy/distutils/fcompiler/fujitsu.py ---- spack-src.org/numpy/distutils/fcompiler/fujitsu.py 1970-01-01 09:00:00.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/fujitsu.py 2020-11-16 18:30:06.698641953 +0900 -@@ -0,0 +1,40 @@ -+from numpy.distutils.fcompiler import FCompiler -+ -+compilers = ['FujitsuFCompiler'] -+ -+class FujitsuFCompiler(FCompiler): -+ compiler_type = 'fujitsu' -+ description = 'Fujitsu Fortran Compiler' -+ -+ possible_executables = ['frt'] -+ version_pattern = r'frt \(FRT\) (?P<version>[a-z\d.]+)' -+ # $ frt --version -+ # frt (FRT) x.x.x yyyymmdd -+ -+ executables = { -+ 'version_cmd' : ["<F77>", "--version"], -+ 'compiler_f77' : ["frt", "-Fixed"], -+ 'compiler_fix' : ["frt", "-Fixed"], -+ 'compiler_f90' : ["frt"], -+ 'linker_so' : ["frt", "-shared"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : ["ranlib"] -+ } -+ pic_flags = ['-KPIC'] -+ module_dir_switch = '-M' -+ module_include_switch = '-I' -+ -+ def get_flags_opt(self): -+ return ['-O3'] -+ def get_flags_debug(self): -+ return ['-g'] -+ def runtime_library_dir_option(self, dir): -+ return '-Wl,-rpath=%s' %dir -+ def get_libraries(self): -+ return ['fj90f', 'fj90i', 'fjsrcinfo'] -+ -+if __name__ == '__main__': -+ from distutils import log -+ from numpy.distutils import customized_fcompiler -+ log.set_verbosity(2) -+ print(customized_fcompiler('fujitsu').get_version()) -diff -urN spack-src.org/numpy/distutils/fcompiler/__init__.py spack-src/numpy/distutils/fcompiler/__init__.py ---- spack-src.org/numpy/distutils/fcompiler/__init__.py 2020-11-16 18:25:26.087294181 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2020-11-16 18:26:19.987553070 +0900 -@@ -750,7 +750,7 @@ - 'intelvem', 'intelem', 'flang')), - ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')), - ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', -- 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor')), -+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fujitsu')), - ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')), - ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')), - ('irix.*', ('mips', 'gnu', 'gnu95',)), diff --git a/packages/py-numpy/add_fj_compiler4.patch b/packages/py-numpy/add_fj_compiler4.patch deleted file mode 100644 index 83f2be5d822ba06f70cf3db2e00372a9eef9da28..0000000000000000000000000000000000000000 --- a/packages/py-numpy/add_fj_compiler4.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -urN spack-src.org/numpy/distutils/fcompiler/fujitsu.py spack-src/numpy/distutils/fcompiler/fujitsu.py ---- spack-src.org/numpy/distutils/fcompiler/fujitsu.py 1970-01-01 09:00:00.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/fujitsu.py 2020-11-16 18:42:47.672297372 +0900 -@@ -0,0 +1,40 @@ -+from numpy.distutils.fcompiler import FCompiler -+ -+compilers = ['FujitsuFCompiler'] -+ -+class FujitsuFCompiler(FCompiler): -+ compiler_type = 'fujitsu' -+ description = 'Fujitsu Fortran Compiler' -+ -+ possible_executables = ['frt'] -+ version_pattern = r'frt \(FRT\) (?P<version>[a-z\d.]+)' -+ # $ frt --version -+ # frt (FRT) x.x.x yyyymmdd -+ -+ executables = { -+ 'version_cmd' : ["<F77>", "--version"], -+ 'compiler_f77' : ["frt", "-Fixed"], -+ 'compiler_fix' : ["frt", "-Fixed"], -+ 'compiler_f90' : ["frt"], -+ 'linker_so' : ["frt", "-shared"], -+ 'archiver' : ["ar", "-cr"], -+ 'ranlib' : ["ranlib"] -+ } -+ pic_flags = ['-KPIC'] -+ module_dir_switch = '-M' -+ module_include_switch = '-I' -+ -+ def get_flags_opt(self): -+ return ['-O3'] -+ def get_flags_debug(self): -+ return ['-g'] -+ def runtime_library_dir_option(self, dir): -+ return '-Wl,-rpath=%s' %dir -+ def get_libraries(self): -+ return ['fj90f', 'fj90i', 'fjsrcinfo'] -+ -+if __name__ == '__main__': -+ from distutils import log -+ from numpy.distutils import customized_fcompiler -+ log.set_verbosity(2) -+ print(customized_fcompiler('fujitsu').get_version()) -diff -urN spack-src.org/numpy/distutils/fcompiler/__init__.py spack-src/numpy/distutils/fcompiler/__init__.py ---- spack-src.org/numpy/distutils/fcompiler/__init__.py 2020-11-16 18:43:18.112443626 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2020-11-16 18:44:54.062904636 +0900 -@@ -709,7 +709,7 @@ - 'intelvem', 'intelem')), - ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')), - ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', -- 'intele', 'intelem', 'gnu', 'g95', 'pathf95')), -+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'fujitsu')), - ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')), - ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')), - ('irix.*', ('mips', 'gnu', 'gnu95',)), diff --git a/packages/py-numpy/blas-lapack-order.patch b/packages/py-numpy/blas-lapack-order.patch deleted file mode 100644 index ac27d87dcdf81f18742b4ae7084ca78b9b108704..0000000000000000000000000000000000000000 --- a/packages/py-numpy/blas-lapack-order.patch +++ /dev/null @@ -1,347 +0,0 @@ -Allows you to specify order of BLAS/LAPACK preference -https://github.com/numpy/numpy/pull/13132 -diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py -index 806f4f7d3..0480d7b5a 100644 ---- a/numpy/distutils/system_info.py -+++ b/numpy/distutils/system_info.py -@@ -474,6 +474,13 @@ class LapackSrcNotFoundError(LapackNotFoundError): - the LAPACK_SRC environment variable.""" - - -+class BlasOptNotFoundError(NotFoundError): -+ """ -+ Optimized (vendor) Blas libraries are not found. -+ Falls back to netlib Blas library which has worse performance. -+ A better performance should be easily gained by switching -+ Blas library.""" -+ - class BlasNotFoundError(NotFoundError): - """ - Blas (http://www.netlib.org/blas/) libraries not found. -@@ -1541,139 +1548,219 @@ Make sure that -lgfortran is used for C++ extensions. - class lapack_opt_info(system_info): - - notfounderror = LapackNotFoundError -+ # Default order of LAPACK checks -+ lapack_order = ['mkl', 'openblas', 'atlas', 'accelerate', 'lapack'] - -- def calc_info(self): -+ def _calc_info_mkl(self): -+ info = get_info('lapack_mkl') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- lapack_mkl_info = get_info('lapack_mkl') -- if lapack_mkl_info: -- self.set_info(**lapack_mkl_info) -- return -+ def _calc_info_openblas(self): -+ info = get_info('openblas_lapack') -+ if info: -+ self.set_info(**info) -+ return True -+ info = get_info('openblas_clapack') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- openblas_info = get_info('openblas_lapack') -- if openblas_info: -- self.set_info(**openblas_info) -- return -+ def _calc_info_atlas(self): -+ info = get_info('atlas_3_10_threads') -+ if not info: -+ info = get_info('atlas_3_10') -+ if not info: -+ info = get_info('atlas_threads') -+ if not info: -+ info = get_info('atlas') -+ if info: -+ # Figure out if ATLAS has lapack... -+ # If not we need the lapack library, but not BLAS! -+ l = info.get('define_macros', []) -+ if ('ATLAS_WITH_LAPACK_ATLAS', None) in l \ -+ or ('ATLAS_WITHOUT_LAPACK', None) in l: -+ # Get LAPACK (with possible warnings) -+ # If not found we don't accept anything -+ # since we can't use ATLAS with LAPACK! -+ lapack_info = self._get_info_lapack() -+ if not lapack_info: -+ return False -+ dict_append(info, **lapack_info) -+ self.set_info(**info) -+ return True -+ return False - -- openblas_info = get_info('openblas_clapack') -- if openblas_info: -- self.set_info(**openblas_info) -- return -+ def _calc_info_accelerate(self): -+ info = get_info('accelerate') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- atlas_info = get_info('atlas_3_10_threads') -- if not atlas_info: -- atlas_info = get_info('atlas_3_10') -- if not atlas_info: -- atlas_info = get_info('atlas_threads') -- if not atlas_info: -- atlas_info = get_info('atlas') -- -- accelerate_info = get_info('accelerate') -- if accelerate_info and not atlas_info: -- self.set_info(**accelerate_info) -- return -+ def _get_info_blas(self): -+ # Default to get the optimized BLAS implementation -+ info = get_info('blas_opt') -+ if not info: -+ warnings.warn(BlasNotFoundError.__doc__ or '', stacklevel=3) -+ info_src = get_info('blas_src') -+ if not info_src: -+ warnings.warn(BlasSrcNotFoundError.__doc__ or '', stacklevel=3) -+ return {} -+ dict_append(info, libraries=[('fblas_src', info_src)]) -+ return info - -- need_lapack = 0 -- need_blas = 0 -- info = {} -- if atlas_info: -- l = atlas_info.get('define_macros', []) -- if ('ATLAS_WITH_LAPACK_ATLAS', None) in l \ -- or ('ATLAS_WITHOUT_LAPACK', None) in l: -- need_lapack = 1 -- info = atlas_info -+ def _get_info_lapack(self): -+ info = get_info('lapack') -+ if not info: -+ warnings.warn(LapackNotFoundError.__doc__ or '', stacklevel=3) -+ info_src = get_info('lapack_src') -+ if not info_src: -+ warnings.warn(LapackSrcNotFoundError.__doc__ or '', stacklevel=3) -+ return {} -+ dict_append(info, libraries=[('flapack_src', info_src)]) -+ return info - -- else: -- warnings.warn(AtlasNotFoundError.__doc__, stacklevel=2) -- need_blas = 1 -- need_lapack = 1 -+ def _calc_info_lapack(self): -+ info = self._get_info_lapack() -+ if info: -+ info_blas = self._get_info_blas() -+ dict_append(info, **info_blas) - dict_append(info, define_macros=[('NO_ATLAS_INFO', 1)]) -+ self.set_info(**info) -+ return True -+ return False - -- if need_lapack: -- lapack_info = get_info('lapack') -- #lapack_info = {} ## uncomment for testing -- if lapack_info: -- dict_append(info, **lapack_info) -- else: -- warnings.warn(LapackNotFoundError.__doc__, stacklevel=2) -- lapack_src_info = get_info('lapack_src') -- if not lapack_src_info: -- warnings.warn(LapackSrcNotFoundError.__doc__, stacklevel=2) -- return -- dict_append(info, libraries=[('flapack_src', lapack_src_info)]) -- -- if need_blas: -- blas_info = get_info('blas') -- if blas_info: -- dict_append(info, **blas_info) -- else: -- warnings.warn(BlasNotFoundError.__doc__, stacklevel=2) -- blas_src_info = get_info('blas_src') -- if not blas_src_info: -- warnings.warn(BlasSrcNotFoundError.__doc__, stacklevel=2) -- return -- dict_append(info, libraries=[('fblas_src', blas_src_info)]) -+ def calc_info(self): -+ user_order = os.environ.get('NPY_LAPACK_ORDER', None) -+ if user_order is None: -+ lapack_order = self.lapack_order -+ else: -+ # the user has requested the order of the -+ # check they are all in the available list, a COMMA SEPARATED list -+ user_order = user_order.lower().split(',') -+ non_existing = [] -+ lapack_order = [] -+ for order in user_order: -+ if order in self.lapack_order: -+ lapack_order.append(order) -+ elif len(order) > 0: -+ non_existing.append(order) -+ if len(non_existing) > 0: -+ raise ValueError("lapack_opt_info user defined " -+ "LAPACK order has unacceptable " -+ "values: {}".format(non_existing)) -+ -+ for lapack in lapack_order: -+ if getattr(self, '_calc_info_{}'.format(lapack))(): -+ return - -- self.set_info(**info) -- return -+ if 'lapack' not in lapack_order: -+ # Since the user may request *not* to use any library, we still need -+ # to raise warnings to signal missing packages! -+ warnings.warn(LapackNotFoundError.__doc__ or '', stacklevel=2) -+ warnings.warn(LapackSrcNotFoundError.__doc__ or '', stacklevel=2) - - - class blas_opt_info(system_info): - - notfounderror = BlasNotFoundError -+ # Default order of BLAS checks -+ blas_order = ['mkl', 'blis', 'openblas', 'atlas', 'accelerate', 'blas'] - -- def calc_info(self): -+ def _calc_info_mkl(self): -+ info = get_info('blas_mkl') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- blas_mkl_info = get_info('blas_mkl') -- if blas_mkl_info: -- self.set_info(**blas_mkl_info) -- return -+ def _calc_info_blis(self): -+ info = get_info('blis') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- blis_info = get_info('blis') -- if blis_info: -- self.set_info(**blis_info) -- return -+ def _calc_info_openblas(self): -+ info = get_info('openblas') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- openblas_info = get_info('openblas') -- if openblas_info: -- self.set_info(**openblas_info) -- return -+ def _calc_info_atlas(self): -+ info = get_info('atlas_3_10_blas_threads') -+ if not info: -+ info = get_info('atlas_3_10_blas') -+ if not info: -+ info = get_info('atlas_blas_threads') -+ if not info: -+ info = get_info('atlas_blas') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- atlas_info = get_info('atlas_3_10_blas_threads') -- if not atlas_info: -- atlas_info = get_info('atlas_3_10_blas') -- if not atlas_info: -- atlas_info = get_info('atlas_blas_threads') -- if not atlas_info: -- atlas_info = get_info('atlas_blas') -- -- accelerate_info = get_info('accelerate') -- if accelerate_info and not atlas_info: -- self.set_info(**accelerate_info) -- return -+ def _calc_info_accelerate(self): -+ info = get_info('accelerate') -+ if info: -+ self.set_info(**info) -+ return True -+ return False - -- need_blas = 0 -+ def _calc_info_blas(self): -+ # Warn about a non-optimized BLAS library -+ warnings.warn(BlasOptNotFoundError.__doc__ or '', stacklevel=3) - info = {} -- if atlas_info: -- info = atlas_info -+ dict_append(info, define_macros=[('NO_ATLAS_INFO', 1)]) -+ -+ blas = get_info('blas') -+ if blas: -+ dict_append(info, **blas) - else: -- warnings.warn(AtlasNotFoundError.__doc__, stacklevel=2) -- need_blas = 1 -- dict_append(info, define_macros=[('NO_ATLAS_INFO', 1)]) -+ # Not even BLAS was found! -+ warnings.warn(BlasNotFoundError.__doc__ or '', stacklevel=3) - -- if need_blas: -- blas_info = get_info('blas') -- if blas_info: -- dict_append(info, **blas_info) -- else: -- warnings.warn(BlasNotFoundError.__doc__, stacklevel=2) -- blas_src_info = get_info('blas_src') -- if not blas_src_info: -- warnings.warn(BlasSrcNotFoundError.__doc__, stacklevel=2) -- return -- dict_append(info, libraries=[('fblas_src', blas_src_info)]) -+ blas_src = get_info('blas_src') -+ if not blas_src: -+ warnings.warn(BlasSrcNotFoundError.__doc__ or '', stacklevel=3) -+ return False -+ dict_append(info, libraries=[('fblas_src', blas_src)]) - - self.set_info(**info) -- return -+ return True -+ -+ def calc_info(self): -+ user_order = os.environ.get('NPY_BLAS_ORDER', None) -+ if user_order is None: -+ blas_order = self.blas_order -+ else: -+ # the user has requested the order of the -+ # check they are all in the available list -+ user_order = user_order.lower().split(',') -+ non_existing = [] -+ blas_order = [] -+ for order in user_order: -+ if order in self.blas_order: -+ blas_order.append(order) -+ elif len(order) > 0: -+ non_existing.append(order) -+ if len(non_existing) > 0: -+ raise ValueError("blas_opt_info user defined BLAS order has unacceptable values: {}".format(non_existing)) -+ -+ for blas in blas_order: -+ if getattr(self, '_calc_info_{}'.format(blas))(): -+ return -+ -+ if 'blas' not in blas_order: -+ # Since the user may request *not* to use any library, we still need -+ # to raise warnings to signal missing packages! -+ warnings.warn(BlasNotFoundError.__doc__ or '', stacklevel=2) -+ warnings.warn(BlasSrcNotFoundError.__doc__ or '', stacklevel=2) - - - class blas_info(system_info): diff --git a/packages/py-numpy/check_executables.patch b/packages/py-numpy/check_executables.patch deleted file mode 100644 index ee4ac1b45ee1b238ee55929fd40f1c4ab35ff2f9..0000000000000000000000000000000000000000 --- a/packages/py-numpy/check_executables.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- numpy-1.20.0/numpy/distutils/fcompiler/__init__.py.org 2021-02-04 17:38:42.000000000 +0900 -+++ numpy-1.20.0/numpy/distutils/fcompiler/__init__.py 2021-02-04 18:29:21.000000000 +0900 -@@ -314,7 +314,12 @@ - if not exe_from_environ: - possibles = [f90, f77] + self.possible_executables - else: -- possibles = [exe_from_environ] + self.possible_executables -+ matching_executables = [] -+ for e in exe_from_environ: -+ for p in self.possible_executables: -+ if p in e: -+ matching_executables.append(e) -+ possibles = [matching_executables] + self.possible_executables - - seen = set() - unique_possibles = [] diff --git a/packages/py-numpy/check_executables2.patch b/packages/py-numpy/check_executables2.patch deleted file mode 100644 index 0d0b78f647f00627bf18de18c1a041d33bd27150..0000000000000000000000000000000000000000 --- a/packages/py-numpy/check_executables2.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2021-01-04 15:16:38.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 17:20:07.327563118 +0900 -@@ -316,7 +316,12 @@ - if not exe_from_environ: - possibles = [f90, f77] + self.possible_executables - else: -- possibles = [exe_from_environ] + self.possible_executables -+ matching_executables = [] -+ for e in exe_from_environ: -+ for p in self.possible_executables: -+ if p in e: -+ matching_executables.append(e) -+ possibles = [matching_executables] + self.possible_executables - - seen = set() - unique_possibles = [] diff --git a/packages/py-numpy/check_executables3.patch b/packages/py-numpy/check_executables3.patch deleted file mode 100644 index 078211e3379cd19bf2c5bd6f20dfe084427065b4..0000000000000000000000000000000000000000 --- a/packages/py-numpy/check_executables3.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2020-06-02 17:24:58.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 17:33:11.483728471 +0900 -@@ -320,7 +320,12 @@ - if not exe_from_environ: - possibles = [f90, f77] + self.possible_executables - else: -- possibles = [exe_from_environ] + self.possible_executables -+ matching_executables = [] -+ for e in exe_from_environ: -+ for p in self.possible_executables: -+ if p in e: -+ matching_executables.append(e) -+ possibles = [matching_executables] + self.possible_executables - - seen = set() - unique_possibles = [] diff --git a/packages/py-numpy/check_executables4.patch b/packages/py-numpy/check_executables4.patch deleted file mode 100644 index b553acb46f921810a844460fb329c77b827e0696..0000000000000000000000000000000000000000 --- a/packages/py-numpy/check_executables4.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2018-11-03 10:49:58.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 17:57:50.632263931 +0900 -@@ -318,7 +318,12 @@ - if not exe_from_environ: - possibles = [f90, f77] + self.possible_executables - else: -- possibles = [exe_from_environ] + self.possible_executables -+ matching_executables = [] -+ for e in exe_from_environ: -+ for p in self.possible_executables: -+ if p in e: -+ matching_executables.append(e) -+ possibles = [matching_executables] + self.possible_executables - - seen = set() - unique_possibles = [] diff --git a/packages/py-numpy/check_executables5.patch b/packages/py-numpy/check_executables5.patch deleted file mode 100644 index 4ae9fe4009761e91cf138cc088be2887b92d7bf9..0000000000000000000000000000000000000000 --- a/packages/py-numpy/check_executables5.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2017-09-29 13:31:46.000000000 +0900 -+++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 18:06:12.001479417 +0900 -@@ -322,7 +322,12 @@ - if not exe_from_environ: - possibles = [f90, f77] + self.possible_executables - else: -- possibles = [exe_from_environ] + self.possible_executables -+ matching_executables = [] -+ for e in exe_from_environ: -+ for p in self.possible_executables: -+ if p in e: -+ matching_executables.append(e) -+ possibles = [matching_executables] + self.possible_executables - - seen = set() - unique_possibles = [] diff --git a/packages/py-numpy/package.py b/packages/py-numpy/package.py deleted file mode 100644 index 2cabb57311367d3b1c7fb97bb188e90cef3ccb39..0000000000000000000000000000000000000000 --- a/packages/py-numpy/package.py +++ /dev/null @@ -1,384 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import platform -import subprocess - -from spack.package import * - - -class PyNumpy(PythonPackage): - """NumPy is the fundamental package for scientific computing with Python. - It contains among other things: a powerful N-dimensional array object, - sophisticated (broadcasting) functions, tools for integrating C/C++ and - Fortran code, and useful linear algebra, Fourier transform, and random - number capabilities""" - - homepage = "https://numpy.org/" - pypi = "numpy/numpy-1.23.0.tar.gz" - git = "https://github.com/numpy/numpy.git" - - maintainers = ["adamjstewart", "rgommers"] - - version("main", branch="main") - version("1.23.4", sha256="ed2cc92af0efad20198638c69bb0fc2870a58dabfba6eb722c933b48556c686c") - version("1.23.3", sha256="51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd") - version("1.23.2", sha256="b78d00e48261fbbd04aa0d7427cf78d18401ee0abd89c7559bbf422e5b1c7d01") - version("1.23.1", sha256="d748ef349bfef2e1194b59da37ed5a29c19ea8d7e6342019921ba2ba4fd8b624") - version("1.23.0", sha256="bd3fa4fe2e38533d5336e1272fc4e765cabbbde144309ccee8675509d5cd7b05") - version("1.22.4", sha256="425b390e4619f58d8526b3dcf656dde069133ae5c240229821f01b5f44ea07af") - version("1.22.3", sha256="dbc7601a3b7472d559dc7b933b18b4b66f9aa7452c120e87dfb33d02008c8a18") - version("1.22.2", sha256="076aee5a3763d41da6bef9565fdf3cb987606f567cd8b104aded2b38b7b47abf") - version("1.22.1", sha256="e348ccf5bc5235fc405ab19d53bec215bb373300e5523c7b476cc0da8a5e9973") - version("1.22.0", sha256="a955e4128ac36797aaffd49ab44ec74a71c11d6938df83b1285492d277db5397") - version("1.21.6", sha256="ecb55251139706669fdec2ff073c98ef8e9a84473e51e716211b41aa0f18e656") - version("1.21.5", sha256="6a5928bc6241264dce5ed509e66f33676fc97f464e7a919edc672fb5532221ee") - version("1.21.4", sha256="e6c76a87633aa3fa16614b61ccedfae45b91df2767cf097aa9c933932a7ed1e0") - version("1.21.3", sha256="63571bb7897a584ca3249c86dd01c10bcb5fe4296e3568b2e9c1a55356b6410e") - version("1.21.2", sha256="423216d8afc5923b15df86037c6053bf030d15cc9e3224206ef868c2d63dd6dc") - version("1.21.1", sha256="dff4af63638afcc57a3dfb9e4b26d434a7a602d225b42d746ea7fe2edf1342fd") - version("1.21.0", sha256="e80fe25cba41c124d04c662f33f6364909b985f2eb5998aaa5ae4b9587242cce") - version("1.20.3", sha256="e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69") - version("1.20.2", sha256="878922bf5ad7550aa044aa9301d417e2d3ae50f0f577de92051d739ac6096cee") - version("1.20.1", sha256="3bc63486a870294683980d76ec1e3efc786295ae00128f9ea38e2c6e74d5a60a") - version("1.20.0", sha256="3d8233c03f116d068d5365fed4477f2947c7229582dad81e5953088989294cec") - version("1.19.5", sha256="a76f502430dd98d7546e1ea2250a7360c065a5fdea52b2dffe8ae7180909b6f4") - version("1.19.4", sha256="141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512") - version("1.19.3", sha256="35bf5316af8dc7c7db1ad45bec603e5fb28671beb98ebd1d65e8059efcfd3b72") - version("1.19.2", sha256="0d310730e1e793527065ad7dde736197b705d0e4c9999775f212b03c44a8484c") - version("1.19.1", sha256="b8456987b637232602ceb4d663cb34106f7eb780e247d51a260b84760fd8f491") - version("1.19.0", sha256="76766cc80d6128750075378d3bb7812cf146415bd29b588616f72c943c00d598") - version("1.18.5", sha256="34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b") - version("1.18.4", sha256="bbcc85aaf4cd84ba057decaead058f43191cc0e30d6bc5d44fe336dc3d3f4509") - version("1.18.3", sha256="e46e2384209c91996d5ec16744234d1c906ab79a701ce1a26155c9ec890b8dc8") - version("1.18.2", sha256="e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d") - version("1.18.1", sha256="b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77") - version("1.18.0", sha256="a9d72d9abaf65628f0f31bbb573b7d9304e43b1e6bbae43149c17737a42764c4") - version("1.17.5", sha256="16507ba6617f62ae3c6ab1725ae6f550331025d4d9a369b83f6d5a470446c342") - version("1.17.4", sha256="f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316") - version("1.17.3", sha256="a0678793096205a4d784bd99f32803ba8100f639cf3b932dc63b21621390ea7e") - version("1.17.2", sha256="73615d3edc84dd7c4aeb212fa3748fb83217e00d201875a47327f55363cef2df") - version("1.17.1", sha256="f11331530f0eff69a758d62c2461cd98cdc2eae0147279d8fc86e0464eb7e8ca") - version("1.17.0", sha256="951fefe2fb73f84c620bec4e001e80a80ddaa1b84dce244ded7f1e0cbe0ed34a") - version("1.16.6", sha256="e5cf3fdf13401885e8eea8170624ec96225e2174eb0c611c6f26dd33b489e3ff") - version("1.16.5", sha256="8bb452d94e964b312205b0de1238dd7209da452343653ab214b5d681780e7a0c") - version("1.16.4", sha256="7242be12a58fec245ee9734e625964b97cf7e3f2f7d016603f9e56660ce479c7") - version("1.16.3", sha256="78a6f89da87eeb48014ec652a65c4ffde370c036d780a995edaeb121d3625621") - version("1.16.2", sha256="6c692e3879dde0b67a9dc78f9bfb6f61c666b4562fd8619632d7043fb5b691b0") - version("1.16.1", sha256="31d3fe5b673e99d33d70cfee2ea8fe8dccd60f265c3ed990873a88647e3dd288") - version("1.16.0", sha256="cb189bd98b2e7ac02df389b6212846ab20661f4bafe16b5a70a6f1728c1cc7cb") - version("1.15.4", sha256="3d734559db35aa3697dadcea492a423118c5c55d176da2f3be9c98d4803fc2a7") - version("1.15.3", sha256="1c0c80e74759fa4942298044274f2c11b08c86230b25b8b819e55e644f5ff2b6") - version("1.15.2", sha256="27a0d018f608a3fe34ac5e2b876f4c23c47e38295c47dd0775cc294cd2614bc1") - version("1.15.2", sha256="27a0d018f608a3fe34ac5e2b876f4c23c47e38295c47dd0775cc294cd2614bc1") - version("1.15.1", sha256="7b9e37f194f8bcdca8e9e6af92e2cbad79e360542effc2dd6b98d63955d8d8a3") - version("1.15.0", sha256="f28e73cf18d37a413f7d5de35d024e6b98f14566a10d82100f9dc491a7d449f9") - version("1.14.6", sha256="1250edf6f6c43e1d7823f0967416bc18258bb271dc536298eb0ea00a9e45b80a") - version("1.14.5", sha256="a4a433b3a264dbc9aa9c7c241e87c0358a503ea6394f8737df1683c7c9a102ac") - version("1.14.4", sha256="2185a0f31ecaa0792264fa968c8e0ba6d96acf144b26e2e1d1cd5b77fc11a691") - version("1.14.3", sha256="9016692c7d390f9d378fc88b7a799dc9caa7eb938163dda5276d3f3d6f75debf") - version("1.14.2", sha256="facc6f925c3099ac01a1f03758100772560a0b020fb9d70f210404be08006bcb") - version("1.14.1", sha256="fa0944650d5d3fb95869eaacd8eedbd2d83610c85e271bd9d3495ffa9bc4dc9c") - version("1.14.0", sha256="3de643935b212307b420248018323a44ec51987a336d1d747c1322afc3c099fb") - version("1.13.3", sha256="36ee86d5adbabc4fa2643a073f93d5504bdfed37a149a3a49f4dde259f35a750") - version("1.13.1", sha256="c9b0283776085cb2804efff73e9955ca279ba4edafd58d3ead70b61d209c4fbb") - version("1.13.0", sha256="dcff367b725586830ff0e20b805c7654c876c2d4585c0834a6049502b9d6cf7e") - version("1.12.1", sha256="a65266a4ad6ec8936a1bc85ce51f8600634a31a258b722c9274a80ff189d9542") - version("1.12.0", sha256="ff320ecfe41c6581c8981dce892fe6d7e69806459a899e294e4bf8229737b154") - version("1.11.3", sha256="2e0fc5248246a64628656fe14fcab0a959741a2820e003bd15538226501b82f7") - version("1.11.2", sha256="c1ed4d1d2a795409c7df1eb4bfee65c0e3326cfc7c57875fa39e5c7414116d9a") - version("1.11.1", sha256="4e9c289b9d764d10353a224a5286dda3e0425b13b112719bdc3e9864ae648d79") - version("1.11.0", sha256="9109f260850627e4b83a3c4bcef4f2f99357eb4a5eaae75dec51c32f3c197aa3") - version("1.10.4", sha256="8ce443dc79656a9fc97a7837f1444d324aef2c9b53f31f83441f57ad1f1f3659") - version("1.9.3", sha256="baa074bb1c7f9c822122fb81459b7caa5fc49267ca94cca69465c8dcfd63ac79") - version("1.9.2", sha256="e37805754f4ebb575c434d134f6bebb8b857d9843c393f6943c7be71ef57311c") - version("1.9.1", sha256="2a545c0d096d86035b12160fcba5e4c0a08dcabbf902b4f867eb64deb31a2b7a") - - variant("blas", default=True, description="Build with BLAS support") - variant("lapack", default=True, description="Build with LAPACK support") - - depends_on("python@2.7:2.8,3.4:3.6", type=("build", "link", "run"), when="@:1.13") - depends_on("python@2.7:2.8,3.4:3.8", type=("build", "link", "run"), when="@1.14:1.15") - depends_on("python@2.7:2.8,3.5:3.9", type=("build", "link", "run"), when="@1.16") - depends_on("python@3.5:3.9", type=("build", "link", "run"), when="@1.17:1.18") - depends_on("python@3.6:3.10", type=("build", "link", "run"), when="@1.19") - depends_on("python@3.7:3.10", type=("build", "link", "run"), when="@1.20:1.21") - depends_on("python@3.8:", type=("build", "link", "run"), when="@1.22:") - # https://github.com/spack/spack/pull/32078 - # https://github.com/spack/spack/pull/34475#discussion_r1046146311 - depends_on("py-setuptools@:63", type=("build", "run")) - depends_on("py-setuptools@:59", when="@:1.22.1", type=("build", "run")) - # Check pyproject.toml for updates to the required cython version - depends_on("py-cython@0.29.13:2", when="@1.18.0:", type="build") - depends_on("py-cython@0.29.14:2", when="@1.18.1:", type="build") - depends_on("py-cython@0.29.21:2", when="@1.19.1:", type="build") - depends_on("py-cython@0.29.24:2", when="@1.21.2:", type="build") - depends_on("py-cython@0.29.30:2", when="@1.22.4:", type="build") - depends_on("blas", when="+blas") - depends_on("lapack", when="+lapack") - - depends_on("py-nose@1.0.0:", when="@:1.14", type="test") - depends_on("py-pytest", when="@1.15:", type="test") - depends_on("py-hypothesis", when="@1.19:", type="test") - depends_on("py-typing-extensions@4.2:", when="@1.23:", type="test") - - # Allows you to specify order of BLAS/LAPACK preference - # https://github.com/numpy/numpy/pull/13132 - patch("blas-lapack-order.patch", when="@1.15:1.16") - - # Add Fujitsu Fortran compiler - patch("add_fj_compiler.patch", when="@1.19.3:1.19.5%fj") - patch("add_fj_compiler2.patch", when="@1.19.0:1.19.2%fj") - patch("add_fj_compiler3.patch", when="@1.14.0:1.18.5%fj") - patch("add_fj_compiler4.patch", when="@:1.13.3%fj") - - patch("check_executables.patch", when="@1.20.0:") - patch("check_executables2.patch", when="@1.19.0:1.19.5") - patch("check_executables3.patch", when="@1.16.0:1.18.5") - patch("check_executables4.patch", when="@1.14.0:1.15.4") - patch("check_executables5.patch", when="@:1.13.3") - - # Backport bug fix for f2py's define for threading when building with Mingw - patch( - "https://github.com/numpy/numpy/pull/20881.patch?full_index=1", - sha256="802970a9034d40a8a8f49a03f489d5361d5eabf69249621e6757651448910f1a", - when="@1.20.3:1.22.1", - ) - # Patch to update compiler flags. - # See https://github.com/spack/spack/issues/30373 - patch( - "https://github.com/numpy/numpy/pull/21448.patch?full_index=1", - sha256="e9508c3b3a1e1a24669014a0c1b9f3b009a149ea3886cf711eaef2a32b247fdb", - when="@1.22.0:1.22.3", - ) - - # version 1.21.0 runs into an infinit loop during printing - # (e.g. print(numpy.ones(1000)) when compiled with gcc 11 - conflicts("%gcc@11:", when="@1.21.0") - - # GCC 4.8 is the minimum version that works - conflicts("%gcc@:4.7", msg="GCC 4.8+ required") - - # NVHPC support added in https://github.com/numpy/numpy/pull/17344 - conflicts("%nvhpc", when="@:1.19") - - # Newer versions will not build with Intel https://github.com/numpy/numpy/issues/22011 - conflicts("%intel", when="@1.23.0:") - conflicts("%oneapi", when="@1.23.0:") - - def url_for_version(self, version): - url = "https://files.pythonhosted.org/packages/source/n/numpy/numpy-{}.{}" - if version >= Version("1.23"): - ext = "tar.gz" - else: - ext = "zip" - return url.format(version, ext) - - def flag_handler(self, name, flags): - # -std=c99 at least required, old versions of GCC default to -std=c90 - if self.spec.satisfies("%gcc@:5.1") and name == "cflags": - flags.append(self.compiler.c99_flag) - # Check gcc version in use by intel compiler - # This will essentially check the system gcc compiler unless a gcc - # module is already loaded. - if self.spec.satisfies("%intel") and name == "cflags": - p1 = subprocess.Popen([self.compiler.cc, "-v"], stderr=subprocess.PIPE) - p2 = subprocess.Popen( - ["grep", "compatibility"], stdin=p1.stderr, stdout=subprocess.PIPE - ) - p1.stderr.close() - out, err = p2.communicate() - gcc_version = Version(out.split()[5].decode("utf-8")) - if gcc_version < Version("4.8"): - raise InstallError( - "The GCC version that the Intel compiler " - "uses must be >= 4.8. The GCC in use is " - "{0}".format(gcc_version) - ) - if gcc_version <= Version("5.1"): - flags.append(self.compiler.c99_flag) - - return (flags, None, None) - - @run_before("install") - def set_blas_lapack(self): - # https://numpy.org/devdocs/user/building.html - # https://github.com/numpy/numpy/blob/master/site.cfg.example - - # Skip if no BLAS/LAPACK requested - spec = self.spec - if "+blas" not in spec and "+lapack" not in spec: - return - - def write_library_dirs(f, dirs): - f.write("library_dirs = {0}\n".format(dirs)) - if not ( - (platform.system() == "Darwin") - and (Version(platform.mac_ver()[0]).up_to(2) == Version("10.12")) - ): - f.write("rpath = {0}\n".format(dirs)) - - blas_libs = LibraryList([]) - blas_headers = HeaderList([]) - if "+blas" in spec: - blas_libs = spec["blas"].libs - blas_headers = spec["blas"].headers - - lapack_libs = LibraryList([]) - lapack_headers = HeaderList([]) - if "+lapack" in spec: - lapack_libs = spec["lapack"].libs - lapack_headers = spec["lapack"].headers - - lapackblas_libs = lapack_libs + blas_libs - lapackblas_headers = lapack_headers + blas_headers - - blas_lib_names = ",".join(blas_libs.names) - blas_lib_dirs = ":".join(blas_libs.directories) - blas_header_dirs = ":".join(blas_headers.directories) - - lapack_lib_names = ",".join(lapack_libs.names) - lapack_lib_dirs = ":".join(lapack_libs.directories) - lapack_header_dirs = ":".join(lapack_headers.directories) - - lapackblas_lib_names = ",".join(lapackblas_libs.names) - lapackblas_lib_dirs = ":".join(lapackblas_libs.directories) - lapackblas_header_dirs = ":".join(lapackblas_headers.directories) - - # Tell numpy where to find BLAS/LAPACK libraries - with open("site.cfg", "w") as f: - if ( - "^intel-mkl" in spec - or "^intel-parallel-studio+mkl" in spec - or "^intel-oneapi-mkl" in spec - ): - f.write("[mkl]\n") - # FIXME: as of @1.11.2, numpy does not work with separately - # specified threading and interface layers. A workaround is a - # terribly bad idea to use mkl_rt. In this case Spack will no - # longer be able to guarantee that one and the same variant of - # Blas/Lapack (32/64bit, threaded/serial) is used within the - # DAG. This may lead to a lot of hard-to-debug segmentation - # faults on user's side. Users may also break working - # installation by (unconsciously) setting environment variable - # to switch between different interface and threading layers - # dynamically. From this perspective it is no different from - # throwing away RPATH's and using LD_LIBRARY_PATH throughout - # Spack. - f.write("libraries = {0}\n".format("mkl_rt")) - write_library_dirs(f, lapackblas_lib_dirs) - f.write("include_dirs = {0}\n".format(lapackblas_header_dirs)) - - if "^blis" in spec or "^amdblis" in spec: - f.write("[blis]\n") - f.write("libraries = {0}\n".format(blas_lib_names)) - write_library_dirs(f, blas_lib_dirs) - f.write("include_dirs = {0}\n".format(blas_header_dirs)) - - if "^openblas" in spec: - f.write("[openblas]\n") - f.write("libraries = {0}\n".format(lapackblas_lib_names)) - write_library_dirs(f, lapackblas_lib_dirs) - f.write("include_dirs = {0}\n".format(lapackblas_header_dirs)) - - if "^libflame" in spec or "^amdlibflame" in spec: - f.write("[flame]\n") - f.write("libraries = {0}\n".format(lapack_lib_names)) - write_library_dirs(f, lapack_lib_dirs) - f.write("include_dirs = {0}\n".format(lapack_header_dirs)) - - if "^atlas" in spec: - f.write("[atlas]\n") - f.write("libraries = {0}\n".format(lapackblas_lib_names)) - write_library_dirs(f, lapackblas_lib_dirs) - f.write("include_dirs = {0}\n".format(lapackblas_header_dirs)) - - if "^veclibfort" in spec: - f.write("[accelerate]\n") - f.write("libraries = {0}\n".format(lapackblas_lib_names)) - write_library_dirs(f, lapackblas_lib_dirs) - - if "^netlib-lapack" in spec or "^cray-libsci" in spec: - # netlib and Cray require blas and lapack listed - # separately so that scipy can find them - if spec.satisfies("+blas"): - f.write("[blas]\n") - f.write("libraries = {0}\n".format(blas_lib_names)) - write_library_dirs(f, blas_lib_dirs) - f.write("include_dirs = {0}\n".format(blas_header_dirs)) - if spec.satisfies("+lapack"): - f.write("[lapack]\n") - f.write("libraries = {0}\n".format(lapack_lib_names)) - write_library_dirs(f, lapack_lib_dirs) - f.write("include_dirs = {0}\n".format(lapack_header_dirs)) - - if "^fujitsu-ssl2" in spec: - if spec.satisfies("+blas"): - f.write("[blas]\n") - f.write("libraries = {0}\n".format(spec["blas"].libs.names[0])) - write_library_dirs(f, blas_lib_dirs) - f.write("include_dirs = {0}\n".format(blas_header_dirs)) - f.write("extra_link_args = {0}\n".format(self.spec["blas"].libs.ld_flags)) - if spec.satisfies("+lapack"): - f.write("[lapack]\n") - f.write("libraries = {0}\n".format(spec["lapack"].libs.names[0])) - write_library_dirs(f, lapack_lib_dirs) - f.write("include_dirs = {0}\n".format(lapack_header_dirs)) - f.write("extra_link_args = {0}\n".format(self.spec["lapack"].libs.ld_flags)) - - def setup_build_environment(self, env): - # Tell numpy which BLAS/LAPACK libraries we want to use. - # https://github.com/numpy/numpy/pull/13132 - # https://numpy.org/devdocs/user/building.html#accelerated-blas-lapack-libraries - spec = self.spec - # https://numpy.org/devdocs/user/building.html#blas - if "blas" not in spec: - blas = "" - elif ( - spec["blas"].name == "intel-mkl" - or spec["blas"].name == "intel-parallel-studio" - or spec["blas"].name == "intel-oneapi-mkl" - ): - blas = "mkl" - elif spec["blas"].name == "blis" or spec["blas"].name == "amdblis": - blas = "blis" - elif spec["blas"].name == "openblas": - blas = "openblas" - elif spec["blas"].name == "atlas": - blas = "atlas" - elif spec["blas"].name == "veclibfort": - blas = "accelerate" - else: - blas = "blas" - - env.set("NPY_BLAS_ORDER", blas) - - # https://numpy.org/devdocs/user/building.html#lapack - if "lapack" not in spec: - lapack = "" - elif ( - spec["lapack"].name == "intel-mkl" - or spec["lapack"].name == "intel-parallel-studio" - or spec["lapack"].name == "intel-oneapi-mkl" - ): - lapack = "mkl" - elif spec["lapack"].name == "openblas": - lapack = "openblas" - elif spec["lapack"].name == "libflame" or spec["lapack"].name == "amdlibflame": - lapack = "flame" - elif spec["lapack"].name == "atlas": - lapack = "atlas" - elif spec["lapack"].name == "veclibfort": - lapack = "accelerate" - else: - lapack = "lapack" - - env.set("NPY_LAPACK_ORDER", lapack) - - @run_after("install") - @on_package_attributes(run_tests=True) - def install_test(self): - with working_dir("spack-test", create=True): - python("-c", 'import numpy; numpy.test("full", verbose=2)') diff --git a/packages/py-pebble/package.py b/packages/py-pebble/package.py deleted file mode 100644 index 5e17a06cec5be189527ab05b47a7572df3df0db3..0000000000000000000000000000000000000000 --- a/packages/py-pebble/package.py +++ /dev/null @@ -1,23 +0,0 @@ -# (this package was adapted from the spack develop upstream as a dependency of py-bluepyopt) - -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - - -from spack import * - - -class PyPebble(PythonPackage): - """Threading and multiprocessing eye-candy.""" - - homepage = "https://github.com/noxdafox/pebble" - pypi = "Pebble/Pebble-5.0.3.tar.gz" - - maintainers = ["hjorth", "elmath"] - - version("5.0.3", sha256="bdcfd9ea7e0aedb895b204177c19e6d6543d9962f4e3402ebab2175004863da8") - - depends_on("python@3.6:", type=("build", "run")) - depends_on("py-setuptools", type=("build")) diff --git a/packages/py-python-jose/package.py b/packages/py-python-jose/package.py deleted file mode 100644 index 3c8ceb8e00828c3479a75f31d52ff03c9ebb3072..0000000000000000000000000000000000000000 --- a/packages/py-python-jose/package.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack import * - -class PyPythonJose(PythonPackage): - """JOSE implementation in Python""" - - homepage = "http://github.com/mpdavis/python-jose" - pypi = "python-jose/python-jose-3.3.0.tar.gz" - - version("3.3.0", sha256="55779b5e6ad599c6336191246e95eb2293a9ddebd555f796a65f838f07e5d78a") - - depends_on("python@3.6:", type=("build", "run")) - depends_on("py-setuptools", type="build") - - depends_on("py-rsa", type=("build", "run")) - depends_on("py-ecdsa@:0.14.1,0.16.0:", type=("build", "run")) - depends_on("py-pyasn1", type=("build", "run")) diff --git a/packages/py-tensorboard/package.py b/packages/py-tensorboard/package.py deleted file mode 100644 index cccf282409699dff834090537fd3b5e86716c690..0000000000000000000000000000000000000000 --- a/packages/py-tensorboard/package.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyTensorboard(PythonPackage): - """TensorBoard is a suite of web applications for - inspecting and understanding your TensorFlow runs and - graphs.""" - - homepage = "https://github.com/tensorflow/tensorboard" - url = "https://files.pythonhosted.org/packages/py3/t/tensorboard/tensorboard-2.9.1-py3-none-any.whl" - list_url = "https://pypi.org/simple/tensorboard/" - - maintainers = ["aweits"] - - version( - "2.11.0", - sha256="a0e592ee87962e17af3f0dce7faae3fbbd239030159e9e625cce810b7e35c53d", - expand=False, - ) - version( - "2.10.0", - sha256="76c91a5e8959cd2208cc32cb17a0cb002badabb66a06ac2af02a7810f49a59e3", - expand=False, - ) - version( - "2.9.1", - sha256="baa727f791776f9e5841d347127720ceed4bbd59c36b40604b95fb2ae6029276", - expand=False, - ) - version( - "2.9.0", - sha256="bd78211076dca5efa27260afacfaa96cd05c7db12a6c09cc76a1d6b2987ca621", - expand=False, - ) - version( - "2.8.0", - sha256="65a338e4424e9079f2604923bdbe301792adce2ace1be68da6b3ddf005170def", - expand=False, - ) - version( - "2.7.0", - sha256="239f78a4a8dff200ce585a030c787773a8c1184d5c159252f5f85bac4e3c3b38", - expand=False, - ) - version( - "2.6.0", - sha256="f7dac4cdfb52d14c9e3f74585ce2aaf8e6203620a864e51faf84988b09f7bbdb", - expand=False, - ) - version( - "2.5.0", - sha256="e167460085b6528956b33bab1c970c989cdce47a6616273880733f5e7bde452e", - expand=False, - ) - version( - "2.4.1", - sha256="7b8c53c396069b618f6f276ec94fc45d17e3282d668979216e5d30be472115e4", - expand=False, - ) - version( - "2.4.0", - sha256="cde0c663a85609441cb4d624e7255fd8e2b6b1d679645095aac8a234a2812738", - expand=False, - ) - version( - "2.3.0", - sha256="d34609ed83ff01dd5b49ef81031cfc9c166bba0dabd60197024f14df5e8eae5e", - expand=False, - ) - version( - "2.2.0", - sha256="bb6bbc75ad2d8511ba6cbd49e4417276979f49866e11841e83da8298727dbaed", - expand=False, - ) - - depends_on("python@2.7:2.8,3.2:", type=("build", "run"), when="@:2.5") - depends_on("python@3.6:", type=("build", "run"), when="@2.6:") - depends_on("py-absl-py@0.4:", type=("build", "run")) - depends_on("py-grpcio@1.24.3:", type=("build", "run"), when="@2.3:") - depends_on("py-grpcio@1.23.3:", type=("build", "run"), when="@2.2") - depends_on("py-google-auth@1.6.3:1", type=("build", "run"), when="@:2.6") - depends_on("py-google-auth@1.6.3:2", type=("build", "run"), when="@2.7:") - depends_on("py-google-auth-oauthlib@0.4.1:0.4", type=("build", "run")) - depends_on("py-markdown@2.6.8:", type=("build", "run")) - depends_on("py-numpy@1.12.0:", type=("build", "run")) - depends_on("py-protobuf@3.6.0:3.19", type=("build", "run"), when="@:2.8") - depends_on("py-protobuf@3.9.2:3.19", type=("build", "run"), when="@2.9:") - depends_on("py-requests@2.21.0:2", type=("build", "run")) - depends_on("py-setuptools@41.0.0:", type=("build", "run")) - depends_on("py-tensorboard-data-server@0.6", type=("build", "run"), when="@2.5:") - depends_on("py-tensorboard-plugin-wit@1.6.0:", type=("build", "run")) - depends_on("py-werkzeug@0.11.15:", type=("build", "run")) - depends_on("py-werkzeug@1.0.1:", type=("build", "run"), when="@2.9:") - depends_on("py-wheel@0.26:", type="build") - depends_on("py-six@1.10.0:", type=("build", "run"), when="@:2.4") diff --git a/packages/py-torch/cusparseGetErrorString.patch b/packages/py-torch/cusparseGetErrorString.patch deleted file mode 100644 index 9cb136b3f88faee0631eaac14c2915664e30dc6c..0000000000000000000000000000000000000000 --- a/packages/py-torch/cusparseGetErrorString.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff --git a/aten/src/ATen/native/sparse/cuda/SparseCUDABlas.cu b/aten/src/ATen/native/sparse/cuda/SparseCUDABlas.cu -index 1cee04c200..f46003d9a9 100644 ---- a/aten/src/ATen/native/sparse/cuda/SparseCUDABlas.cu -+++ b/aten/src/ATen/native/sparse/cuda/SparseCUDABlas.cu -@@ -10,48 +10,6 @@ - namespace at { namespace native { namespace sparse { namespace cuda { - - --std::string cusparseGetErrorString(cusparseStatus_t status) { -- switch(status) -- { -- case CUSPARSE_STATUS_SUCCESS: -- return "success"; -- -- case CUSPARSE_STATUS_NOT_INITIALIZED: -- return "library not initialized"; -- -- case CUSPARSE_STATUS_ALLOC_FAILED: -- return "resource allocation failed"; -- -- case CUSPARSE_STATUS_INVALID_VALUE: -- return "an invalid numeric value was used as an argument"; -- -- case CUSPARSE_STATUS_ARCH_MISMATCH: -- return "an absent device architectural feature is required"; -- -- case CUSPARSE_STATUS_MAPPING_ERROR: -- return "an access to GPU memory space failed"; -- -- case CUSPARSE_STATUS_EXECUTION_FAILED: -- return "the GPU program failed to execute"; -- -- case CUSPARSE_STATUS_INTERNAL_ERROR: -- return "an internal operation failed"; -- -- case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED: -- return "the matrix type is not supported by this function"; -- -- case CUSPARSE_STATUS_ZERO_PIVOT: -- return "an entry of the matrix is either structural zero or numerical zero (singular block)"; -- -- default: -- { -- std::ostringstream oss; -- oss << "unknown error " << static_cast<int64_t>(status); -- return oss.str(); -- } -- } --} -- - inline void CUSPARSE_CHECK(cusparseStatus_t status) - { - if (status != CUSPARSE_STATUS_SUCCESS) { diff --git a/packages/py-torch/detect_omp_of_fujitsu_compiler.patch b/packages/py-torch/detect_omp_of_fujitsu_compiler.patch deleted file mode 100644 index 519d66869d578ea4a59c4e7f626569baade6837a..0000000000000000000000000000000000000000 --- a/packages/py-torch/detect_omp_of_fujitsu_compiler.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- pytorch/cmake/Modules/FindOpenMP.cmake.org 2020-05-26 17:43:53.000000000 +0900 -+++ pytorch/cmake/Modules/FindOpenMP.cmake 2020-05-26 17:46:37.000000000 +0900 -@@ -84,7 +84,7 @@ - unset(OpenMP_FLAG_CANDIDATES) - - set(OMP_FLAG_GNU "-fopenmp") -- set(OMP_FLAG_Clang "-fopenmp=libomp" "-fopenmp=libiomp5" "-fopenmp") -+ set(OMP_FLAG_Clang "-fopenmp" "-fopenmp=libomp" "-fopenmp=libiomp5") - - # AppleClang may need a header file, search for omp.h with hints to brew - # default include dir -@@ -245,7 +245,7 @@ - set(OpenMP_libomp_LIBRARY "${MKL_OPENMP_LIBRARY}" CACHE STRING "libomp location for OpenMP") - else() - find_library(OpenMP_libomp_LIBRARY -- NAMES omp gomp iomp5 -+ NAMES fjomp omp gomp iomp5 - HINTS ${CMAKE_${LANG}_IMPLICIT_LINK_DIRECTORIES} - DOC "libomp location for OpenMP" - ) diff --git a/packages/py-torch/fj-ssl2_1.10.patch b/packages/py-torch/fj-ssl2_1.10.patch deleted file mode 100644 index bcd2c37804c1ba1ee62d70907c8705a23607a5aa..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.10.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index ca560288a4..f5a29ecf43 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -130,7 +130,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "ATLAS;BLIS;Eigen;FLAME;Generic;MKL;OpenBLAS;vecLib") -+set_property(CACHE BLAS PROPERTY STRINGS "ATLAS;BLIS;Eigen;FLAME;Generic;MKL;OpenBLAS;SSL2;vecLib") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -185,6 +185,20 @@ elseif(BLAS STREQUAL "vecLib") - set(BLAS_INFO "veclib") - set(BLAS_FOUND 1) - set(BLAS_LIBRARIES ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - elseif(BLAS STREQUAL "Generic") - # On Debian family, the CBLAS ABIs have been merged into libblas.so - find_library(BLAS_LIBRARIES blas) -@@ -201,7 +215,7 @@ if(NOT INTERN_BUILD_MOBILE) - set(AT_MKL_ENABLED 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR BLIS_FOUND OR GENERIC_BLAS_FOUND OR MKL_FOUND OR OpenBLAS_FOUND OR VECLIB_FOUND)) -+ if(NOT (ATLAS_FOUND OR BLIS_FOUND OR GENERIC_BLAS_FOUND OR MKL_FOUND OR OpenBLAS_FOUND OR SSL2_FOUND OR VECLIB_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if(NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index 47c80b45f6..efd4a87d06 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -276,6 +276,28 @@ if((NOT BLAS_LIBRARIES) - endif() - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/fj-ssl2_1.11.patch b/packages/py-torch/fj-ssl2_1.11.patch deleted file mode 100644 index af41e5bb93931ca3c0f12a55733407a52fb4af31..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.11.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 557ab649a4..56d1699736 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -174,7 +174,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "ATLAS;BLIS;Eigen;FLAME;Generic;MKL;OpenBLAS;vecLib") -+set_property(CACHE BLAS PROPERTY STRINGS "ATLAS;BLIS;Eigen;FLAME;Generic;MKL;OpenBLAS;SSL2;vecLib") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -229,6 +229,20 @@ elseif(BLAS STREQUAL "vecLib") - set(BLAS_INFO "veclib") - set(BLAS_FOUND 1) - set(BLAS_LIBRARIES ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - elseif(BLAS STREQUAL "FlexiBLAS") - find_package(FlexiBLAS REQUIRED) - include_directories(SYSTEM ${FlexiBLAS_INCLUDE_DIR}) -@@ -250,7 +264,7 @@ if(NOT INTERN_BUILD_MOBILE) - set(AT_MKL_SEQUENTIAL 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR BLIS_FOUND OR GENERIC_BLAS_FOUND OR MKL_FOUND OR OpenBLAS_FOUND OR VECLIB_FOUND OR FlexiBLAS_FOUND)) -+ if(NOT (ATLAS_FOUND OR BLIS_FOUND OR GENERIC_BLAS_FOUND OR MKL_FOUND OR OpenBLAS_FOUND OR SSL2_FOUND OR VECLIB_FOUND OR FlexiBLAS_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if(NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index 94942d520f..ae5b8db963 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -289,6 +289,28 @@ if((NOT BLAS_LIBRARIES) - endif() - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/fj-ssl2_1.2.patch b/packages/py-torch/fj-ssl2_1.2.patch deleted file mode 100644 index 826c5c2b078de0c152d22d73cd8208ee992fa76b..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.2.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 00dcabd131..bddd3716ca 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -107,7 +107,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib") -+set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;SSL2") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -147,6 +147,20 @@ elseif(BLAS STREQUAL "vecLib") - find_package(vecLib REQUIRED) - include_directories(SYSTEM ${vecLib_INCLUDE_DIR}) - list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - else() - message(FATAL_ERROR "Unrecognized BLAS option: " ${BLAS}) - endif() -@@ -156,7 +170,7 @@ if (NOT INTERN_BUILD_MOBILE) - set(AT_MKL_ENABLED 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND)) -+ if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND OR SSL2_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if (NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index d6c0346739..72f4e18da2 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -225,6 +225,28 @@ if((NOT BLAS_LIBRARIES) - endif (BLAS_LIBRARIES) - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/fj-ssl2_1.3-1.5.patch b/packages/py-torch/fj-ssl2_1.3-1.5.patch deleted file mode 100644 index 0ea87500b0a60e35450c90315c5466d5f6488073..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.3-1.5.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index a8e9769536..f0f91304c2 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -107,7 +107,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;FLAME") -+set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;SSL2;FLAME") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -147,6 +147,20 @@ elseif(BLAS STREQUAL "vecLib") - find_package(vecLib REQUIRED) - include_directories(SYSTEM ${vecLib_INCLUDE_DIR}) - list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - else() - message(FATAL_ERROR "Unrecognized BLAS option: " ${BLAS}) - endif() -@@ -156,7 +170,7 @@ if (NOT INTERN_BUILD_MOBILE) - set(AT_MKL_ENABLED 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND)) -+ if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND OR SSL2_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if (NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index e93e98a609..d43a6c40bd 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -239,6 +239,28 @@ if((NOT BLAS_LIBRARIES) - endif (BLAS_LIBRARIES) - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/fj-ssl2_1.6-1.7.patch b/packages/py-torch/fj-ssl2_1.6-1.7.patch deleted file mode 100644 index 423af3f21299395696d27703e531c504c19b50f4..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.6-1.7.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 36e1ab7682..0f02f51c47 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -114,7 +114,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;FLAME;Generic") -+set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;SSL2;FLAME;Generic") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -154,6 +154,20 @@ elseif(BLAS STREQUAL "vecLib") - find_package(vecLib REQUIRED) - include_directories(SYSTEM ${vecLib_INCLUDE_DIR}) - list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - elseif(BLAS STREQUAL "Generic") - # On Debian family, the CBLAS ABIs have been merged into libblas.so - find_library(BLAS_LIBRARIES blas) -@@ -168,7 +182,7 @@ if(NOT INTERN_BUILD_MOBILE) - set(AT_MKL_ENABLED 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND OR GENERIC_BLAS_FOUND)) -+ if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND OR SSL2_FOUND OR GENERIC_BLAS_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if(NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index e93e98a609..d43a6c40bd 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -239,6 +239,28 @@ if((NOT BLAS_LIBRARIES) - endif (BLAS_LIBRARIES) - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/fj-ssl2_1.8.patch b/packages/py-torch/fj-ssl2_1.8.patch deleted file mode 100644 index 461c1a2976b7a118173182452075e809f7f52858..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.8.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 06464e799a..7f50bd8fa0 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -118,7 +118,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;FLAME;Generic") -+set_property(CACHE BLAS PROPERTY STRINGS "Eigen;ATLAS;OpenBLAS;MKL;vecLib;SSL2;FLAME;Generic") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -157,6 +157,20 @@ elseif(BLAS STREQUAL "vecLib") - find_package(vecLib REQUIRED) - include_directories(SYSTEM ${vecLib_INCLUDE_DIR}) - list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - elseif(BLAS STREQUAL "Generic") - # On Debian family, the CBLAS ABIs have been merged into libblas.so - find_library(BLAS_LIBRARIES blas) -@@ -171,7 +185,7 @@ if(NOT INTERN_BUILD_MOBILE) - set(AT_MKL_ENABLED 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND OR GENERIC_BLAS_FOUND)) -+ if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND OR SSL2_FOUND OR GENERIC_BLAS_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if(NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index e8f5d7c950..29219e057f 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -257,6 +257,28 @@ if((NOT BLAS_LIBRARIES) - endif() - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/fj-ssl2_1.9.patch b/packages/py-torch/fj-ssl2_1.9.patch deleted file mode 100644 index 0febb57586fc1297ac21c1707e1c9cfc93da819d..0000000000000000000000000000000000000000 --- a/packages/py-torch/fj-ssl2_1.9.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index 5d57b9ca78..a74fe73b9f 100644 ---- a/cmake/Dependencies.cmake -+++ b/cmake/Dependencies.cmake -@@ -118,7 +118,7 @@ else() - set(AT_MKLDNN_ENABLED 0) - set(AT_MKL_ENABLED 0) - endif() --set_property(CACHE BLAS PROPERTY STRINGS "ATLAS;BLIS;Eigen;FLAME;Generic;MKL;OpenBLAS;vecLib") -+set_property(CACHE BLAS PROPERTY STRINGS "ATLAS;BLIS;Eigen;FLAME;Generic;MKL;OpenBLAS;SSL2;vecLib") - message(STATUS "Trying to find preferred BLAS backend of choice: " ${BLAS}) - - if(BLAS STREQUAL "Eigen") -@@ -161,6 +161,20 @@ elseif(BLAS STREQUAL "vecLib") - find_package(vecLib REQUIRED) - include_directories(SYSTEM ${vecLib_INCLUDE_DIR}) - list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS ${vecLib_LINKER_LIBS}) -+elseif(BLAS STREQUAL "SSL2") -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ message(STATUS "SSL2 Selected BLAS library") -+ list(APPEND Caffe2_PUBLIC_DEPENDENCY_LIBS "fjlapackexsve.so") -+ set(SSL2_FOUND ON) -+ message(STATUS "set CMAKE_SHARED_LINKER_FLAGS: -SSL2 --linkfortran") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ set(WITH_BLAS "ssl2") -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() - elseif(BLAS STREQUAL "Generic") - # On Debian family, the CBLAS ABIs have been merged into libblas.so - find_library(BLAS_LIBRARIES blas) -@@ -175,7 +189,7 @@ if(NOT INTERN_BUILD_MOBILE) - set(AT_MKL_ENABLED 0) - set(AT_MKL_MT 0) - set(USE_BLAS 1) -- if(NOT (ATLAS_FOUND OR BLIS_FOUND OR GENERIC_BLAS_FOUND OR MKL_FOUND OR OpenBLAS_FOUND OR VECLIB_FOUND)) -+ if(NOT (ATLAS_FOUND OR BLIS_FOUND OR GENERIC_BLAS_FOUND OR MKL_FOUND OR OpenBLAS_FOUND OR SSL2_FOUND OR VECLIB_FOUND)) - message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library") - find_package(BLAS) - if(NOT BLAS_FOUND) -diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake -index eefd6d475a..92ad75d32e 100644 ---- a/cmake/Modules/FindBLAS.cmake -+++ b/cmake/Modules/FindBLAS.cmake -@@ -276,6 +276,28 @@ if((NOT BLAS_LIBRARIES) - endif() - endif() - -+# BLAS in SSL2 library? -+if((NOT BLAS_LIBRARIES) -+ AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "ssl2"))) -+ if(CMAKE_CXX_COMPILER MATCHES ".*/FCC$" -+ AND CMAKE_C_COMPILER MATCHES ".*/fcc$") -+ check_fortran_libraries( -+ BLAS_LIBRARIES -+ BLAS -+ sgemm -+ "-SSL2;--linkfortran" -+ "fjlapackexsve") -+ if (BLAS_LIBRARIES) -+ set(BLAS_INFO "ssl2") -+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -SSL2 --linkfortran") -+ endif (BLAS_LIBRARIES) -+ else() -+ message(STATUS "Not built using fcc and FCC.") -+ message(STATUS "CMAKE_C_COMPILER: ${CMAKE_C_COMPILER}") -+ message(STATUS "CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") -+ endif() -+endif() -+ - # Generic BLAS library? - if((NOT BLAS_LIBRARIES) - AND ((NOT WITH_BLAS) OR (WITH_BLAS STREQUAL "generic"))) diff --git a/packages/py-torch/package.py b/packages/py-torch/package.py deleted file mode 100644 index 641955a02a44d39916335af196e40c28e85fcdea..0000000000000000000000000000000000000000 --- a/packages/py-torch/package.py +++ /dev/null @@ -1,554 +0,0 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -import os -import sys - -from spack.operating_systems.mac_os import macos_version -from spack.package import * - - -class PyTorch(PythonPackage, CudaPackage, ROCmPackage): - """Tensors and Dynamic neural networks in Python - with strong GPU acceleration.""" - - homepage = "https://pytorch.org/" - git = "https://github.com/pytorch/pytorch.git" - - maintainers = ["adamjstewart"] - - # Exact set of modules is version- and variant-specific, just attempt to import the - # core libraries to ensure that the package was successfully installed. - import_modules = ["torch", "torch.autograd", "torch.nn", "torch.utils"] - - version("master", branch="master", submodules=True) - version("1.13.0", tag="v1.13.0", submodules=True) - version("1.12.1", tag="v1.12.1", submodules=True) - version("1.12.0", tag="v1.12.0", submodules=True) - version("1.11.0", tag="v1.11.0", submodules=True) - version("1.10.2", tag="v1.10.2", submodules=True) - version("1.10.1", tag="v1.10.1", submodules=True) - version("1.10.0", tag="v1.10.0", submodules=True) - version("1.9.1", tag="v1.9.1", submodules=True) - version("1.9.0", tag="v1.9.0", submodules=True) - version("1.8.2", tag="v1.8.2", submodules=True) - version("1.8.1", tag="v1.8.1", submodules=True) - version("1.8.0", tag="v1.8.0", submodules=True) - version("1.7.1", tag="v1.7.1", submodules=True) - version("1.7.0", tag="v1.7.0", submodules=True) - version("1.6.0", tag="v1.6.0", submodules=True) - version("1.5.1", tag="v1.5.1", submodules=True) - version("1.5.0", tag="v1.5.0", submodules=True) - version("1.4.1", tag="v1.4.1", submodules=True) - version("1.3.1", tag="v1.3.1", submodules=True) - version("1.3.0", tag="v1.3.0", submodules=True) - version("1.2.0", tag="v1.2.0", submodules=True) - version("1.1.0", tag="v1.1.0", submodules=True) - version("1.0.1", tag="v1.0.1", submodules=True) - version("1.0.0", tag="v1.0.0", submodules=True) - - is_darwin = sys.platform == "darwin" - - # All options are defined in CMakeLists.txt. - # Some are listed in setup.py, but not all. - variant("debug", default=False, description="Build with debugging support") - variant("caffe2", default=False, description="Build Caffe2", when="@1.7:") - variant("test", default=False, description="Build C++ test binaries") - variant("cuda", default=not is_darwin, description="Use CUDA") - variant("rocm", default=False, description="Use ROCm") - variant("cudnn", default=not is_darwin, description="Use cuDNN", when="+cuda") - variant("fbgemm", default=True, description="Use FBGEMM (quantized 8-bit server operators)") - variant("kineto", default=True, description="Use Kineto profiling library", when="@1.8:") - variant("magma", default=not is_darwin, description="Use MAGMA", when="+cuda") - variant("metal", default=is_darwin, description="Use Metal for Caffe2 iOS build") - variant( - "mps", - default=is_darwin and macos_version() >= Version("12.3"), - description="Use MPS for macOS build", - when="@1.12: platform=darwin", - ) - variant("nccl", default=True, description="Use NCCL", when="+cuda platform=linux") - variant("nccl", default=True, description="Use NCCL", when="+cuda platform=cray") - variant("nccl", default=True, description="Use NCCL", when="+rocm platform=linux") - variant("nccl", default=True, description="Use NCCL", when="+rocm platform=cray") - variant("nnpack", default=True, description="Use NNPACK") - variant("numa", default=True, description="Use NUMA", when="platform=linux") - variant("numa", default=True, description="Use NUMA", when="platform=cray") - variant("numpy", default=True, description="Use NumPy") - variant("openmp", default=True, description="Use OpenMP for parallel code") - variant("qnnpack", default=True, description="Use QNNPACK (quantized 8-bit operators)") - variant("valgrind", default=True, description="Use Valgrind", when="@1.8: platform=linux") - variant("valgrind", default=True, description="Use Valgrind", when="@1.8: platform=cray") - variant("xnnpack", default=True, description="Use XNNPACK", when="@1.5:") - variant("mkldnn", default=True, description="Use MKLDNN") - variant("distributed", default=not is_darwin, description="Use distributed") - variant("mpi", default=not is_darwin, description="Use MPI for Caffe2", when="+distributed") - variant("gloo", default=not is_darwin, description="Use Gloo", when="+distributed") - variant( - "tensorpipe", - default=not is_darwin, - description="Use TensorPipe", - when="@1.6: +distributed", - ) - variant("onnx_ml", default=True, description="Enable traditional ONNX ML API", when="@1.5:") - variant( - "breakpad", - default=True, - description="Enable breakpad crash dump library", - when="@1.9:1.11", - ) - - conflicts("+cuda+rocm") - conflicts("+tensorpipe", when="+rocm", msg="TensorPipe doesn't yet support ROCm") - conflicts("+breakpad", when="target=ppc64:") - conflicts("+breakpad", when="target=ppc64le:") - - # https://github.com/pytorch/pytorch/issues/77811 - conflicts("+qnnpack", when="platform=darwin target=aarch64:") - - conflicts( - "cuda_arch=none", - when="+cuda", - msg="Must specify CUDA compute capabilities of your GPU, see " - "https://developer.nvidia.com/cuda-gpus", - ) - - # Required dependencies - # See python_min_version in setup.py - depends_on("python@3.7:", when="@1.11:", type=("build", "link", "run")) - depends_on("python@3.6.2:", when="@1.7.1:", type=("build", "link", "run")) - depends_on("python@3.6.1:", when="@1.6:1.7.0", type=("build", "link", "run")) - depends_on("python@3.5:", when="@1.5", type=("build", "link", "run")) - depends_on("python@2.7:2,3.5:", when="@1.4", type=("build", "link", "run")) - depends_on("python@2.7:2,3.5:3.7", when="@:1.3", type=("build", "link", "run")) - - # pyproject.toml - depends_on("py-setuptools", type=("build", "run")) - depends_on("py-astunparse", when="@1.13:", type=("build", "run")) - depends_on("py-numpy@1.16.6:", type=("build", "run")) - depends_on("ninja@1.5:", when="@1.1:", type="build") - depends_on("py-pyyaml", type=("build", "run")) - depends_on("cmake@3.13:", when="@1.11:", type="build") - depends_on("cmake@3.10:", when="@1.10:", type="build") - depends_on("cmake@3.5:", type="build") - depends_on("py-cffi", type=("build", "run")) - depends_on("py-typing-extensions@3.6.2.1:", when="@1.7:", type=("build", "run")) - depends_on("py-future", when="@1.5:", type=("build", "run")) - depends_on("py-future", when="@1.1: ^python@:2", type=("build", "run")) - depends_on("py-six", when="@1.13:", type=("build", "run")) - depends_on("py-requests", when="@1.13:", type=("build", "run")) - depends_on("py-dataclasses", when="@1.7: ^python@3.6", type=("build", "run")) - - # Undocumented dependencies - depends_on("py-typing", when="^python@:3.4", type=("build", "run")) - depends_on("py-tqdm", type="run") - depends_on("blas") - depends_on("lapack") - - # third_party - depends_on("py-pybind11@2.10.0:", when="@1.13:", type=("build", "link", "run")) - depends_on("py-pybind11@2.6.2", when="@1.8:1.12", type=("build", "link", "run")) - depends_on("py-pybind11@2.3.0", when="@1.1:1.7", type=("build", "link", "run")) - depends_on("py-pybind11@2.2.4", when="@:1.0", type=("build", "link", "run")) - depends_on("py-protobuf@3.12.2:", when="@1.10:", type=("build", "run")) - depends_on("py-protobuf@:3.14", when="@:1.9", type=("build", "run")) - depends_on("protobuf@3.12.2:", when="@1.10:") - depends_on("protobuf@:3.14", when="@:1.9") - # https://github.com/protocolbuffers/protobuf/issues/10051 - # https://github.com/pytorch/pytorch/issues/78362 - depends_on("py-protobuf@:3", type=("build", "run")) - depends_on("protobuf@:3", type=("build", "run")) - depends_on("eigen") - # https://github.com/pytorch/pytorch/issues/60329 - # depends_on("cpuinfo@2022-08-19", when="@1.13:") - # depends_on("cpuinfo@2020-12-17", when="@1.8:1.12") - # depends_on("cpuinfo@2020-06-11", when="@1.6:1.7") - # https://github.com/shibatch/sleef/issues/427 - # depends_on("sleef@3.5.1_2020-12-22", when="@1.8:") - # https://github.com/pytorch/pytorch/issues/60334 - # depends_on("sleef@3.4.0_2019-07-30", when="@1.6:1.7") - # https://github.com/Maratyszcza/FP16/issues/18 - # depends_on("fp16@2020-05-14", when="@1.6:") - depends_on("pthreadpool@2021-04-13", when="@1.9:") - depends_on("pthreadpool@2020-10-05", when="@1.8") - depends_on("pthreadpool@2020-06-15", when="@1.6:1.7") - depends_on("psimd@2020-05-17", when="@1.6:") - depends_on("fxdiv@2020-04-17", when="@1.6:") - depends_on("benchmark", when="@1.6:+test") - - # Optional dependencies - # https://discuss.pytorch.org/t/compiling-1-10-1-from-source-with-gcc-11-and-cuda-11-5/140971 - depends_on("cuda@9.2:", when="@1.11:+cuda", type=("build", "link", "run")) - depends_on("cuda@9.2:11.4", when="@1.6:1.10+cuda", type=("build", "link", "run")) - depends_on("cuda@9:11.4", when="@1.1:1.5+cuda", type=("build", "link", "run")) - depends_on("cuda@7.5:11.4", when="@:1.0+cuda", type=("build", "link", "run")) - depends_on("cudnn@6:7", when="@:1.0+cudnn") - depends_on("cudnn@7.0:7", when="@1.1:1.5+cudnn") - depends_on("cudnn@7:", when="@1.6:+cudnn") - depends_on("magma+cuda", when="+magma+cuda") - depends_on("magma+rocm", when="+magma+rocm") - depends_on("nccl", when="+nccl+cuda") - depends_on("numactl", when="+numa") - depends_on("llvm-openmp", when="%apple-clang +openmp") - depends_on("valgrind", when="+valgrind") - with when("+rocm"): - depends_on("hsa-rocr-dev") - depends_on("hip") - depends_on("rccl", when="+nccl") - depends_on("rocprim") - depends_on("hipcub") - depends_on("rocthrust") - depends_on("roctracer-dev") - depends_on("rocrand") - depends_on("hipsparse") - depends_on("hipfft") - depends_on("rocfft") - depends_on("rocblas") - depends_on("miopen-hip") - depends_on("rocminfo") - # https://github.com/pytorch/pytorch/issues/60332 - # depends_on("xnnpack@2022-02-16", when="@1.12:+xnnpack") - # depends_on("xnnpack@2021-06-21", when="@1.10:1.11+xnnpack") - # depends_on("xnnpack@2021-02-22", when="@1.8:1.9+xnnpack") - # depends_on("xnnpack@2020-03-23", when="@1.6:1.7+xnnpack") - depends_on("mpi", when="+mpi") - # https://github.com/pytorch/pytorch/issues/60270 - # depends_on("gloo@2022-05-18", when="@1.13:+gloo") - # depends_on("gloo@2021-05-21", when="@1.10:1.12+gloo") - # depends_on("gloo@2021-05-04", when="@1.9+gloo") - # depends_on("gloo@2020-09-18", when="@1.7:1.8+gloo") - # depends_on("gloo@2020-03-17", when="@1.6+gloo") - # https://github.com/pytorch/pytorch/issues/60331 - # depends_on("onnx!1.12.0", when="@1.13:+onnx_ml") - # depends_on("onnx@1.11.0", when="@1.12+onnx_ml") - # depends_on("onnx@1.10.1_2021-10-08", when="@1.11+onnx_ml") - # depends_on("onnx@1.10.1", when="@1.10+onnx_ml") - # depends_on("onnx@1.8.0_2020-11-03", when="@1.8:1.9+onnx_ml") - # depends_on("onnx@1.7.0_2020-05-31", when="@1.6:1.7+onnx_ml") - depends_on("mkl", when="+mkldnn") - - # Test dependencies - depends_on("py-hypothesis", type="test") - depends_on("py-six", type="test") - depends_on("py-psutil", type="test") - - # Fix BLAS being overridden by MKL - # https://github.com/pytorch/pytorch/issues/60328 - patch( - "https://github.com/pytorch/pytorch/pull/59220.patch?full_index=1", - sha256="6d5717267f901e8ee493dfacd08734d9bcc48ad29a76ca9ef702368e96bee675", - when="@1.2:1.11", - ) - - # Fixes build on older systems with glibc <2.12 - patch( - "https://github.com/pytorch/pytorch/pull/55063.patch?full_index=1", - sha256="2229bcbf20fbe88aa9f7318f89c126ec7f527875ffe689a763c78abfa127a65c", - when="@1.1:1.8.1", - ) - - # Fixes CMake configuration error when XNNPACK is disabled - # https://github.com/pytorch/pytorch/pull/35607 - # https://github.com/pytorch/pytorch/pull/37865 - patch("xnnpack.patch", when="@1.5") - - # Fixes build error when ROCm is enabled for pytorch-1.5 release - patch("rocm.patch", when="@1.5+rocm") - - # Fixes fatal error: sleef.h: No such file or directory - # https://github.com/pytorch/pytorch/pull/35359 - # https://github.com/pytorch/pytorch/issues/26555 - # patch("sleef.patch", when="@:1.5") - - # Fixes compilation with Clang 9.0.0 and Apple Clang 11.0.3 - # https://github.com/pytorch/pytorch/pull/37086 - patch( - "https://github.com/pytorch/pytorch/commit/e921cd222a8fbeabf5a3e74e83e0d8dfb01aa8b5.patch?full_index=1", - sha256="0f3ad037a95af9d34b1d085050c1e7771fd00f0b89e5b3a276097b7c9f4fabf8", - when="@1.1:1.5", - ) - - # Removes duplicate definition of getCusparseErrorString - # https://github.com/pytorch/pytorch/issues/32083 - patch("cusparseGetErrorString.patch", when="@:1.0^cuda@10.1.243:") - - # Fixes 'FindOpenMP.cmake' - # to detect openmp settings used by Fujitsu compiler. - patch("detect_omp_of_fujitsu_compiler.patch", when="%fj") - - # Fixes to build with fujitsu-ssl2 - patch("fj-ssl2_1.11.patch", when="@1.11:^fujitsu-ssl2") - patch("fj-ssl2_1.10.patch", when="@1.10^fujitsu-ssl2") - patch("fj-ssl2_1.9.patch", when="@1.9^fujitsu-ssl2") - patch("fj-ssl2_1.8.patch", when="@1.8^fujitsu-ssl2") - patch("fj-ssl2_1.6-1.7.patch", when="@1.6:1.7^fujitsu-ssl2") - patch("fj-ssl2_1.3-1.5.patch", when="@1.3:1.5^fujitsu-ssl2") - patch("fj-ssl2_1.2.patch", when="@1.2^fujitsu-ssl2") - - # Fix compilation of +distributed~tensorpipe - # https://github.com/pytorch/pytorch/issues/68002 - patch( - "https://github.com/pytorch/pytorch/commit/c075f0f633fa0136e68f0a455b5b74d7b500865c.patch?full_index=1", - sha256="41271e494a3a60a65a8dd45ac053d1a6e4e4d5b42c2dac589ac67524f61ac41e", - when="@1.10.0+distributed~tensorpipe", - ) - - # Use patches from IBM's Open CE to enable building on Power systems - # 03xx - patch temporary to fix a problem that when fixed upstream can be removed - patch( - "https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0302-cpp-extension.patch", - sha256="ecb3973fa7d0f4c8f8ae40433f3ca5622d730a7b16f6cb63325d1e95baff8aa2", - when="@1.10:1.11 arch=ppc64le:", - ) - - patch( - "https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0311-PR66085-Remove-unused-dump-method-from-VSX-vec256-methods.patch", - sha256="f05db59f3def4c4215db7142d81029c73fe330c660492159b66d65ca5001f4d1", - when="@1.10:1.11 arch=ppc64le:", - ) - - patch( - "https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0312-PR67331-Dummpy-VSX-bfloat16-implementation.patch", - sha256="860b64afa85f5e6647ebc3c91d5a0bb258784770900c9302c3599c98d5cff1ee", - when="@1.10:1.11 arch=ppc64le:", - ) - - patch( - "https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.10/recipe/0313-add-missing-vsx-dispatch.patch", - sha256="7393c2bc0b6d41ecc813c829a1e517bee864686652e91f174cb7bcdfb10ba451", - when="@1.10:1.11 arch=ppc64le:", - ) - - patch( - "https://github.com/open-ce/pytorch-feedstock/raw/0a145060ca8523314ec3893af935c3b140e2d0b0/pytorch-1.12/recipe/0302-cpp-extension.patch", - sha256="2fac519cca8997f074c263505657ff867e7ba2d6637fc8bda99c70a99be0442a", - when="@1.12: arch=ppc64le:", - ) - - # Cherry-pick a patch to allow earlier versions of PyTorch to work with CUDA 11.4 - patch( - "https://github.com/pytorch/pytorch/commit/c74c0c571880df886474be297c556562e95c00e0.patch?full_index=1", - sha256="8ff7d285e52e4718bad1ca01ceb3bb6471d7828329036bb94222717fcaa237da", - when="@:1.9.1 ^cuda@11.4.100:", - ) - - @when("@1.5.0:") - def patch(self): - # https://github.com/pytorch/pytorch/issues/52208 - filter_file( - "torch_global_deps PROPERTIES LINKER_LANGUAGE C", - "torch_global_deps PROPERTIES LINKER_LANGUAGE CXX", - "caffe2/CMakeLists.txt", - ) - - def setup_build_environment(self, env): - """Set environment variables used to control the build. - - PyTorch's ``setup.py`` is a thin wrapper around ``cmake``. - In ``tools/setup_helpers/cmake.py``, you can see that all - environment variables that start with ``BUILD_``, ``USE_``, - or ``CMAKE_``, plus a few more explicitly specified variable - names, are passed directly to the ``cmake`` call. Therefore, - most flags defined in ``CMakeLists.txt`` can be specified as - environment variables. - """ - - def enable_or_disable(variant, keyword="USE", var=None, newer=False): - """Set environment variable to enable or disable support for a - particular variant. - - Parameters: - variant (str): the variant to check - keyword (str): the prefix to use for enabling/disabling - var (str): CMake variable to set. Defaults to variant.upper() - newer (bool): newer variants that never used NO_* - """ - if var is None: - var = variant.upper() - - # Version 1.1.0 switched from NO_* to USE_* or BUILD_* - # But some newer variants have always used USE_* or BUILD_* - if self.spec.satisfies("@1.1:") or newer: - if "+" + variant in self.spec: - env.set(keyword + "_" + var, "ON") - elif "~" + variant in self.spec: - env.set(keyword + "_" + var, "OFF") - else: - if "+" + variant in self.spec: - env.unset("NO_" + var) - elif "~" + variant in self.spec: - env.set("NO_" + var, "ON") - - # Build in parallel to speed up build times - env.set("MAX_JOBS", make_jobs) - - # Spack logs have trouble handling colored output - env.set("COLORIZE_OUTPUT", "OFF") - - enable_or_disable("test", keyword="BUILD") - enable_or_disable("caffe2", keyword="BUILD") - - enable_or_disable("cuda") - if "+cuda" in self.spec: - # cmake/public/cuda.cmake - # cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake - env.unset("CUDA_ROOT") - torch_cuda_arch = ";".join( - "{0:.1f}".format(float(i) / 10.0) for i in self.spec.variants["cuda_arch"].value - ) - env.set("TORCH_CUDA_ARCH_LIST", torch_cuda_arch) - if self.spec.satisfies("%clang"): - for flag in self.spec.compiler_flags["cxxflags"]: - if "gcc-toolchain" in flag: - env.set("CMAKE_CUDA_FLAGS", "=-Xcompiler={0}".format(flag)) - - enable_or_disable("rocm") - if "+rocm" in self.spec: - env.set("PYTORCH_ROCM_ARCH", ";".join(self.spec.variants["amdgpu_target"].value)) - env.set("HSA_PATH", self.spec["hsa-rocr-dev"].prefix) - env.set("ROCBLAS_PATH", self.spec["rocblas"].prefix) - env.set("ROCFFT_PATH", self.spec["rocfft"].prefix) - env.set("HIPFFT_PATH", self.spec["hipfft"].prefix) - env.set("HIPSPARSE_PATH", self.spec["hipsparse"].prefix) - env.set("HIP_PATH", self.spec["hip"].prefix) - env.set("HIPRAND_PATH", self.spec["rocrand"].prefix) - env.set("ROCRAND_PATH", self.spec["rocrand"].prefix) - env.set("MIOPEN_PATH", self.spec["miopen-hip"].prefix) - if "+nccl" in self.spec: - env.set("RCCL_PATH", self.spec["rccl"].prefix) - env.set("ROCPRIM_PATH", self.spec["rocprim"].prefix) - env.set("HIPCUB_PATH", self.spec["hipcub"].prefix) - env.set("ROCTHRUST_PATH", self.spec["rocthrust"].prefix) - env.set("ROCTRACER_PATH", self.spec["roctracer-dev"].prefix) - if self.spec.satisfies("^hip@5.2.0:"): - env.set("CMAKE_MODULE_PATH", self.spec["hip"].prefix.lib.cmake.hip) - - enable_or_disable("cudnn") - if "+cudnn" in self.spec: - # cmake/Modules_CUDA_fix/FindCUDNN.cmake - env.set("CUDNN_INCLUDE_DIR", self.spec["cudnn"].prefix.include) - env.set("CUDNN_LIBRARY", self.spec["cudnn"].libs[0]) - - enable_or_disable("fbgemm") - enable_or_disable("kineto") - enable_or_disable("magma") - enable_or_disable("metal") - enable_or_disable("mps") - enable_or_disable("breakpad") - - enable_or_disable("nccl") - if "+cuda+nccl" in self.spec: - env.set("NCCL_LIB_DIR", self.spec["nccl"].libs.directories[0]) - env.set("NCCL_INCLUDE_DIR", self.spec["nccl"].prefix.include) - - # cmake/External/nnpack.cmake - enable_or_disable("nnpack") - - enable_or_disable("numa") - if "+numa" in self.spec: - # cmake/Modules/FindNuma.cmake - env.set("NUMA_ROOT_DIR", self.spec["numactl"].prefix) - - # cmake/Modules/FindNumPy.cmake - enable_or_disable("numpy") - # cmake/Modules/FindOpenMP.cmake - enable_or_disable("openmp", newer=True) - enable_or_disable("qnnpack") - enable_or_disable("qnnpack", var="PYTORCH_QNNPACK") - enable_or_disable("valgrind") - enable_or_disable("xnnpack") - enable_or_disable("mkldnn") - enable_or_disable("distributed") - enable_or_disable("mpi") - # cmake/Modules/FindGloo.cmake - enable_or_disable("gloo", newer=True) - enable_or_disable("tensorpipe") - - if "+debug" in self.spec: - env.set("DEBUG", "ON") - else: - env.set("DEBUG", "OFF") - - if "+onnx_ml" in self.spec: - env.set("ONNX_ML", "ON") - elif "~onnx_ml" in self.spec: - env.set("ONNX_ML", "OFF") - - if not self.spec.satisfies("@master"): - env.set("PYTORCH_BUILD_VERSION", self.version) - env.set("PYTORCH_BUILD_NUMBER", 0) - - # BLAS to be used by Caffe2 - # Options defined in cmake/Dependencies.cmake and cmake/Modules/FindBLAS.cmake - if self.spec["blas"].name == "atlas": - env.set("BLAS", "ATLAS") - env.set("WITH_BLAS", "atlas") - elif self.spec["blas"].name in ["blis", "amdblis"]: - env.set("BLAS", "BLIS") - env.set("WITH_BLAS", "blis") - elif self.spec["blas"].name == "eigen": - env.set("BLAS", "Eigen") - elif self.spec["lapack"].name in ["libflame", "amdlibflame"]: - env.set("BLAS", "FLAME") - env.set("WITH_BLAS", "FLAME") - elif self.spec["blas"].name in ["intel-mkl", "intel-parallel-studio", "intel-oneapi-mkl"]: - env.set("BLAS", "MKL") - env.set("WITH_BLAS", "mkl") - # help find MKL - if self.spec["mkl"].name == "intel-oneapi-mkl": - env.set("INTEL_MKL_DIR", self.spec["mkl"].prefix.mkl.latest) - else: - env.set("INTEL_MKL_DIR", self.spec["mkl"].prefix.mkl) - elif self.spec["blas"].name == "openblas": - env.set("BLAS", "OpenBLAS") - env.set("WITH_BLAS", "open") - elif self.spec["blas"].name == "veclibfort": - env.set("BLAS", "vecLib") - env.set("WITH_BLAS", "veclib") - elif self.spec["blas"].name == "fujitsu-ssl2": - env.set("BLAS", "SSL2") - env.set("WITH_BLAS", "ssl2") - else: - env.set("BLAS", "Generic") - env.set("WITH_BLAS", "generic") - - # Don't use vendored third-party libraries when possible - env.set("BUILD_CUSTOM_PROTOBUF", "OFF") - env.set("USE_SYSTEM_NCCL", "ON") - env.set("USE_SYSTEM_EIGEN_INSTALL", "ON") - env.set("pybind11_DIR", self.spec["py-pybind11"].prefix) - env.set("pybind11_INCLUDE_DIR", self.spec["py-pybind11"].prefix.include) - if self.spec.satisfies("@1.10:"): - env.set("USE_SYSTEM_PYBIND11", "ON") - # https://github.com/pytorch/pytorch/issues/60334 - # if self.spec.satisfies("@1.8:"): - # env.set("USE_SYSTEM_SLEEF", "ON") - if self.spec.satisfies("@1.6:"): - # env.set("USE_SYSTEM_LIBS", "ON") - # https://github.com/pytorch/pytorch/issues/60329 - # env.set("USE_SYSTEM_CPUINFO", "ON") - # https://github.com/pytorch/pytorch/issues/60270 - # env.set("USE_SYSTEM_GLOO", "ON") - # https://github.com/Maratyszcza/FP16/issues/18 - # env.set("USE_SYSTEM_FP16", "ON") - env.set("USE_SYSTEM_PTHREADPOOL", "ON") - env.set("USE_SYSTEM_PSIMD", "ON") - env.set("USE_SYSTEM_FXDIV", "ON") - env.set("USE_SYSTEM_BENCHMARK", "ON") - # https://github.com/pytorch/pytorch/issues/60331 - # env.set("USE_SYSTEM_ONNX", "ON") - # https://github.com/pytorch/pytorch/issues/60332 - # env.set("USE_SYSTEM_XNNPACK", "ON") - - @run_before("install") - def build_amd(self): - if "+rocm" in self.spec: - python(os.path.join("tools", "amd_build", "build_amd.py")) - - @run_after("install") - @on_package_attributes(run_tests=True) - def install_test(self): - with working_dir("test"): - python("run_test.py") diff --git a/packages/py-torch/rocm.patch b/packages/py-torch/rocm.patch deleted file mode 100644 index b50cc7e1598a23f41e1e1a73e6672e6a4d132b6a..0000000000000000000000000000000000000000 --- a/packages/py-torch/rocm.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff --git a/aten/src/ATen/cuda/nvrtc_stub/ATenNVRTC.h b/aten/src/ATen/cuda/nvrtc_stub/ATenNVRTC.h -index 9cd678dfb4cc7..4630465115c7c 100644 ---- a/aten/src/ATen/cuda/nvrtc_stub/ATenNVRTC.h -+++ b/aten/src/ATen/cuda/nvrtc_stub/ATenNVRTC.h -@@ -67,6 +67,14 @@ namespace at { namespace cuda { - // - // HIP doesn't have - // cuGetErrorString (maps to non-functional hipGetErrorString___) -+// -+// HIP from ROCm 3.5 on renamed hipOccupancyMaxActiveBlocksPerMultiprocessor -+// to hipModuleOccupancyMaxActiveBlocksPerMultiprocessor. -+#if HIP_VERSION < 305 -+#define HIPOCCUPANCYMAXACTIVEBLOCKSPERMULTIPROCESSOR hipOccupancyMaxActiveBlocksPerMultiprocessor -+#else -+#define HIPOCCUPANCYMAXACTIVEBLOCKSPERMULTIPROCESSOR cuOccupancyMaxActiveBlocksPerMultiprocessor -+#endif - - #define AT_FORALL_NVRTC(_) \ - _(nvrtcVersion) \ -@@ -76,7 +84,7 @@ namespace at { namespace cuda { - _(nvrtcGetPTX) \ - _(cuModuleLoadData) \ - _(cuModuleGetFunction) \ -- _(cuOccupancyMaxActiveBlocksPerMultiprocessor) \ -+ _(HIPOCCUPANCYMAXACTIVEBLOCKSPERMULTIPROCESSOR)\ - _(nvrtcGetErrorString) \ - _(nvrtcGetProgramLogSize) \ - _(nvrtcGetProgramLog) \ -diff --git a/aten/src/ATen/native/cuda/SoftMax.cu b/aten/src/ATen/native/cuda/SoftMax.cu -index da1995123ecfc..f935eb4ef3d0e 100644 ---- a/aten/src/ATen/native/cuda/SoftMax.cu -+++ b/aten/src/ATen/native/cuda/SoftMax.cu -@@ -127,8 +127,8 @@ void SpatialSoftMax_getLaunchSizes( - uint32_t block_threads = block.x * block.y; - smem_size = block.x == 1 ? 0 : block_threads * sizeof(accscalar_t); - int max_active_blocks; --#ifdef __HIP_PLATFORM_HCC__ -- // XXX HIP function signature is not compatible yet. -+#if defined(__HIP_PLATFORM_HCC__) && HIP_VERSION < 305 -+ // HIP function signature is not compatible yet. - uint32_t max_blocks; - cudaOccupancyMaxActiveBlocksPerMultiprocessor(&max_blocks, - k, block_threads, smem_size); -diff --git a/torch/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp b/torch/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp -index 5586e49919727..27315ee475277 100644 ---- a/torch/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp -+++ b/torch/csrc/jit/codegen/fuser/cuda/fused_kernel.cpp -@@ -140,10 +140,10 @@ FusedKernelCUDA::FusedKernelCUDA( - nvrtc().cuModuleGetFunction(&function_, module_, name_.c_str())); - - // Computes max blocks --#ifdef __HIP_PLATFORM_HCC__ -- // XXX HIP function signature is not compatible yet -+#if defined(__HIP_PLATFORM_HCC__) && HIP_VERSION < 305 -+ // HIP function signature is not compatible yet - uint32_t max_blocks; -- AT_CUDA_DRIVER_CHECK(nvrtc().cuOccupancyMaxActiveBlocksPerMultiprocessor( -+ AT_CUDA_DRIVER_CHECK(nvrtc().hipOccupancyMaxActiveBlocksPerMultiprocessor( - &max_blocks, function_, 128, 0)); - maxBlocks_ = max_blocks; - #else -diff --git a/torch/utils/hipify/cuda_to_hip_mappings.py b/torch/utils/hipify/cuda_to_hip_mappings.py -index 7e21363cbe6af..26f269d92ae38 100644 ---- a/torch/utils/hipify/cuda_to_hip_mappings.py -+++ b/torch/utils/hipify/cuda_to_hip_mappings.py -@@ -2890,7 +2890,7 @@ - ( - "cuOccupancyMaxActiveBlocksPerMultiprocessor", - ( -- "hipOccupancyMaxActiveBlocksPerMultiprocessor", -+ "hipModuleOccupancyMaxActiveBlocksPerMultiprocessor", - CONV_OCCUPANCY, - API_DRIVER, - ), -@@ -2898,7 +2898,7 @@ - ( - "cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", - ( -- "hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", -+ "hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", - CONV_OCCUPANCY, - API_DRIVER, - HIP_UNSUPPORTED, -@@ -2906,12 +2906,12 @@ - ), - ( - "cuOccupancyMaxPotentialBlockSize", -- ("hipOccupancyMaxPotentialBlockSize", CONV_OCCUPANCY, API_DRIVER), -+ ("hipModuleOccupancyMaxPotentialBlockSize", CONV_OCCUPANCY, API_DRIVER), - ), - ( - "cuOccupancyMaxPotentialBlockSizeWithFlags", - ( -- "hipOccupancyMaxPotentialBlockSizeWithFlags", -+ "hipModuleOccupancyMaxPotentialBlockSizeWithFlags", - CONV_OCCUPANCY, - API_DRIVER, - HIP_UNSUPPORTED, diff --git a/packages/py-torch/sleef.patch b/packages/py-torch/sleef.patch deleted file mode 100644 index 67f0234162d1a1af29aa5c538b0e585c3261a81e..0000000000000000000000000000000000000000 --- a/packages/py-torch/sleef.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt -index 8025a7de3c..2e5cdbb5c9 100644 ---- a/caffe2/CMakeLists.txt -+++ b/caffe2/CMakeLists.txt -@@ -1232,6 +1232,7 @@ if (BUILD_TEST) - add_executable(${test_name} "${test_src}") - target_link_libraries(${test_name} ${Caffe2_MAIN_LIBS} gtest_main) - target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>) -+ target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>) - target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE}) - add_test(NAME ${test_name} COMMAND $<TARGET_FILE:${test_name}>) - if (INSTALL_TEST) diff --git a/packages/py-torch/xnnpack.patch b/packages/py-torch/xnnpack.patch deleted file mode 100644 index 154033081e7ff91867e9a043a93c46b888bfe8cb..0000000000000000000000000000000000000000 --- a/packages/py-torch/xnnpack.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt -index 8025a7de3c..0da37079d6 100644 ---- a/caffe2/CMakeLists.txt -+++ b/caffe2/CMakeLists.txt -@@ -46,12 +46,19 @@ if (INTERN_BUILD_ATEN_OPS) - list(APPEND Caffe2_DEPENDENCY_INCLUDE ${ATen_THIRD_PARTY_INCLUDE}) - endif() - -+# {Q/X,etc} NPACK support is enabled by default, if none of these options -+# are selected, turn this flag ON to incidate the support is disabled -+set(NNPACK_AND_FAMILY_DISABLED OFF) -+if(NOT (USE_NNPACK OR USE_QNNPACK OR USE_PYTORCH_QNNPACK OR USE_XNNPACK)) -+ set(NNPACK_AND_FAMILY_DISABLED ON) -+endif() -+ - # ---[ Caffe2 build - # Note: the folders that are being commented out have not been properly - # addressed yet. - - # For pthreadpool_new_if_impl. TODO: Remove when threadpools are unitied. --if (NOT MSVC) -+if (NOT MSVC AND NOT NNPACK_AND_FAMILY_DISABLED) - IF(NOT TARGET fxdiv) - SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") - SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") -@@ -710,7 +717,7 @@ ELSEIF(USE_CUDA) - ENDIF() - - --if (NOT MSVC) -+if (NOT MSVC AND NOT NNPACK_AND_FAMILY_DISABLED) - TARGET_LINK_LIBRARIES(torch_cpu PRIVATE fxdiv) - endif() - -diff --git a/caffe2/utils/CMakeLists.txt b/caffe2/utils/CMakeLists.txt -index 27aabb1315..3c7845c67d 100644 ---- a/caffe2/utils/CMakeLists.txt -+++ b/caffe2/utils/CMakeLists.txt -@@ -36,7 +36,7 @@ list(APPEND Caffe2_CPU_SRCS - # ---[ threadpool/pthreadpool* is a local modification of the NNPACK - # pthreadpool with a very similar interface. Neither NNPACK, nor this - # thread pool supports Windows. --if (NOT MSVC) -+if (NOT MSVC AND NOT NNPACK_AND_FAMILY_DISABLED) - add_definitions(-DUSE_INTERNAL_THREADPOOL_IMPL) - set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} - utils/threadpool/pthreadpool.cc diff --git a/packages/py-typish/package.py b/packages/py-typish/package.py deleted file mode 100644 index 00ecb2ac3213b66deff9a1aca7de6edde77a77de..0000000000000000000000000000000000000000 --- a/packages/py-typish/package.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack.package import * - - -class PyTypish(PythonPackage): - """Python library for type checking""" - - homepage = "https://github.com/ramonhagenaars/typish" - url = "https://github.com/ramonhagenaars/typish/archive/v1.9.2.tar.gz" - - version("1.9.3", sha256="16f8ff022b7009a91529e363d0484465be57797b9cc34a193ca7e3c4c597e4bc") - version("1.9.2", sha256="d0cd35aade6f974b2509771ac92aa1a5b4d9efe9c2c34127734539fd28e7145c") - - depends_on("py-setuptools", type="build") diff --git a/packages/r-irkernel/package.py b/packages/r-irkernel/package.py deleted file mode 100644 index 145aeeee0dd4c80b1dc76aac17087c4fb1a79a0e..0000000000000000000000000000000000000000 --- a/packages/r-irkernel/package.py +++ /dev/null @@ -1,43 +0,0 @@ -# this package was adapted from Spack upstream v0.19.2, to change the dependency on py-jupyter to py-jupyter-client - -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - - -from spack.package import * - - -class RIrkernel(RPackage): - """Native R Kernel for the 'Jupyter Notebook'. - - The R kernel for the 'Jupyter' environment executes R code which the - front-end ('Jupyter Notebook' or other front-ends) submits to the kernel - via the network.""" - - cran = "IRkernel" - - version("1.3.1", sha256="3186e3a177c7246d45218af55f8b10836540e68a2d106858a0385f7d741b640c") - version("1.3", sha256="5a7fcbfd978dfb3cca6702a68a21c147551995fc400084ae8382ffcbbdae1903") - version("1.2", sha256="5fb4dbdb741d05043120a8be0eb73f054b607d9854f314bd79cfec08d219ff91") - version( - "0.7", - git="https://github.com/IRkernel/IRkernel.git", - commit="9cdd284e03eb42d03fab18544b81f486852d5fe0", - deprecated=True, - ) - - depends_on("r@3.2.0:", type=("build", "run")) - depends_on("r-repr@0.4.99:", type=("build", "run")) - depends_on("r-evaluate@0.10:", type=("build", "run")) - depends_on("r-irdisplay@0.3.0.9999:", type=("build", "run")) - depends_on("r-pbdzmq@0.2-1:", type=("build", "run")) - depends_on("r-crayon", type=("build", "run")) - depends_on("r-jsonlite@0.9.6:", type=("build", "run")) - depends_on("r-uuid", type=("build", "run")) - depends_on("r-digest", type=("build", "run")) - depends_on("py-jupyter-client", type="run") - - depends_on("r-evaluate@0.5.4:", type=("build", "run"), when="@0.7") - depends_on("r-devtools", type=("build", "run"), when="@0.7") diff --git a/packages/suite-sparse/fix_cuda11.patch b/packages/suite-sparse/fix_cuda11.patch deleted file mode 100644 index 4d9e0fc1e1f88cd85cee511cbde8edeeab9de66b..0000000000000000000000000000000000000000 --- a/packages/suite-sparse/fix_cuda11.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- spack-src.orig/SuiteSparse_config/SuiteSparse_config.mk 2021-03-03 22:04:33.000000000 +0000 -+++ spack-src/SuiteSparse_config/SuiteSparse_config.mk 2021-04-13 16:21:57.426166357 +0000 -@@ -259,7 +259,6 @@ - MAGMA_LIB = -L/opt/magma-2.4.0/lib/ -lmagma - NVCC = $(CUDA_PATH)/bin/nvcc - NVCCFLAGS = -Xcompiler -fPIC -O3 \ -- -gencode=arch=compute_30,code=sm_30 \ - -gencode=arch=compute_35,code=sm_35 \ - -gencode=arch=compute_50,code=sm_50 \ - -gencode=arch=compute_53,code=sm_53 \ diff --git a/packages/suite-sparse/graphblas_libm_dep.patch b/packages/suite-sparse/graphblas_libm_dep.patch deleted file mode 100644 index 441b0eff8738dacaf877a34cf25109a54c440d9d..0000000000000000000000000000000000000000 --- a/packages/suite-sparse/graphblas_libm_dep.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/GraphBLAS/CMakeLists.txt -+++ b/GraphBLAS/CMakeLists.txt -@@ -87,6 +87,7 @@ - C_STANDARD_REQUIRED 11 - PUBLIC_HEADER "Include/GraphBLAS.h" ) - set_property ( TARGET graphblas PROPERTY C_STANDARD 11 ) -+target_link_libraries ( graphblas m ) - - # create the static graphblas library. Requires ANSI C11 - add_library ( graphblas_static STATIC ${GRAPHBLAS_SOURCES} ) diff --git a/packages/suite-sparse/package.py b/packages/suite-sparse/package.py deleted file mode 100644 index 97278496f0124105c35d343df8b4db27ae94b7e0..0000000000000000000000000000000000000000 --- a/packages/suite-sparse/package.py +++ /dev/null @@ -1,253 +0,0 @@ -# this package was adapted from Spack upstream v0.18.1, to fix build with GPU targets -# (see https://github.com/spack/spack/commit/e7238a0f2655cd1ffa19fe5ad21baf0acfb0a829) - -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack import * - - -class SuiteSparse(Package): - """ - SuiteSparse is a suite of sparse matrix algorithms - """ - homepage = 'https://people.engr.tamu.edu/davis/suitesparse.html' - url = 'https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/v4.5.3.tar.gz' - git = 'https://github.com/DrTimothyAldenDavis/SuiteSparse.git' - - version('5.10.1', sha256='acb4d1045f48a237e70294b950153e48dce5b5f9ca8190e86c2b8c54ce00a7ee') - version('5.10.0', sha256='4bcc974901c0173acf80c41ee0fd779eb7dce2871d4afa24a5d15b1a468f93e5') - version('5.9.0', sha256='7bdd4811f1cf0767c5fdb5e435817fdadee50b0acdb598f4882ae7b8291a7f24') - version('5.8.1', sha256='06726e471fbaa55f792578f9b4ab282ea9d008cf39ddcc3b42b73400acddef40') - version('5.8.0', sha256='94a9b7134eb4dd82b97f1a22a6b464feb81e73af2dcdf683c6f252285191df1d') - version('5.7.2', sha256='fe3bc7c3bd1efdfa5cffffb5cebf021ff024c83b5daf0ab445429d3d741bd3ad') - version('5.7.1', sha256='5ba5add1663d51a1b6fb128b50fe869b497f3096765ff7f8212f0ede044b9557') - version('5.6.0', sha256='76d34d9f6dafc592b69af14f58c1dc59e24853dcd7c2e8f4c98ffa223f6a1adb') - version('5.5.0', sha256='63c73451734e2bab19d1915796c6776565ea6aea5da4063a9797ecec60da2e3d') - version('5.4.0', sha256='d9d62d539410d66550d0b795503a556830831f50087723cb191a030525eda770') - version('5.3.0', sha256='d8ef4bee4394d2f07299d4688b83bbd98e9d3a2ebbe1c1632144b6f7095ce165') - version('5.2.0', sha256='68c431aef3d9a0b02e97803eb61671c5ecb9d36fd292a807db87067dadb36e53') - version('5.1.2', sha256='97dc5fdc7f78ff5018e6a1fcc841e17a9af4e5a35cebd62df6922349bf12959e') - version('5.1.0', sha256='0b0e03c63e67b04529bb6248808d2a8c82259d40b30fc5a7599f4b6f7bdd4dc6') - version('5.0.0', sha256='2f8694d9978033659f10ceb8bdb19147d3c519a0251b8de84be6ba8824d30517') - version('4.5.6', sha256='1c7b7a265a1d6c606095eb8aa3cb8e27821f1b7f5bc04f28df6d62906e02f4e4') - version('4.5.5', sha256='80d1d9960a6ec70031fecfe9adfe5b1ccd8001a7420efb50d6fa7326ef14af91') - version('4.5.3', sha256='b6965f9198446a502cde48fb0e02236e75fa5700b94c7306fc36599d57b563f4') - - variant('tbb', default=False, description='Build with Intel TBB') - variant('pic', default=True, description='Build position independent code (required to link with shared libraries)') - variant('cuda', default=False, description='Build with CUDA') - variant('openmp', default=False, description='Build with OpenMP') - variant('graphblas', default=False, description='Build with GraphBLAS (takes a long time to compile)') - - depends_on('mpfr@4.0.0:', type=('build', 'link'), when='@5.8.0:') - depends_on('gmp', type=('build', 'link'), when='@5.8.0:') - depends_on('blas') - depends_on('lapack') - depends_on('m4', type='build', when='@5.0.0:') - depends_on('cmake', when='+graphblas @5.2.0:', type='build') - - depends_on('metis@5.1.0', when='@4.5.1:') - # in @4.5.1. TBB support in SPQR seems to be broken as TBB-related linkng - # flags does not seem to be used, which leads to linking errors on Linux. - depends_on('tbb', when='@4.5.3:+tbb') - - depends_on('cuda', when='+cuda') - - patch('tbb_453.patch', when='@4.5.3:4.5.5+tbb') - - # This patch removes unsupported flags for pgi compiler - patch('pgi.patch', when='%pgi') - patch('pgi.patch', when='%nvhpc') - - # This patch adds '-lm' when linking libgraphblas and when using clang. - # Fixes 'libgraphblas.so.2.0.1: undefined reference to `__fpclassify'' - patch('graphblas_libm_dep.patch', when='+graphblas @5.2.0:5.2%clang') - - # CUDA-11 dropped sm_30 code generation, remove hardcoded sm_30 from makefile - # open issue: https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/56 - # Tested only with 5.9.0, previous versions probably work too - patch('fix_cuda11.patch', when='@5.9.0:5.10.0+cuda ^cuda@11:') - - conflicts('%gcc@:4.8', when='@5.2.0:', msg='gcc version must be at least 4.9 for suite-sparse@5.2.0:') - - # The @2021.x versions of tbb dropped the task_scheduler_init.h header and - # related stuff (which have long been deprecated). This appears to be - # rather problematic for suite-sparse (see e.g. - # https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/master/SPQR/Source/spqr_parallel.cpp) - # Have Spack complain if +tbb and trying to use a 2021.x version of tbb - conflicts('+tbb', when='^intel-oneapi-tbb@2021:', - msg='suite-sparse needs task_scheduler_init.h dropped in ' - 'recent tbb libs') - conflicts('+tbb', when='^intel-tbb@2021:', - msg='suite-sparse needs task_scheduler_init.h dropped in ' - 'recent tbb libs') - - def symbol_suffix_blas(self, spec, args): - """When using BLAS with a special symbol suffix we use defines to - replace blas symbols, e.g. dgemm_ becomes dgemm_64_ when - symbol_suffix=64_.""" - - # Currently only OpenBLAS does this. - if not spec.satisfies('^openblas'): - return - - suffix = spec['openblas'].variants['symbol_suffix'].value - if suffix == 'none': - return - - symbols = ( - 'dtrsv_', 'dgemv_', 'dtrsm_', 'dgemm_', 'dsyrk_', 'dger_', 'dscal_', - 'dpotrf_', 'ztrsv_', 'zgemv_', 'ztrsm_', 'zgemm_', 'zherk_', - 'zgeru_', 'zscal_', 'zpotrf_', - 'dnrm2_', 'dlarf_', 'dlarfg_', 'dlarft_', 'dlarfb_', 'dznrm2_', - 'zlarf_', 'zlarfg_', 'zlarft_', 'zlarfb_' - ) - - for symbol in symbols: - args.append('CFLAGS+=-D{0}={1}{2}'.format(symbol, symbol, suffix)) - - def install(self, spec, prefix): - # The build system of SuiteSparse is quite old-fashioned. - # It's basically a plain Makefile which include an header - # (SuiteSparse_config/SuiteSparse_config.mk)with a lot of convoluted - # logic in it. Any kind of customization will need to go through - # filtering of that file - - cc_pic_flag = self.compiler.cc_pic_flag if '+pic' in spec else '' - f77_pic_flag = self.compiler.f77_pic_flag if '+pic' in spec else '' - - make_args = [ - # By default, the Makefile uses the Intel compilers if - # they are found. The AUTOCC flag disables this behavior, - # forcing it to use Spack's compiler wrappers. - 'AUTOCC=no', - # CUDA=no does NOT disable cuda, it only disables internal search - # for CUDA_PATH. If in addition the latter is empty, then CUDA is - # completely disabled. See - # [SuiteSparse/SuiteSparse_config/SuiteSparse_config.mk] for more. - 'CUDA=no', - 'CUDA_PATH=%s' % (spec['cuda'].prefix if '+cuda' in spec else ''), - 'CFOPENMP=%s' % (self.compiler.openmp_flag - if '+openmp' in spec else ''), - 'CFLAGS=-O3 %s' % cc_pic_flag, - # Both FFLAGS and F77FLAGS are used in SuiteSparse makefiles; - # FFLAGS is used in CHOLMOD, F77FLAGS is used in AMD and UMFPACK. - 'FFLAGS=%s' % f77_pic_flag, - 'F77FLAGS=%s' % f77_pic_flag, - # use Spack's metis in CHOLMOD/Partition module, - # otherwise internal Metis will be compiled - 'MY_METIS_LIB=%s' % spec['metis'].libs.ld_flags, - 'MY_METIS_INC=%s' % spec['metis'].prefix.include, - # Make sure Spack's Blas/Lapack is used. Otherwise System's - # Blas/Lapack might be picked up. Need to add -lstdc++, following - # with the TCOV path of SparseSuite 4.5.1's Suitesparse_config.mk, - # even though this fix is ugly - 'BLAS=%s' % (spec['blas'].libs.ld_flags + ( - ' -lstdc++' if '@4.5.1' in spec else '')), - 'LAPACK=%s' % spec['lapack'].libs.ld_flags, - ] - - # Recent versions require c11 but some demos do not get the c11 from - # GraphBLAS/CMakeLists.txt, for example the file - # GraphBLAS/Demo/Program/wildtype_demo.c. For many compilers this is - # not an issue because c11 or newer is their default. However, for some - # compilers (e.g. xlc) the c11 flag is necessary. - if spec.satisfies('@5.4:5.7.1') and ('%xl' in spec or '%xl_r' in spec): - make_args += ['CFLAGS+=%s' % self.compiler.c11_flag] - - # 64bit blas in UMFPACK: - if (spec.satisfies('^openblas+ilp64') or - spec.satisfies('^intel-mkl+ilp64') or - spec.satisfies('^intel-parallel-studio+mkl+ilp64')): - make_args.append('UMFPACK_CONFIG=-DLONGBLAS="long long"') - - # Handle symbol suffix of some BLAS'es (e.g. 64_ or _64 for ilp64) - self.symbol_suffix_blas(spec, make_args) - - # SuiteSparse defaults to using '-fno-common -fexceptions' in - # CFLAGS, but not all compilers use the same flags for these - # optimizations - if any([x in spec for x in - ('%apple-clang', '%clang', '%gcc', '%intel', '%fj')]): - make_args += ['CFLAGS+=-fno-common -fexceptions'] - elif '%pgi' in spec: - make_args += ['CFLAGS+=--exceptions'] - - if spack_f77.endswith('xlf') or spack_f77.endswith('xlf_r'): - make_args += ['CFLAGS+=-DBLAS_NO_UNDERSCORE'] - - # Intel TBB in SuiteSparseQR - if '+tbb' in spec: - make_args += [ - 'SPQR_CONFIG=-DHAVE_TBB', - 'TBB=%s' % spec['tbb'].libs.ld_flags, - ] - - if '@5.3:' in spec: - # Without CMAKE_LIBRARY_PATH defined, the CMake file in the - # Mongoose directory finds libsuitesparseconfig.so in system - # directories like /usr/lib. - make_args += [ - 'CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX=%s' % prefix + - ' -DCMAKE_LIBRARY_PATH=%s' % prefix.lib] - - make_args.append('INSTALL=%s' % prefix) - - # Filter the targets we're interested in - targets = [ - 'SuiteSparse_config', - 'AMD', - 'BTF', - 'CAMD', - 'CCOLAMD', - 'COLAMD', - 'CHOLMOD', - 'CXSparse', - 'LDL', - 'KLU', - 'UMFPACK', - 'RBio', - ] - if spec.satisfies('+cuda'): - targets.extend([ - 'SuiteSparse_GPURuntime', - 'GPUQREngine' - ]) - targets.extend([ - 'SPQR' - ]) - if spec.satisfies('+graphblas'): - targets.append('GraphBLAS') - if spec.satisfies('@5.8.0:'): - targets.append('SLIP_LU') - - # Finally make and install - make('-C', 'SuiteSparse_config', 'library', 'config') - for target in targets: - make('-C', target, 'library', *make_args) - make('-C', target, 'install', *make_args) - - @run_after('install') - def fix_darwin_install(self): - # The shared libraries are not installed correctly on Darwin: - # See https://github.com/DrTimothyAldenDavis/SuiteSparse/issues/42 - if '+pic platform=darwin' in self.spec: - fix_darwin_install_name(self.spec.prefix.lib) - - @property - def libs(self): - """Export the libraries of SuiteSparse. - Sample usage: spec['suite-sparse'].libs.ld_flags - spec['suite-sparse:klu,btf'].libs.ld_flags - """ - # Component libraries, ordered by dependency. Any missing components? - all_comps = ['klu', 'btf', 'umfpack', 'cholmod', 'colamd', 'amd', - 'camd', 'ccolamd', 'cxsparse', 'ldl', 'rbio', 'spqr', - 'suitesparseconfig'] - query_parameters = self.spec.last_query.extra_parameters - comps = all_comps if not query_parameters else query_parameters - return find_libraries(['lib' + c for c in comps], root=self.prefix.lib, - shared=True, recursive=False) diff --git a/packages/suite-sparse/pgi.patch b/packages/suite-sparse/pgi.patch deleted file mode 100644 index f615a5767476418014894420289fd91d726b4498..0000000000000000000000000000000000000000 --- a/packages/suite-sparse/pgi.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/SuiteSparse_config/SuiteSparse_config.mk -+++ b/SuiteSparse_config/SuiteSparse_config.mk -@@ -89,7 +89,8 @@ - - # The CF macro is used by SuiteSparse Makefiles as a combination of - # CFLAGS, CPPFLAGS, TARGET_ARCH, and system-dependent settings. -- CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fexceptions -fPIC -+ #CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fexceptions -fPIC -+ CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fPIC - - #--------------------------------------------------------------------------- - # OpenMP is used in CHOLMOD diff --git a/packages/suite-sparse/tbb_453.patch b/packages/suite-sparse/tbb_453.patch deleted file mode 100644 index 70241ed01745309cc82943db8c2c49261a590221..0000000000000000000000000000000000000000 --- a/packages/suite-sparse/tbb_453.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SPQR/Lib/Makefile b/SPQR/Lib/Makefile -index eaade58..d0de852 100644 ---- a/SPQR/Lib/Makefile -+++ b/SPQR/Lib/Makefile -@@ -13,7 +13,7 @@ ccode: all - include ../../SuiteSparse_config/SuiteSparse_config.mk - - # SPQR depends on CHOLMOD, AMD, COLAMD, LAPACK, the BLAS and SuiteSparse_config --LDLIBS += -lamd -lcolamd -lcholmod -lsuitesparseconfig $(LAPACK) $(BLAS) -+LDLIBS += -lamd -lcolamd -lcholmod -lsuitesparseconfig $(TBB) $(LAPACK) $(BLAS) - - # compile and install in SuiteSparse/lib - library: