summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryizeyi18 <119801373+yizeyi18@users.noreply.github.com>2023-12-14 08:28:57 +0800
committerGitHub <noreply@github.com>2023-12-13 16:28:57 -0800
commita1fa862c3f3334055344c6cc77368f7ed4f7c976 (patch)
tree90ae7a6bcac16ffb50a4538cbeabe165bc364283
parent80f31829a8aaa6cd71b62e3926c9336f239204ac (diff)
downloadspack-a1fa862c3f3334055344c6cc77368f7ed4f7c976.tar.gz
spack-a1fa862c3f3334055344c6cc77368f7ed4f7c976.tar.bz2
spack-a1fa862c3f3334055344c6cc77368f7ed4f7c976.tar.xz
spack-a1fa862c3f3334055344c6cc77368f7ed4f7c976.zip
camp: fixing build issue (#41400)
* adding necessary headers, to fix https://github.com/spack/spack/issues/41398 * deleting something imported by accident * [@spackbot] updating style on behalf of yizeyi18 * undo commit 7688fed according to suggestion from @msimberg * patching camp@:2022.10.1 for compatibility with gcc-13 * adding the patch * fixing paths in the patch * [@spackbot] updating style on behalf of yizeyi18 * Update camp patch using LLNL/camp@05e1c35 Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi> * changing patch name --------- Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
-rw-r--r--var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch24
-rw-r--r--var/spack/repos/builtin/packages/camp/package.py2
2 files changed, 26 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch b/var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch
new file mode 100644
index 0000000000..d3c642abe6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/camp/gcc-13-missing-header.patch
@@ -0,0 +1,24 @@
+diff --git a/include/camp/resource.hpp b/include/camp/resource.hpp
+index 58df206..763aa20 100644
+--- a/include/camp/resource.hpp
++++ b/include/camp/resource.hpp
+@@ -12,6 +12,7 @@ http://github.com/llnl/camp
+ #define __CAMP_RESOURCE_HPP
+
+ #include <cstring>
++#include <stdexcept>
+ #include <memory>
+ #include <mutex>
+ #include <type_traits>
+diff --git a/include/camp/resource/host.hpp b/include/camp/resource/host.hpp
+index c765175..4428c57 100644
+--- a/include/camp/resource/host.hpp
++++ b/include/camp/resource/host.hpp
+@@ -13,6 +13,7 @@ http://github.com/llnl/camp
+
+ #include "camp/resource/event.hpp"
+ #include "camp/resource/platform.hpp"
++#include <cstdlib>
+
+ namespace camp
+ {
diff --git a/var/spack/repos/builtin/packages/camp/package.py b/var/spack/repos/builtin/packages/camp/package.py
index a1bdc830d3..4ac4092e5e 100644
--- a/var/spack/repos/builtin/packages/camp/package.py
+++ b/var/spack/repos/builtin/packages/camp/package.py
@@ -55,6 +55,8 @@ class Camp(CMakePackage, CudaPackage, ROCmPackage):
depends_on("blt", type="build")
+ patch("gcc-13-missing-header.patch", when="@:2022.10 %gcc@13:")
+
conflicts("^blt@:0.3.6", when="+rocm")
def cmake_args(self):