summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2023-08-17 08:44:38 +0200
committerGitHub <noreply@github.com>2023-08-17 08:44:38 +0200
commitc417a77a195983e2370babbec0860de63a696c74 (patch)
tree59242766182fb2187fa37a8b1d313b843d0b2892
parent90d0d0176ca9aed248eacf39f6a2f6e925107c1a (diff)
downloadspack-c417a77a195983e2370babbec0860de63a696c74.tar.gz
spack-c417a77a195983e2370babbec0860de63a696c74.tar.bz2
spack-c417a77a195983e2370babbec0860de63a696c74.tar.xz
spack-c417a77a195983e2370babbec0860de63a696c74.zip
snappy: patch and conflict for %nvhpc (#39063)
-rw-r--r--var/spack/repos/builtin/packages/snappy/package.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/snappy/package.py b/var/spack/repos/builtin/packages/snappy/package.py
index e1fbe5a779..971d635291 100644
--- a/var/spack/repos/builtin/packages/snappy/package.py
+++ b/var/spack/repos/builtin/packages/snappy/package.py
@@ -24,6 +24,21 @@ class Snappy(CMakePackage):
patch("link_gtest.patch", when="@:1.1.8")
+ # Version 1.1.9 makes use of an assembler feature that is not necessarily available when the
+ # __GNUC__ preprocessor macro is defined. Version 1.1.10 switched to the correct macro
+ # __GCC_ASM_FLAG_OUTPUTS__, which we also do for the version 1.1.9 by applying the patch from
+ # the upstream repo (see the commit message of the patch for more details).
+ patch(
+ "https://github.com/google/snappy/commit/8dd58a519f79f0742d4c68fbccb2aed2ddb651e8.patch?full_index=1",
+ sha256="debcdf182c046a30e9afea99ebbff280dd1fbb203e89abce6a05d3d17c587768",
+ when="@1.1.9",
+ )
+
+ # nvhpc@:22.3 does not know flag '-fno-rtti'
+ # nvhpc@:22.7 fails to compile snappy.cc: line 126: error: excessive recursion at instantiation
+ # of class "snappy::<unnamed>::make_index_sequence<
+ conflicts("@1.1.9:", when="%nvhpc@:22.7")
+
def cmake_args(self):
return [
self.define("CMAKE_INSTALL_LIBDIR", self.prefix.lib),