Compare commits

..

3 commits

Author SHA1 Message Date
Benjamin A. Beasley
5f9c71a9f3
Do not enable extra ISA extensions based on the build host
We must confine ourselves to the baseline features of each architecture
unless runtime feature detection is used.
2023-11-07 10:48:08 +01:00
Sandro
075e102ba4
Fix ExcludeArch
- s/s390/s390x/
2023-11-07 10:48:08 +01:00
Sandro
9b31ac8667
Fix use of distutils (RHBZ#2219935) 2023-11-07 10:47:30 +01:00
9 changed files with 92 additions and 171 deletions

1
.gitignore vendored
View file

@ -5,4 +5,3 @@
/arbor-0.5.2.tar.gz
/arbor-0.6.tar.gz
/arbor-0.7.tar.gz
/arbor-0.9.0.tar.gz

View file

@ -1,13 +0,0 @@
upstream_project_url: https://github.com/arbor-sim/arbor
upstream_tag_template: v{version}
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-rawhide
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all

View file

@ -1,41 +0,0 @@
From 8880ff435f69b515a57e60e8b7434dad9e47847e Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 16 Jan 2025 09:49:20 -0500
Subject: [PATCH] Fix a few typos that cause failure to compile with GCC 15
These were eventually included in
76120d16c00ae67128c3c69421ab712f985f3445, along with many other changes.
---
arbor/include/arbor/util/expected.hpp | 2 +-
python/strprintf.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arbor/include/arbor/util/expected.hpp b/arbor/include/arbor/util/expected.hpp
index 9d860f65..1af88eb4 100644
--- a/arbor/include/arbor/util/expected.hpp
+++ b/arbor/include/arbor/util/expected.hpp
@@ -486,7 +486,7 @@ struct expected<void, E> {
// Swap ops.
void swap(expected& other) {
- data_.swap(other.data);
+ data_.swap(other.data_);
}
// Accessors.
diff --git a/python/strprintf.hpp b/python/strprintf.hpp
index 63801677..2ccf12c1 100644
--- a/python/strprintf.hpp
+++ b/python/strprintf.hpp
@@ -168,7 +168,7 @@ namespace impl {
for (auto& x: s.seq_) {
if (!first) o << s.sep_;
first = false;
- o << s.f(x);
+ o << s.f_(x);
}
return o;
}
--
2.47.1

33
2080.patch Normal file
View file

@ -0,0 +1,33 @@
From 884c568f96bc10079f28f4b2b7c8fc120c020053 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Thu, 19 Jan 2023 10:10:21 -0500
Subject: [PATCH] Add some missing #include directives
Fixes failure to compile with GCC 13.
---
arbor/include/arbor/morph/primitives.hpp | 1 +
arbor/threading/threading.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/arbor/include/arbor/morph/primitives.hpp b/arbor/include/arbor/morph/primitives.hpp
index 4be04670b..9d75060df 100644
--- a/arbor/include/arbor/morph/primitives.hpp
+++ b/arbor/include/arbor/morph/primitives.hpp
@@ -2,6 +2,7 @@
#include <algorithm>
#include <cstdlib>
+#include <cstdint>
#include <ostream>
#include <vector>
diff --git a/arbor/threading/threading.cpp b/arbor/threading/threading.cpp
index 552fda90a..4c786b867 100644
--- a/arbor/threading/threading.cpp
+++ b/arbor/threading/threading.cpp
@@ -1,4 +1,5 @@
#include <atomic>
+#include <stdexcept>
#include <arbor/assert.hpp>
#include <arbor/util/scope_exit.hpp>

View file

@ -1,22 +0,0 @@
diff -Naur arbor-0.9.0-original/python/pyarb.hpp arbor-0.9.0/python/pyarb.hpp
--- arbor-0.9.0-original/python/pyarb.hpp 2023-08-10 10:47:38.000000000 +0100
+++ arbor-0.9.0/python/pyarb.hpp 2025-11-03 08:24:00.093256311 +0000
@@ -13,18 +13,6 @@
#include <pybind11/pybind11.h>
-// Version check
-#define mk_tok(x) #x
-#define mk_ver(M, m, p) mk_tok(M) "." mk_tok(m) "." mk_tok(p)
-#define PB11_ERR(M, m, p) "Required version of pybind11 is 2.8.1 <= version < 3.0.0 Found " mk_ver(M, m, p)
-static_assert((PYBIND11_VERSION_HEX >= 0x02080100)
- &&
- (PYBIND11_VERSION_HEX < 0x03000000),
- PB11_ERR(PYBIND11_VERSION_MAJOR, PYBIND11_VERSION_MINOR, PYBIND11_VERSION_PATCH));
-#undef PB11_ERR
-#undef mk_ver
-#undef mk_tok
-
namespace pyarb {
// Sample recorder object interface.

View file

@ -14,21 +14,15 @@ Documentation is available at https://arbor.readthedocs.io/en/latest/
}
# Best to start with the serial version when debugging build failures
%bcond mpich 1
%bcond openmpi 1
%bcond_without mpich
%bcond_without openmpi
%bcond tests 1
# Python unit tests in MPI environment fail in a non-deterministic way.
# Using pytest _as is_ doesn't work either and `-m unittest` does not
# allow filtering tests as `pytest -k` does.
# For now we don't run the Python MPI tests.
%bcond mpi_py_unittest 0
%bcond_without tests
%global forgeurl https://github.com/arbor-sim/arbor
Name: arbor
Version: 0.9.0
Version: 0.7
Release: %autorelease
Summary: Multi-compartment neural network simulation library
@ -42,16 +36,13 @@ Source2: https://raw.githubusercontent.com/arbor-sim/arbor/master/scripts
License: BSD-3-Clause
Patch: 0001-Quote-various-cmake-var-values.patch
# Tests are failing to compile due to some missing includes
Patch: fix-missing-includes.patch
# Fix a few typos that cause failure to compile with GCC 15
#
# These were eventually included in
# 76120d16c00ae67128c3c69421ab712f985f3445, along with many other changes.
Patch: 0001-Fix-a-few-typos-that-cause-failure-to-compile-with-G.patch
# Remove the hard-coded pybind11 version check so that we can build with
# pybind11 3.0; this is part of https://github.com/arbor-sim/arbor/pull/2481.
Patch: arbor-0.9.0-pybind11-3.0.patch
# Add some missing #include directives
# Fixes failure to compile with GCC 13.
# https://github.com/arbor-sim/arbor/pull/2080
Patch: %{forgeurl}/pull/2080.patch
# Replace use of LooseVersion from distutils.version (removed in Python3.12)
# https://github.com/arbor-sim/arbor/pull/2157
Patch: looseversion.patch
# Random123 does not support:
# mips64r2 mips32r2 s390
@ -73,6 +64,7 @@ BuildRequires: python3-setuptools
BuildRequires: Random123-devel
BuildRequires: tclap-devel
BuildRequires: pugixml-devel
Provides: python3-arbor = %{version}-%{release}
# For validation, but we don't have these BRs
# BuildRequires: julia julia-sundials julia-unitful julia-JSON
@ -86,9 +78,6 @@ BuildRequires: %{py3_dist seaborn}
# Required by arbor
Requires: %{py3_dist numpy}
# Provide Python meta data for packages requiring arbor
%py_provides python3-arbor
%description %{_description}
%package devel
@ -101,13 +90,11 @@ Provides: arbor-static = %{version}-%{release}
%package doc
# Does not require the main package, since it may be installed by people using
# the MPI builds
Summary: Documentation for arbor
Summary: Documentation for arbor
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
BuildRequires: python3-svgwrite
BuildArch: noarch
%description doc %{_description}
%if %{with mpich}
@ -185,9 +172,6 @@ find . -type f -name "CMakeLists.txt" -exec sed -i -e 's/ext-tclap//' -e 's/ext-
# Correct Python shebangs in all files
find . -type f -name "*" -exec sed -i 's|^#![ ]*/usr/bin/env.*python.*$|#!/usr/bin/python3|' {} 2>/dev/null ';'
# Fix shebang (special case)
sed -i 's|^#![ ]*/usr/env/bin.*python.*$|#!/usr/bin/python3|' example/lfp/neuron_lfp_example.py
# test scripts
cp %{SOURCE1} scripts/
cp %{SOURCE2} scripts/
@ -232,7 +216,6 @@ pushd build$MPI_COMPILE_TYPE &&
-DARB_WITH_MPI:BOOL=$MPI_YES \\\
-DARB_WITH_GPU:BOOL=OFF \\\
-DARB_ARCH:STRING="none" \\\
-DARB_CXX_FLAGS_TARGET:STRING="-ffat-lto-objects" \\\
-DCMAKE_INSTALL_LIBDIR=%{_lib} \\\
-DARB_WITH_PYTHON:BOOL=ON \\\
-DARB_PYTHON_LIB_PATH:STRING=$MPI_PYTHON3_SITEARCH \\\
@ -365,51 +348,51 @@ popd
%endif
# https://github.com/arbor-sim/arbor/blob/master/.github/workflows/test-matrix.yml
# https://github.com/arbor-sim/arbor/blob/master/.github/workflows/test-everything.yml
%if %{with tests}
%check
# Taken from upstream's GitHub workflow
%global mpirun mpirun -n %{_smp_build_ncpus}
# General tests
export PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}"
# for arbor-build-catalogue
export PATH="$PATH:%{buildroot}/%{_bindir}"
# these tests segfault, filter out
gtest_filter="${gtest_filter--}${gtest_filter+:}*diffusion*"
pushd build-serial
%{py3_test_envvars} %{python3} -m unittest discover -v -s ../python
./bin/unit ${gtest_filter+--gtest_filter=}${gtest_filter-}
%{python3} -m unittest discover -v -s ../python
./bin/unit --gtest_filter=-*task_system.test_copy*:*notification_queue.test_copy*
./bin/unit-modcc
cp ../scripts/run_cpp_examples.sh .
./run_cpp_examples.sh
popd
./scripts/run_python_examples.sh
# MPICH
%if %{with mpich}
%{_mpich_load}
export PYTHONPATH="%{buildroot}/$MPI_PYTHON3_SITEARCH"
export PATH="$PATH:."
pushd build-mpich
%if %{with mpi_py_unittest}
%{py3_test_envvars} %{mpirun} %{python3} -m unittest discover -v -s ../python
%endif
%{mpirun} ./bin/unit-mpi
mpirun -n %{_smp_build_ncpus} %{python3} -m unittest discover -v -s ../python
mpirun -n %{_smp_build_ncpus} ./bin/unit-mpi
cp ../scripts/run_cpp_examples.sh .
./run_cpp_examples.sh "%{mpirun}"
./run_cpp_examples.sh "mpirun -n %{_smp_build_ncpus}"
popd
%{py3_test_envvars} ./scripts/run_python_examples.sh "%{mpirun}"
./scripts/run_python_examples.sh "mpirun -n %{_smp_build_ncpus}"
%{_mpich_unload}
%endif
# OpenMPI
%if %{with openmpi}
%{_openmpi_load}
export PYTHONPATH="%{buildroot}/$MPI_PYTHON3_SITEARCH"
export PATH="$PATH:."
pushd build-openmpi
%if %{with mpi_py_unittest}
%{py3_test_envvars} %{mpirun} %{python3} -m unittest discover -v -s ../python
%endif
%{mpirun} ./bin/unit-mpi
mpirun -n %{_smp_build_ncpus} %{python3} -m unittest discover -v -s ../python
mpirun -n %{_smp_build_ncpus} ./bin/unit-mpi
cp ../scripts/run_cpp_examples.sh .
./run_cpp_examples.sh "%{mpirun}"
./run_cpp_examples.sh "mpirun -n %{_smp_build_ncpus}"
popd
%{py3_test_envvars} ./scripts/run_python_examples.sh "%{mpirun}"
./scripts/run_python_examples.sh "mpirun -n %{_smp_build_ncpus}"
%{_openmpi_unload}
%endif
%endif

View file

@ -1,43 +0,0 @@
From fa15938c196bf317e0292d41ec7d341978e9ed08 Mon Sep 17 00:00:00 2001
From: Sandro <devel@penguinpee.nl>
Date: Mon, 29 Apr 2024 14:35:01 +0200
Subject: [PATCH] Fix missing includes
Tests are failing to compile without those.
diff --git a/test/unit/common.hpp b/test/unit/common.hpp
index db75e4d1..e02b9df2 100644
--- a/test/unit/common.hpp
+++ b/test/unit/common.hpp
@@ -11,6 +11,7 @@
#include <unordered_map>
#include <utility>
#include <vector>
+#include <algorithm>
#include <gtest/gtest.h>
diff --git a/test/unit/test_event_queue.cpp b/test/unit/test_event_queue.cpp
index daa0ccb9..17c10378 100644
--- a/test/unit/test_event_queue.cpp
+++ b/test/unit/test_event_queue.cpp
@@ -6,6 +6,7 @@
#include <arbor/spike_event.hpp>
#include "event_queue.hpp"
+#include "common.hpp"
using namespace arb;
diff --git a/test/unit/test_ordered_forest.cpp b/test/unit/test_ordered_forest.cpp
index c58c76a4..12f7bd31 100644
--- a/test/unit/test_ordered_forest.cpp
+++ b/test/unit/test_ordered_forest.cpp
@@ -5,6 +5,7 @@
#include <gtest/gtest.h>
#include "util/ordered_forest.hpp"
+#include "common.hpp"
using arb::util::ordered_forest;

25
looseversion.patch Normal file
View file

@ -0,0 +1,25 @@
diff --git a/pyproject.toml b/pyproject.toml
index 0d732541..12e003e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -46,6 +46,7 @@ requires = [
"scikit-build",
"cmake>=3.18",
"ninja",
+ "looseversion",
]
build-backend = "setuptools.build_meta"
diff --git a/scripts/tsplot b/scripts/tsplot
index c64e7b18..10ddf3f4 100755
--- a/scripts/tsplot
+++ b/scripts/tsplot
@@ -11,7 +11,7 @@ import matplotlib as M
import matplotlib.pyplot as P
import numbers
from functools import reduce
-from distutils.version import LooseVersion
+from looseversion import LooseVersion
from itertools import chain, islice, cycle
# Run-time check for matplot lib version for line style functionality.

View file

@ -1 +1 @@
SHA512 (arbor-0.9.0.tar.gz) = fa0280cae870c150c8f891949da9d6276f672bb7191b7b982cda4695dd38e3bffdd0dfa5f3acc2cf940909f64eb9da04cd11aeb7a4baa262fdbcd99be618aa15
SHA512 (arbor-0.7.tar.gz) = 66471172e159c87c930c89cfed20020cd7c770e0fd5f32b265197710c7bbd2920cfa018f384553130dd93645e149ccb71f64cc04208534c96b4e581f0c0acb50