summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2017-05-19 09:55:21 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2017-05-19 11:55:21 -0500
commit18c7e9662437081e4d283abf656e1604228af045 (patch)
tree7704f20e070b9d362173fff0f2a3879bd705cdbb
parent0bff9c1eb1b99484e077a5cd18dc52a16057feb0 (diff)
downloadspack-18c7e9662437081e4d283abf656e1604228af045.tar.gz
spack-18c7e9662437081e4d283abf656e1604228af045.tar.bz2
spack-18c7e9662437081e4d283abf656e1604228af045.tar.xz
spack-18c7e9662437081e4d283abf656e1604228af045.zip
Fix boost@:1.56.0%gcc@:5 (#4295)
I need boost@1.54.0 for bcl2fastq2. I tested bcl2fastq2 using the system compiler (gcc@4.8.5). My full build uses a spack-build gcc@5.4.0. boost@1.54.0 won't build. I found the answer [here](https://github.com/hashdist/hashstack/issues/802) with the details in [this upstream/boost ticket](https://svn.boost.org/trac/boost/ticket/10125). I've confirmed that these combo's build: boost version| compiler ------------ | ------------------ boost@1.54.0 | gcc@4.8.5 (system) boost@1.54.0 | gcc@5.4.0 (Spack) boost@1.64.0 | gcc@5.5.0 (system)
-rw-r--r--var/spack/repos/builtin/packages/boost/call_once_variadic.patch57
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py2
2 files changed, 59 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/call_once_variadic.patch b/var/spack/repos/builtin/packages/boost/call_once_variadic.patch
new file mode 100644
index 0000000000..f143644a70
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/call_once_variadic.patch
@@ -0,0 +1,57 @@
+diff --git a/boost/thread/pthread/once.hpp b/boost/thread/pthread/once.hpp
+index ccfb051..0bef038 100644
+--- a/boost/thread/pthread/once.hpp
++++ b/boost/thread/pthread/once.hpp
+@@ -42,7 +42,7 @@ namespace boost
+ }
+
+ #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename Function, class ...ArgTypes>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args);
+ #else
+@@ -65,7 +65,7 @@ namespace boost
+ private:
+ volatile thread_detail::uintmax_atomic_t epoch;
+
+-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename Function, class ...ArgTypes>
+ friend void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args);
+ #else
+@@ -118,7 +118,7 @@ namespace boost
+ // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html
+
+
+-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+
+ template<typename Function, class ...ArgTypes>
+diff --git a/boost/thread/pthread/once_atomic.hpp b/boost/thread/pthread/once_atomic.hpp
+index 9e2f876..923f07b 100644
+--- a/boost/thread/pthread/once_atomic.hpp
++++ b/boost/thread/pthread/once_atomic.hpp
+@@ -115,7 +115,7 @@ namespace boost
+ #endif
+
+
+-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
++#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+ template<typename Function, class ...ArgTypes>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
+diff --git a/boost/thread/win32/once.hpp b/boost/thread/win32/once.hpp
+index cafcfd4..9b37b31 100644
+--- a/boost/thread/win32/once.hpp
++++ b/boost/thread/win32/once.hpp
+@@ -227,7 +227,7 @@ namespace boost
+ }
+ }
+
+-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
++#if !defined BOOST_NO_CXX11_VARIADIC_TEMPLATES && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ //#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR)
+ inline void call_once(once_flag& flag, void (*f)())
+ {
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index c0aa582d72..9ac2d7e2ab 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -148,6 +148,8 @@ class Boost(Package):
patch('xl_1_62_0_le.patch', when='@1.62.0%xl_r')
patch('xl_1_62_0_le.patch', when='@1.62.0%xl')
+ patch('call_once_variadic.patch', when='@:1.56.0%gcc@5:')
+
def url_for_version(self, version):
url = "http://downloads.sourceforge.net/project/boost/boost/{0}/boost_{1}.tar.bz2"
return url.format(version.dotted, version.underscored)