summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Brady <ptb@lanl.gov>2022-01-07 11:18:41 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2022-01-15 14:02:30 -0800
commit415d662ec06ad17e69ff95c72367af7065fdfc78 (patch)
tree24337e9fcf026e4aac3e0d5a1b9419bbbb41e017
parent30b3cd3b446970606487fb2587e23f515f15cdbe (diff)
downloadspack-415d662ec06ad17e69ff95c72367af7065fdfc78.tar.gz
spack-415d662ec06ad17e69ff95c72367af7065fdfc78.tar.bz2
spack-415d662ec06ad17e69ff95c72367af7065fdfc78.tar.xz
spack-415d662ec06ad17e69ff95c72367af7065fdfc78.zip
Fix boost build failures on newer glibc
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py4
-rw-r--r--var/spack/repos/builtin/packages/boost/pthread-stack-min-fix.patch15
2 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index daaa790563..7a770afea9 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -310,6 +310,10 @@ class Boost(Package):
when="@1.77.0",
working_dir="tools/build")
+ # Fix issues with PTHREAD_STACK_MIN not being a DEFINED constant in newer glibc
+ # See https:://github.com/spack/spack/issues/28273
+ patch("pthread-stack-min-fix.patch", when="@1.69.0:1.73.0")
+
def patch(self):
# Disable SSSE3 and AVX2 when using the NVIDIA compiler
if self.spec.satisfies('%nvhpc'):
diff --git a/var/spack/repos/builtin/packages/boost/pthread-stack-min-fix.patch b/var/spack/repos/builtin/packages/boost/pthread-stack-min-fix.patch
new file mode 100644
index 0000000000..b6c85f8405
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/pthread-stack-min-fix.patch
@@ -0,0 +1,15 @@
+Taken from https://github.com/conan-io/conan-center-index/pull/361/files
+
+diff --git a/include/boost/thread/pthread/thread_data.hpp b/include/boost/thread/pthread/thread_data.hpp
+index aefbeb4..bc9b136 100644
+--- a/boost/thread/pthread/thread_data.hpp
++++ b/boost/thread/pthread/thread_data.hpp
+@@ -57,7 +57,7 @@ namespace boost
+ #else
+ std::size_t page_size = ::sysconf( _SC_PAGESIZE);
+ #endif
+-#if PTHREAD_STACK_MIN > 0
++#ifdef PTHREAD_STACK_MIN
+ if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
+ #endif
+ size = ((size+page_size-1)/page_size)*page_size;