Skip to content
Snippets Groups Projects
Commit 1b33064b authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

feat: align packages with Spack v0.23.0 upstream

parent 13bff2c4
No related branches found
No related tags found
3 merge requests!651create new experimental release,!650update spack version to v0.23.1,!633update spack version to v0.23.0
Showing
with 112 additions and 859 deletions
# Copyright 2013-2024 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 Ambertools (CMakePackage):
"""AmberTools is a free, useful standalone package and a prerequisite for installing Amber itself.
The AmberTools suite is free of charge, and its components are mostly released under the GNU General Public License (GPL).
A few components are included that are in the public domain or which have other, open-source, licenses.
The libsander and libpbsa libraries use the LGPL license."""
# Set the homepage and download url
homepage = "http://ambermd.org/AmberTools.php"
url = "http://ambermd.org/downloads/AmberTools22jlmrcc.tar.bz2"
# Set the gitlab accounts of this package maintainers
maintainers = ['dbeltran', 'elmath']
version('22jlmrcc', sha256='1571d4e0f7d45b2a71dce5999fa875aea8c90ee219eb218d7916bf30ea229121')
# Dependencies
depends_on("flex", type="build") # This is necessary for sure (experimentally tested)
depends_on("bison", type="build") # This is necessary for sure (experimentally tested)
depends_on("tcsh", type="build")
depends_on("zlib", type=("build", "link", "run"))
depends_on("bzip2", type=("build", "run"))
depends_on("blas", type=("build", "run"))
depends_on("lapack", type=("build", "run"))
depends_on("arpack-ng", type=("build", "run"))
depends_on("netcdf-c", type=("build", "run"))
depends_on("netcdf-fortran", type=("build", "run"))
depends_on("fftw", type=("build", "run"))
depends_on("readline", type=("build", "run"))
depends_on("netlib-xblas~plain_blas", type=("build", "run"))
# specific variants needed for boost - from the build log "Could NOT find Boost (missing: thread system program_options iostreams regex timer chrono filesystem graph)"
depends_on("boost+thread+system+program_options+iostreams+regex+timer+chrono+filesystem+graph", type=("build", "run"))
# Python dependencies
# WARNING: If a python 3.8 version is already installed in spack then the '+tkinter' variant makes spack ignore the version
# WARNING: Spack may try to install the preferred python version (i.e. python 3.10.8)
# WARNING: The soultion is uninstall python and reinstall with this variant
depends_on('python@3.8: +tkinter', type=('build', 'run'))
depends_on("py-numpy", type=("build", "run"))
depends_on("py-matplotlib", type=("build", "run"))
depends_on("py-scipy", type=("build", "run"))
def cmake_args(self):
# Translated from ambertools build/run_cmake script
# We also add the TRUST_SYSTEM_LIBS argument that is mentioned in the ambertools CMake guide
# https://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Guide-to-Options
args = [
self.define("COMPILER", "GNU"),
self.define("MPI", False),
self.define("CUDA", False),
self.define("INSTALL_TESTS", True),
self.define("DOWNLOAD_MINICONDA", False),
self.define("TRUST_SYSTEM_LIBS", True),
# This is to avoid the x11 (X11_Xext_LIB) error
# It is equivalent to the '-noX11' flag accoridng to the docs:
# https://ambermd.org/pmwiki/pmwiki.php/Main/CMake-Common-Options
self.define("BUILD_GUI", False)
]
return args
def setup_run_environment(self, env):
env.set("AMBER_PREFIX", self.prefix)
env.set("AMBERHOME", self.prefix)
def setup_build_environment(self, env):
env.set("AMBER_PREFIX", self.prefix)
env.set("AMBERHOME", self.prefix)
@run_after('install')
@on_package_attributes(run_tests=True)
def check_install(self):
make("test.serial")
--- 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) {
--- 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.
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)
--- 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."""
--- 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):
--- 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"
--- 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"
--- 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 \
--- 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}"
--- 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"
--- 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 --color=auto --color=auto -Naur a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 1980-01-01 00:00:00
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 2024-02-15 13:36:37
@@ -143,7 +143,7 @@
LabelConstants.EXPERIMENTAL_EXTERNAL_PATH_PREFIX.getRelative(
execPath.relativeTo(execRoot.getParentDirectory()));
} else {
- absolutePathProblems.add(execPathFragment.getPathString());
+ // absolutePathProblems.add(execPathFragment.getPathString());
continue;
}
}
......@@ -18,8 +18,23 @@ class Bazel(Package):
homepage = "https://bazel.build/"
url = "https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-dist.zip"
maintainers("LydDeb")
tags = ["build-tools"]
license("Apache-2.0")
version("7.0.2", sha256="dea2b90575d43ef3e41c402f64c2481844ecbf0b40f8548b75a204a4d504e035")
version("7.0.1", sha256="596b13e071d27c43343ec8f5d263cb5312fafe7ef8702401f7ed492f182f4e6c")
version("7.0.0", sha256="477e54f6374001f439a9471ba1de9d7824daf129db95510849ecc5e19ce88170")
version("6.5.0", sha256="fc89da919415289f29e4ff18a5e01270ece9a6fe83cb60967218bac4a3bb3ed2")
version("6.4.0", sha256="bd88ff602c8bbb29ee82ba2a6b12ad092d51ec668c6577f9628f18e48ff4e51e")
version("6.3.2", sha256="8cd7feac58193be2bcba451ba6688a46824d37ca6359ff58e0d44eb98f042948")
version("6.3.1", sha256="2676319e86c5aeab142dccd42434364a33aa330a091c13562b7de87a10e68775")
version("6.3.0", sha256="902198981b1d26112fc05913e79f1b3e9772c3f95594caf85619d041ba06ede0")
version("6.2.1", sha256="4cf4d264bff388ee0012735728630d23832d3c9d021383b2fadceadb0775dd6b")
version("6.2.0", sha256="f1e8f788637ac574d471d619d2096baaca04a19b57a034399e079633db441945")
version("6.1.2", sha256="6fb3ee22fe9fa86d82e173572d504c089f10825d749725592626e090b38c9679")
version("6.1.1", sha256="6b900f26d676c7eca1d2e7dff9b71890dabd3ff59cab2a2d2178bc8a0395342a")
version("6.1.0", sha256="c4b85675541cf66ee7cb71514097fdd6c5fc0e02527243617a4f20ca6b4f2932")
version("6.0.0", sha256="7bc0c5145c19a56d82a08fce6908c5e1a0e75e4fbfb3b6f12b4deae7f4b38cbc")
......@@ -31,6 +46,7 @@ class Bazel(Package):
version("5.1.1", sha256="7f5d3bc1d344692b2400f3765fd4b5c0b636eb4e7a8a7b17923095c7b56a4f78")
version("5.1.0", sha256="4de301f509fc6d0cbc697b2017384ecdc94df8f36245bbcbedc7ea6780acc9f5")
version("5.0.0", sha256="072dd62d237dbc11e0bac02e118d8c2db4d0ba3ba09f1a0eb1e2a460fb8419db")
version("4.2.4", sha256="d5ba2ef28da5275f22e832aaa7f9319c61ea5db9b6a3e23b28a6a64ad03078f3")
version("4.2.3", sha256="b0e84d0538f3ec2b95a49bae31a5066f0967281a3ca99965016fbe178acd2d3d")
version("4.2.2", sha256="9981d0d53a356c4e87962847750a97c9e8054e460854748006c80f0d7e2b2d33")
version("4.2.1", sha256="12ea7aa11e2bdb12de1dceb9939a22e96f5a480437cb17c123379d8e0fdf5e82")
......@@ -55,356 +71,6 @@ class Bazel(Package):
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",
......@@ -418,45 +84,30 @@ class Bazel(Package):
# end EBRAINS
# 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")
patch("bazelruleclassprovider-0.25.patch")
# 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")
patch("unix_cc_configure-0.15.patch", when="@:2")
# Set CC and CXX
# begin EBRAINS (modified): bring upstream after checking since when this is breaking the build
patch("compile-0.29.patch", when="@0.29:5.3")
patch("compile-0.29.patch", when="@:5.3")
# end EBRAINS
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")
patch("cppcompileaction-7.0.0.patch", when="@7: +nodepfail")
patch("cppcompileaction-0.3.2.patch", when="@:6 +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")
patch("apple-clang-14.0.3.patch", when="@:4.2.3,5:6.1.1")
# https://github.com/bazelbuild/bazel/issues/17958
patch(
......@@ -465,56 +116,85 @@ class Bazel(Package):
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("blaze_util_posix-0.29.1.patch", when="%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.",
)
patch("unix_cc_configure_fj-0.29.1.patch", when="@:4%fj")
patch("bazelruleclassprovider_fj-0.25.patch", when="%fj")
# https://blog.bazel.build/2021/05/21/bazel-4-1.html
conflicts("platform=darwin target=aarch64:", when="@:4.0")
# patches for compiling various older bazels which had ICWYU
# violations revealed by (but not unique to) GCC 11 header changes.
# these are derived from
# https://github.com/bazelbuild/bazel/issues/18642
patch(
"https://github.com/bazelbuild/bazel/pull/20785.patch?full_index=1",
sha256="85dde31d129bbd31e004c5c87f23cdda9295fbb22946dc6d362f23d83bae1fd8",
when="@6.0:6.4",
)
conflicts("%gcc@13:", when="@:5")
# Patches for compiling various older bazels which had ICWYU violations revealed by
# (but not unique to) GCC 11 header changes. These are derived from
# https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29084/
patch("gcc11_1.patch", when="@0.3.2:4")
patch("gcc11_2.patch", when="@0.3.2:4")
patch("gcc11_3.patch", when="@0.3:4")
patch("gcc11_1.patch", when="@:4")
patch("gcc11_2.patch", when="@:4")
patch("gcc11_3.patch", when="@:4")
patch("gcc11_4.patch", when="@4.1:4")
# 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:")
# 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("@4.0.0", when="%gcc@11:")
# https://github.com/bazelbuild/bazel/pull/23667
conflicts("%apple-clang@16:", when="@:7.3")
executables = ["^bazel$"]
# Download resources to perform offline build with bazel.
# The following URLs and sha256 are in the file distdir_deps.bzl at the root of bazel sources.
resource_dictionary = {}
resource_dictionary["bazel_skylib"] = {
"url": "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.1/bazel-skylib-1.0.1.tar.gz",
"sha256": "f1c8360c01fcf276778d3519394805dc2a71a64274a3a0908bc9edff7b5aebc8",
"when": "@4:6",
}
resource_dictionary["com_google_absl"] = {
"url": "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz",
"sha256": "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5",
"when": "@6.0:6.4",
}
resource_dictionary["zulu_11_56_19"] = {
"url": "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.56.19-ca-jdk11.0.15-linux_x64.tar.gz",
"sha256": "e064b61d93304012351242bf0823c6a2e41d9e28add7ea7f05378b7243d34247",
"when": "@6",
}
resource_dictionary["zulu_11_50_19"] = {
"url": "https://mirror.bazel.build/openjdk/azul-zulu11.50.19-ca-jdk11.0.12/zulu11.50.19-ca-jdk11.0.12-linux_x64.tar.gz",
"sha256": "b8e8a63b79bc312aa90f3558edbea59e71495ef1a9c340e38900dd28a1c579f3",
"when": "@5",
}
resource_dictionary["zulu_11_37_17"] = {
"url": "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz",
"sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
"when": "@4",
}
for resource_name in resource_dictionary.keys():
resource(
when=resource_dictionary[resource_name]["when"],
name=resource_name,
url=resource_dictionary[resource_name]["url"],
sha256=resource_dictionary[resource_name]["sha256"],
destination="archive",
expand=False,
)
@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)
# begin EBRAINS (added)
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("GCC_HOST_COMPILER_PREFIX", self.spec['binutils'].prefix.bin)
......@@ -526,19 +206,25 @@ class Bazel(Package):
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"
# begin EBRAINS (modified): bring upstream after checking since when the compile-x.patch is breaking the build
# expose CC and CXX (the spack compiler wrappers)
" --action_env=CC"
" --action_env=CXX"
# end EBRAINS
" --jobs={0}".format(make_jobs),
# .WARNING: Option 'host_javabase' is deprecated
# Use local java installation
# begin EBRAINS (modified): expose CC and CXX (the spack compiler wrappers)
args = "--color=no --define=ABSOLUTE_JAVABASE={0} --verbose_failures --action_env=CC --action_env=CXX --jobs={1}".format(
self.spec["java"].prefix, make_jobs
)
# end EBRAINS
resource_stages = self.stage[1:]
for _resource in resource_stages:
try:
resource_name = _resource.resource.name
if self.spec.satisfies(self.resource_dictionary[resource_name]["when"]):
archive_path = _resource.source_path
args += " --distdir={0}".format(archive_path)
except AttributeError:
continue
env.set("EXTRA_BAZEL_ARGS", args)
@run_before("install")
def bootstrap(self):
......
--- 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):
--- 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 -uNr gcc-7.2.0.orig/libstdc++-v3/include/Makefile.in gcc-7.2.0/libstdc++-v3/include/Makefile.in
--- gcc-7.2.0.orig/libstdc++-v3/include/Makefile.in 2017-07-25 14:05:07.000000000 -0400
+++ gcc-7.2.0/libstdc++-v3/include/Makefile.in 2017-09-02 12:22:08.000000000 -0400
@@ -1764,6 +1764,8 @@
@GLIBCXX_HOSTED_TRUE@install-data-local: install-headers
@GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers
+.NOTPARALLEL: install-headers
+
# This is a subset of the full install-headers rule. We only need <ciso646>,
# <cstddef>, <cfloat>, <limits>, <climits>, <cstdint>, <cstdlib>, <new>,
# <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
--- a/gcc/genconditions.c 2019-01-01 12:37:19.064943662 +0100
+++ b/gcc/genconditions.c 2019-10-11 10:57:11.464595789 +0200
@@ -57,8 +57,9 @@ write_header (void)
\n\
/* It is necessary, but not entirely safe, to include the headers below\n\
in a generator program. As a defensive measure, don't do so when the\n\
- table isn't going to have anything in it. */\n\
-#if GCC_VERSION >= 3001\n\
+ table isn't going to have anything in it.\n\
+ Clang 9 is buggy and doesn't handle __builtin_constant_p correctly. */\n\
+#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
\n\
/* Do not allow checking to confuse the issue. */\n\
#undef CHECKING_P\n\
@@ -170,7 +171,7 @@ struct c_test\n\
vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\
optimizing. */\n\
\n\
-#if GCC_VERSION >= 3001\n\
+#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
static const struct c_test insn_conditions[] = {\n");
traverse_c_tests (write_one_condition, 0);
@@ -191,7 +192,7 @@ write_writer (void)
" unsigned int i;\n"
" const char *p;\n"
" puts (\"(define_conditions [\");\n"
- "#if GCC_VERSION >= 3001\n"
+ "#if GCC_VERSION >= 3001 && __clang_major__ < 9\n"
" for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
" {\n"
" printf (\" (%d \\\"\", insn_conditions[i].value);\n"
diff --git a/gcc/configure b/gcc/configure
index 9523773..52b0bf7 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -24884,7 +24884,7 @@ if test "${gcc_cv_as_ix86_filds+set}" = set; then :
else
gcc_cv_as_ix86_filds=no
if test x$gcc_cv_as != x; then
- $as_echo 'filds mem; fists mem' > conftest.s
+ $as_echo 'filds (%ebp); fists (%ebp)' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
@@ -24915,7 +24915,7 @@ if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
else
gcc_cv_as_ix86_fildq=no
if test x$gcc_cv_as != x; then
- $as_echo 'fildq mem; fistpq mem' > conftest.s
+ $as_echo 'fildq (%ebp); fistpq (%ebp)' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 68b0ee8..bd53978 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3869,13 +3869,13 @@ foo: nop
gcc_GAS_CHECK_FEATURE([filds and fists mnemonics],
gcc_cv_as_ix86_filds,,,
- [filds mem; fists mem],,
+ [filds (%ebp); fists (%ebp)],,
[AC_DEFINE(HAVE_AS_IX86_FILDS, 1,
[Define if your assembler uses filds and fists mnemonics.])])
gcc_GAS_CHECK_FEATURE([fildq and fistpq mnemonics],
gcc_cv_as_ix86_fildq,,,
- [fildq mem; fistpq mem],,
+ [fildq (%ebp); fistpq (%ebp)],,
[AC_DEFINE(HAVE_AS_IX86_FILDQ, 1,
[Define if your assembler uses fildq and fistq mnemonics.])])
From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@codesourcery.com>
Date: Sat, 21 Dec 2013 00:30:18 +0000
Subject: [PATCH] don't try to mark local symbols as no-dead-strip
---
gcc/config/darwin.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 40804b8..0080299 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
void
darwin_mark_decl_preserved (const char *name)
{
+ /* Actually we shouldn't mark any local symbol this way, but for now
+ this only happens with ObjC meta-data. */
+ if (darwin_label_is_anonymous_local_objc_name (name))
+ return;
+
fprintf (asm_out_file, "\t.no_dead_strip ");
assemble_name (asm_out_file, name);
fputc ('\n', asm_out_file);
--
2.2.1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment