Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rshimoura/ebrains-spack-builds
  • ziaee/ebrains-spack-builds
  • hl11/ebrains-spack-builds
  • filippomarchetti/ebrains-spack-builds
  • jkaiser/ebrains-spack-builds
  • hjorth/ebrains-spack-builds-sept-2024
  • dsegebarth/ebrains-spack-builds
  • kozlov/ebrains-spack-builds
  • dsegebarth/ebrains-spack-builds-na-3
  • ansimsek/ebrains-spack-builds
  • lupoc/ebrains-spack-builds
  • hartmut/ebrains-spack-builds
  • ri/tech-hub/platform/esd/ebrains-spack-builds
  • lcalori0/ebrains-spack-builds
  • deepu/ebrains-spack-builds
  • noelp/ebrains-spack-builds
16 results
Show changes
Showing
with 498 additions and 539 deletions
This diff is collapsed.
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.
--- 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));
}
}
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,
--- 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."""
# 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 BiobbCommon(PythonPackage):
"""Biobb_common is the base package required to use the biobb packages"""
# Homepage and download url
homepage = "https://github.com/bioexcel/biobb_common"
url = "https://github.com/bioexcel/biobb_common/archive/refs/tags/v3.8.1.tar.gz"
maintainers = ['dbeltran']
# Versions
version('3.8.1', sha256='b6c939c1445ea2f8282e491e0414cc15f4934466ca24ecd77e24cef2e7df49e4')
# Dependencies
depends_on('py-setuptools')
depends_on('python@3.8:', type=('build', 'run'))
depends_on('py-pyyaml', type=('build', 'run'))
depends_on('py-requests', type=('build', 'run'))
depends_on('py-biopython@1.78:1.80', type=('build', 'run'))
# 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 BiobbGromacs(PythonPackage):
"""Biobb_gromacs is the Biobb module collection to perform molecular
dynamics simulations using Gromacs"""
# Homepage and download url
homepage = "https://github.com/bioexcel/biobb_gromacs"
url = "https://github.com/bioexcel/biobb_gromacs/archive/refs/tags/v3.8.1.tar.gz"
maintainers = ['dbeltran']
# Versions
version('3.8.1', sha256='6da49b691b14a8bcf7ffca08c898fe9affd258ca2f8c7be4981df840a6907efa')
# Dependencies
depends_on('python@3.8:',type=('build', 'run'))
depends_on('biobb-common@3.8.1', type=('build', 'run'), when='@3.8.1')
depends_on('gromacs')
# 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)
import os
import unittest.mock
import xml.etree.ElementTree as ET
from spack.package import *
from spack.util.environment import EnvironmentModifications
import spack.build_environment
class BuildBrainscales(WafPackage):
"""Common stuff for BrainScaleS packages..."""
version(
"10.0-a1",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-10.0-a1",
commit="d9bd675b446be8f313972aef2d6657ffbbb91ed2",
submodules=True,
)
version(
"9.0-a9",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-9.0-a9",
commit="41d2597bd6c1c20aee4d538c42c248195a133680",
submodules=True,
)
version(
"9.0-a8",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-9.0-a8",
commit="44323be431da4b4b43890815f453c27207dee0b2",
submodules=True,
)
version(
"9.0-a7",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-9.0-a7",
commit="2337adc6a33f907900d2b8be5d9f0b15872a200a",
submodules=True,
)
version(
"9.0-a6",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-9.0-a6",
commit="e9b6746edb5e8465ae2848556b70e4edd555182e",
submodules=True,
)
version(
"9.0-a5",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-9.0-a5",
commit="5fcb0682626d83c089e016aaf433e0938e921634",
submodules=True,
)
version(
"9.0-a4",
git="https://github.com/electronicvisions/releases-ebrains",
tag="ebrains-9.0-a4",
commit="8d5be2a23ac1eb0129bdf1f83fb0a1c5193c4c85",
submodules=True,
)
# common dependencies of BuildBrainscales-derived packages
depends_on('oppulance@9.0-a9', when='@10.0-a1', type=('build', 'link', 'run', 'test')) # keep the old one for now
depends_on('oppulance@9.0-a9', when='@9.0-a9', type=('build', 'link', 'run', 'test'))
depends_on('oppulance@9.0-a8', when='@9.0-a8', type=('build', 'link', 'run', 'test'))
depends_on('oppulance@9.0-a7', when='@9.0-a7', type=('build', 'link', 'run', 'test'))
depends_on('oppulance@9.0-a6', when='@9.0-a6', type=('build', 'link', 'run', 'test'))
depends_on('oppulance@9.0-a5', when='@9.0-a5', type=('build', 'link', 'run', 'test'))
depends_on('oppulance@9.0-a4', when='@9.0-a4', type=('build', 'link', 'run', 'test'))
# waf setup performs git clone and might query gerrit
depends_on('git', type=('build', 'link'))
depends_on('py-git-review', type=('build', 'link'))
# old BrainScaleS EBRAINS releases used `waf setup --project=X` to download
# sources of the dependent repositories
@when("@:8")
def do_fetch(self, mirror_only=False):
"""Setup the project."""
self.stage.create()
self.stage.fetch(mirror_only)
# if fetcher didn't do anything, it's cached already
if not os.path.exists(self.stage.source_path):
return
with working_dir(self.stage.source_path):
python = which('python3')
if self.spec.satisfies('@:7'):
python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
'--clone-depth=2',
'--without-munge',
'--without-hxcomm-hostarq',
'--without-hxcomm-extoll',
'--project=' + str(self.spec.name),
'--release-branch=ebrains-' + str(self.spec.version)
)
else:
python('./waf', 'setup', '--repo-db-url=https://github.com/electronicvisions/projects',
'--clone-depth=2',
'--without-munge',
'--without-hxcomm-hostarq',
'--project=' + str(self.spec.name),
'--release-branch=ebrains-' + str(self.spec.version)
)
# in the configure step, we need access to all archived .git folders
def custom_archive(self, destination):
super(spack.fetch_strategy.GitFetchStrategy, self).archive(destination)
with unittest.mock.patch('spack.fetch_strategy.GitFetchStrategy.archive', new=custom_archive):
self.stage.cache_local()
# new BrainScaleS EBRAINS releases use git submodules to download sources;
# we still need to keep the `.git/` folders of the submodules in the source cache though
@when("@9:")
def do_fetch(self, mirror_only=False):
# in the configure step, we need access to all archived .git folders
def custom_archive(self, destination):
super(spack.fetch_strategy.GitFetchStrategy, self).archive(destination)
with unittest.mock.patch('spack.fetch_strategy.GitFetchStrategy.archive', new=custom_archive):
super(BuildBrainscales, self).do_fetch(mirror_only)
def _setup_common_env(self, env):
# grenade needs to find some libraries for the JIT-compilation of
# programs for BrainScaleS-2's embedded processor.
ppu_include_dirs = []
ppu_dep_names = ['bitsery', 'boost', 'cereal']
for ppu_dep_name in ppu_dep_names:
dep = self.spec[ppu_dep_name]
dep_include_dirs = set(dep.headers.directories)
ppu_include_dirs.extend(list(dep_include_dirs))
for dir in reversed(ppu_include_dirs):
env.prepend_path("C_INCLUDE_PATH", dir)
env.prepend_path("CPLUS_INCLUDE_PATH", dir)
def setup_build_environment(self, env):
my_envmod = EnvironmentModifications(env)
spack.build_environment.set_wrapper_variables(self, my_envmod)
my_env = {}
my_envmod.apply_modifications(my_env)
def get_path(env, name):
path = env.get(name, "").strip()
if path:
return path.split(os.pathsep)
return []
# spack tries to find headers and libraries by itself (i.e. it's not
# relying on the compiler to find it); we explicitly expose the
# spack-provided env vars that contain include and library paths
if 'SPACK_STORE_INCLUDE_DIRS' in my_env:
for dir in reversed(get_path(my_env, "SPACK_STORE_INCLUDE_DIRS")):
env.prepend_path("C_INCLUDE_PATH", dir)
env.prepend_path("CPLUS_INCLUDE_PATH", dir)
if 'SPACK_INCLUDE_DIRS' in my_env:
for dir in reversed(get_path(my_env, "SPACK_INCLUDE_DIRS")):
env.prepend_path("C_INCLUDE_PATH", dir)
env.prepend_path("CPLUS_INCLUDE_PATH", dir)
if 'SPACK_STORE_LINK_DIRS' in my_env:
for dir in reversed(get_path(my_env, "SPACK_STORE_LINK_DIRS")):
env.prepend_path("LIBRARY_PATH", dir)
env.prepend_path("LD_LIBRARY_PATH", dir)
if 'SPACK_LINK_DIRS' in my_env:
for dir in reversed(get_path(my_env, "SPACK_LINK_DIRS")):
env.prepend_path("LIBRARY_PATH", dir)
env.prepend_path("LD_LIBRARY_PATH", dir)
for dir in reversed(self.compiler.implicit_rpaths()):
env.prepend_path("LIBRARY_PATH", dir)
# technically this is probably not needed for the non-configure steps
env.prepend_path("LD_LIBRARY_PATH", dir)
def setup_dependent_build_environment(self, env, dependent_spec):
self._setup_common_env(env)
def setup_run_environment(self, env):
self._setup_common_env(env)
def setup_dependent_run_environment(self, env, dependent_spec):
self._setup_common_env(env)
# override configure step as we perform a project setup first
def configure(self, spec, prefix):
"""Configure the project."""
args = ['--prefix={0}'.format(self.prefix)]
args += self.configure_args()
if spec.version >= Version("9"):
self.waf('setup', '--directory=' + str(spec.name), '--repo-db-url=https://github.com/electronicvisions/projects')
self.waf('configure', '--build-profile=release', '--disable-doxygen', *args)
def build_args(self):
args = ['--keep', '--test-execnone', '-v']
return args
def build_test(self):
self.builder.waf('build', '--test-execall')
copy_tree('build/test_results', join_path(self.prefix, '.build'))
copy_tree('build/test_results', join_path(self.stage.path, ".install_time_tests"))
# propagate failures from junit output to spack
tree = ET.parse('build/test_results/summary.xml')
for testsuite in tree.getroot():
for testcase in testsuite:
if (testcase.get('name').startswith("pycodestyle") or
testcase.get('name').startswith("pylint")):
continue
for elem in testcase:
if (elem.tag == 'failure') and not (
elem.get('message').startswith("pylint:") or
elem.get('message').startswith("pycodestyle:") or
"catchsegv: not found" in elem.get('message') or
("OK" in elem.get('message') and "Segmentation fault" in elem.get('message'))):
raise RuntimeError("Failed test found: {}".format(testcase.get('name')))
def install_args(self):
args = ['--test-execnone']
return args
from spack import *
# 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.package import *
# Usage
# from clb_nb_utils import oauth
......
diff --git a/fmt/format.h b/fmt/format.h
index 561a9e0..9faf5ca 100644
--- a/fmt/format.h
+++ b/fmt/format.h
@@ -153,7 +153,7 @@ typedef __int64 intmax_t;
# define FMT_HAS_CPP_ATTRIBUTE(x) 0
#endif
-#if FMT_HAS_CPP_ATTRIBUTE(maybe_unused)
+#if FMT_HAS_CPP_ATTRIBUTE(maybe_unused) && __cplusplus >= 201103L
# define FMT_HAS_CXX17_ATTRIBUTE_MAYBE_UNUSED
// VC++ 1910 support /std: option and that will set _MSVC_LANG macro
// Clang with Microsoft CodeGen doesn't define _MSVC_LANG macro
diff --git a/fmt/CMakeLists.txt b/fmt/CMakeLists.txt
index c0ef02e..1634924 100644
--- a/fmt/CMakeLists.txt
+++ b/fmt/CMakeLists.txt
@@ -14,8 +14,6 @@ if (FMT_CPPFORMAT)
add_library(cppformat ${FMT_SOURCES} ${FMT_HEADERS})
endif ()
-# Starting with cmake 3.1 the CXX_STANDARD property can be used instead.
-target_compile_options(fmt PUBLIC ${CPP11_FLAG})
if (FMT_PEDANTIC)
target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
endif ()
diff --git a/support/cmake/cxx11.cmake b/support/cmake/cxx11.cmake
index 31ea106..8581b9a 100644
--- a/support/cmake/cxx11.cmake
+++ b/support/cmake/cxx11.cmake
@@ -37,6 +37,10 @@ if (FMT_USE_CPP11)
endif ()
endif ()
+if (CMAKE_CXX_STANDARD)
+ set(CPP11_FLAG )
+endif ()
+
set(CMAKE_REQUIRED_FLAGS ${CPP11_FLAG})
# Check if variadic templates are working and not affected by GCC bug 39653:
# this package was adapted from the spack v0.19.0 upstream because the version
# needed for arbor 0.8 was not available on the current spack version
# 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 Fmt(CMakePackage):
"""fmt (formerly cppformat) is an open-source formatting library.
It can be used as a safe alternative to printf or as a fast alternative
to C++ IOStreams."""
homepage = "https://fmt.dev/"
url = "https://github.com/fmtlib/fmt/releases/download/7.1.3/fmt-7.1.3.zip"
maintainers = ["msimberg"]
version("9.1.0", sha256="cceb4cb9366e18a5742128cb3524ce5f50e88b476f1e54737a47ffdf4df4c996")
version("9.0.0", sha256="fc96dd2d2fdf2bded630787adba892c23cb9e35c6fd3273c136b0c57d4651ad6")
version("8.1.1", sha256="23778bad8edba12d76e4075da06db591f3b0e3c6c04928ced4a7282ca3400e5d")
version("8.1.0", sha256="d8e9f093b2241c3a9fc3895e23231ef9de00c762cfa0a9c65e4748755bc352ae")
version("8.0.1", sha256="a627a56eab9554fc1e5dd9a623d0768583b3a383ff70a4312ba68f94c9d415bf")
version("7.1.3", sha256="5d98c504d0205f912e22449ecdea776b78ce0bb096927334f80781e720084c9f")
version("7.1.2", sha256="4d6968ab7c01e95cc76df136755703defb985105a117b83057e4fd5d53680ea7")
version("7.1.0", sha256="308af4e36ee3ab527b51014a2a5d862682c84f5d16f7a597aea34c84853cbcb0")
version("6.1.2", sha256="63650f3c39a96371f5810c4e41d6f9b0bb10305064e6faf201cbafe297ea30e8")
version("5.3.0", sha256="4c0741e10183f75d7d6f730b8708a99b329b2f942dad5a9da3385ab92bb4a15c")
version("5.2.1", sha256="43894ab8fe561fc9e523a8024efc23018431fa86b95d45b06dbe6ddb29ffb6cd")
version("5.2.0", sha256="c016db7f825bce487a7929e1edb747b9902a2935057af6512cad3df3a080a027")
version("5.1.0", sha256="77ef9fea638dc846e484409fbc1ea710bb9bcea042e7b35b8805041bf7655ad5")
version("5.0.0", sha256="8dd58daf13e7e8adca99f8725ef3ae598f9c97efda7d6d8d4c49db5047879097")
version("4.1.0", sha256="9d49bf02ceb9d0eec51144b203b63b77e69d3798bb402fb82e7d0bdb06c79eeb")
version("4.0.0", sha256="10a9f184d4d66f135093a08396d3b0a0ebe8d97b79f8b3ddb8559f75fe4fcbc3")
version("3.0.2", sha256="51407b62a202b29d1a9c0eb5ecd4095d30031aea65407c42c25cb10cb5c59ad4")
version("3.0.1", sha256="4c9af0dc919a8ae7022b44e1a03c435e42d65c866f44667d8d920d342b098550")
version("3.0.0", sha256="1b050b66fa31b74f1d75a14f15e99e728ab79572f176a53b2f8ad7c201c30ceb")
variant(
"cxxstd",
default="11",
values=("98", "11", "14", "17"),
multi=False,
description="Use the specified C++ standard when building",
)
variant("shared", default=False, description="Build shared library")
variant("pic", default=True, description="Build position-independent code")
depends_on("cmake@3.1.0:", type="build")
# Supported compilers/standards are detailed here:
# http://fmtlib.net/latest/index.html#portability
conflicts("%gcc@:4.3", when="@5:")
conflicts("%llvm@:2.8", when="@5:")
# 5 and above require C++11
conflicts("cxxstd=98", when="@5:")
# 5.0.0 enables C++14 auto return types in C++11 mode
conflicts("cxxstd=11", when="@5.0.0")
# 4.1 fails with C++17 (https://github.com/fmtlib/fmt/issues/722)
conflicts("cxxstd=17", when="@4.1.0")
# edg based compilers have issues with fmt 9.0.0 and C++17 standard
# (https://github.com/fmtlib/fmt/issues/3028)
conflicts("cxxstd=17", when="@9.0.0%intel")
conflicts("cxxstd=17", when="@9.0.0%nvhpc")
# Use CMAKE_CXX_STANDARD to define C++ flag, as in later versions
patch("fmt-use-cmake-cxx-standard_3.0.0.patch", when="@3.0.0")
# Remove hardcoding of "-std=c++11/0x" in INTERFACE_COMPILE_OPTIONS
patch("fmt-no-export-cpp11flag_3.0.0.patch", when="@3.0.0:3.0.1")
# Only allow [[attributes]] on C++11 and higher
patch("fmt-attributes-cpp11_4.1.0.patch", when="@4.1.0")
# Fix compilation with hipcc/dpcpp: https://github.com/fmtlib/fmt/issues/3005
patch(
"https://github.com/fmtlib/fmt/commit/0b0f7cfbfcebd021c910078003d413354bd843e2.patch?full_index=1",
sha256="08fb707bf8b4fc890d6eed29217ead666558cbae38f9249e22ddb82212f0eb4a",
when="@9.0.0:9.1.0",
)
def cmake_args(self):
spec = self.spec
args = []
if self.spec.satisfies("+shared"):
args.append("-DBUILD_SHARED_LIBS=ON")
if "+pic" in spec:
args.extend(
[
"-DCMAKE_C_FLAGS={0}".format(self.compiler.cc_pic_flag),
"-DCMAKE_CXX_FLAGS={0}".format(self.compiler.cxx_pic_flag),
]
)
args.append("-DCMAKE_CXX_STANDARD={0}".format(spec.variants["cxxstd"].value))
# Require standard at configure time to guarantee the
# compiler supports the selected standard.
args.append("-DCMAKE_CXX_STANDARD_REQUIRED=ON")
# When cxxstd is 98, must disable FMT_USE_CPP11
if "cxxstd=98" in spec:
args.append("-DFMT_USE_CPP11=OFF")
# Can't build docs without doxygen+python+virtualenv
# and call to build "doc" target
args.append("-DFMT_DOC=OFF")
return args
##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see https://github.com/spack/spack
# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (as
# published by the Free Software Foundation) version 2.1, February 1999.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
# conditions of the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Genpybind(WafPackage):
......@@ -40,16 +21,24 @@ class Genpybind(WafPackage):
version('develop', branch='develop')
version('visions', branch='master', git='https://github.com/electronicvisions/genpybind')
# good for ebrains-10.0 too…
version('ebrains-llvm15', tag='ebrains-9.0-a9', git='https://github.com/electronicvisions/genpybind')
version('ebrains', tag='ebrains_release-1-rc1', git='https://github.com/electronicvisions/genpybind')
depends_on(
'llvm+clang+python+visionary@5.0.0:',
type=('build', 'link', 'run'))
type=('build', 'link'))
depends_on('binutils', type='build')
depends_on('python@2.7:', type=('build', 'run'))
extends('python')
patch('v0.2.1-python3.10.patch', when='@:0.2.1 ^python@3.10:')
# llvm-config needs to be found at build time of packages using genpybind
def setup_dependent_build_environment(self, env, dependent_spec):
env.prepend_path("PATH", self.spec["llvm"].prefix.bin)
def configure_args(self):
args = super(Genpybind, self).configure_args()
......
diff --git a/genpybind/annotations.py b/genpybind/annotations.py
index 1dfd1f4..871ef4d 100644
--- a/genpybind/annotations.py
+++ b/genpybind/annotations.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import ast
-import collections
+from collections.abc import Sequence
from clang.cindex import CursorKind
@@ -25,7 +25,7 @@ LOZENGE = u"◊"
SPECIAL_NAMES = {"true": True, "false": False, "default": None, "none": None}
-class Annotations(collections.Sequence):
+class Annotations(Sequence):
def __init__(self, annotations=None):
# type: (Union[None, Text, Iterable[Text]]) -> None
self._annotations = [] # type: List[AnnotationT]
diff --git a/genpybind/registry.py b/genpybind/registry.py
index 4f66ace..75ba7a9 100644
--- a/genpybind/registry.py
+++ b/genpybind/registry.py
@@ -1,6 +1,6 @@
from __future__ import unicode_literals
-import collections
+from collections.abc import Mapping
import re
from clang import cindex
@@ -16,7 +16,7 @@ if False: # pylint: disable=using-constant-test
RE_NON_IDENTIFIER = re.compile(r"[^a-zA-Z0-9_]+")
-class Registry(collections.Mapping):
+class Registry(Mapping):
def __init__(self, tags=None):
# type: (Optional[Iterable[Text]]) -> None
self._declarations = {} # type: Dict[Text, Optional[Declaration]]
# 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.package import *
class Glfw(CMakePackage):
"""GLFW is an Open Source, multi-platform library for
OpenGL, OpenGL ES and Vulkan development on the desktop. It
provides a simple API for creating windows, contexts and
surfaces, receiving input and events."""
homepage = "https://www.glfw.org/"
url = "https://github.com/glfw/glfw/archive/3.3.2.tar.gz"
license("Zlib")
# begin EBRAINS (added): new version
version("3.4", sha256="c038d34200234d071fae9345bc455e4a8f2f544ab60150765d7704e08f3dac01")
# end EBRAINS
version("3.3.8", sha256="f30f42e05f11e5fc62483e513b0488d5bceeab7d9c5da0ffe2252ad81816c713")
version("3.3.2", sha256="98768e12e615fbe9f3386f5bbfeb91b5a3b45a8c4c77159cef06b1f6ff749537")
version("3.3.1", sha256="6bca16e69361798817a4b62a5239a77253c29577fcd5d52ae8b85096e514177f")
version("3.3", sha256="81bf5fde487676a8af55cb317830703086bb534c53968d71936e7b48ee5a0f3e")
version("3.2.1", sha256="e10f0de1384d75e6fc210c53e91843f6110d6c4f3afbfb588130713c2f9d8fe8")
version("3.2", sha256="cb3aab46757981a39ae108e5207a1ecc4378e68949433a2b040ce2e17d8f6aa6")
version("3.1.2", sha256="6ac642087682aaf7f8397761a41a99042b2c656498217a1c63ba9706d1eef122")
version("3.1.1", sha256="4de311ec9bf43bfdc8423ddf93b91dc54dc73dcfbedfb0991b6fbb3a9baf245f")
version("3.1", sha256="2140f4c532e7ce4c84cb7e4c419d0979d5954fa1ce204b7646491bd2cc5bf308")
version("3.0.4", sha256="a4e7c57db2086803de4fc853bd472ff8b6d2639b9aa16e6ac6b19ffb53958caf")
version("3.0.3", sha256="7a182047ba6b1fdcda778b79aac249bb2328b6d141188cb5df29560715d01693")
depends_on("c", type="build") # generated
variant("doc", default=False, description="Build documentation")
variant("shared", default=False, description="Builds a shared version of the library")
# dependencies
depends_on("doxygen", type="build", when="+doc")
# linux only dependencies
depends_on("libxrandr", when="platform=linux")
depends_on("libxinerama", when="platform=linux")
depends_on("libxcursor", when="platform=linux")
depends_on("libxdamage", when="platform=linux")
depends_on("libxft", when="platform=linux")
depends_on("libxi", when="platform=linux")
depends_on("libxmu", when="platform=linux")
depends_on("freetype", when="platform=linux")
depends_on("fontconfig", when="platform=linux")
depends_on("pkgconfig", type="build", when="platform=linux")
# begin EBRAINS (added): missing dependency
depends_on("wayland", when="platform=linux")
depends_on("libxkbcommon", when="platform=linux")
# end EBRAINS
def cmake_args(self):
return [self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
diff --git a/src/hxtorch/spiking/types.cpp b/src/hxtorch/spiking/types.cpp
index aaf670f..39322c8 100644
--- a/hxtorch/src/hxtorch/spiking/types.cpp
+++ b/hxtorch/src/hxtorch/spiking/types.cpp
@@ -2,7 +2,12 @@
#include "grenade/vx/common/time.h"
#include "hxtorch/spiking/detail/to_dense.h"
#include <ATen/Functions.h>
+#if __has_include(<ATen/native/SparseTensorUtils.h>)
+// moved in py-torch@2.1
+#include <ATen/native/SparseTensorUtils.h>
+#else
#include <ATen/SparseTensorUtils.h>
+#endif
#include <log4cxx/logger.h>
namespace hxtorch::spiking {