diff --git a/var/spack/repos/builtin/packages/boost/boost_218.patch b/var/spack/repos/builtin/packages/boost/boost_218.patch new file mode 100644 index 00000000000..ab4d9085f5c --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/boost_218.patch @@ -0,0 +1,10 @@ +--- a/libs/python/src/numpy/numpy.cpp ++++ b/libs/python/src/numpy/numpy.cpp +@@ -19,6 +19,7 @@ static void wrap_import_array() + static void * wrap_import_array() + { + import_array(); ++ return NULL; + } + #endif + diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 858e929b676..de4791a93f7 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -256,6 +256,10 @@ def libs(self): # See https://github.com/boostorg/build/pull/154 patch('boost_154.patch', when='@:1.63.99') + # Backport Python3 import problem + # See https://github.com/boostorg/python/pull/218 + patch('boost_218.patch', when='@:1.67.99') + def patch(self): # Disable SSSE3 and AVX2 when using the NVIDIA compiler if self.spec.satisfies('%nvhpc'):