Skip to content

Commit 02326e1

Browse files
authored
protobuf: fix versioning (i.e. 3.32.1 -> 32.1) (spack#2294)
1 parent 94f8eb2 commit 02326e1

File tree

11 files changed

+60
-43
lines changed

11 files changed

+60
-43
lines changed

repos/spack_repo/builtin/packages/gnina/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Gnina(CMakePackage, CudaPackage):
5959

6060
depends_on("zlib-api")
6161
depends_on("boost@:1.79" + _boost_extensions)
62-
depends_on("protobuf@:3.21.12")
62+
depends_on("protobuf@:21.12")
6363

6464
depends_on("libmolgrid")
6565

repos/spack_repo/builtin/packages/lbann/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class Lbann(CachedCMakePackage, CudaPackage, ROCmPackage):
233233
depends_on("py-setuptools", type="build", when="+pfe")
234234
depends_on("[email protected]:4.21.12", type=("build", "run"), when="+pfe")
235235

236-
depends_on("[email protected]:3.21.12")
236+
depends_on("[email protected]:21.12")
237237
depends_on("zlib-api", when="^[email protected]:")
238238

239239
# using [email protected] and above requires changing the

repos/spack_repo/builtin/packages/mgard/package.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Mgard(CMakePackage, CudaPackage, ROCmPackage):
9595
depends_on("zstd")
9696
depends_on("[email protected]:", when="@compat-2022-11-18:")
9797
# See https://github.com/CODARcode/MGARD/issues/240
98-
depends_on("protobuf@:3.28", when="@:1.5.2")
98+
depends_on("protobuf@:28", when="@:1.5.2")
9999
depends_on("libarchive", when="@compat-2021-11-12:")
100100
depends_on("tclap", when="@compat-2021-11-12")
101101
depends_on("yaml-cpp", when="@compat-2021-11-12:")
@@ -116,8 +116,8 @@ class Mgard(CMakePackage, CudaPackage, ROCmPackage):
116116
conflicts(
117117
"%gcc@:7", when="@compat-2022-11-18:", msg="requires std::optional and other c++17 things"
118118
)
119-
conflicts("protobuf@3.22:", when="target=ppc64le", msg="GCC 9.4 segfault in CI")
120-
conflicts("protobuf@3.22:", when="+cuda target=aarch64:", msg="nvcc fails on ARM SIMD headers")
119+
conflicts("protobuf@22:", when="target=ppc64le", msg="GCC 9.4 segfault in CI")
120+
conflicts("protobuf@22:", when="+cuda target=aarch64:", msg="nvcc fails on ARM SIMD headers")
121121
# https://github.com/abseil/abseil-cpp/issues/1629
122122
conflicts("[email protected]", when="+cuda", msg="triggers nvcc parser bug")
123123

repos/spack_repo/builtin/packages/mivisionx/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def patch(self):
154154

155155
depends_on("[email protected]:", type="build")
156156
depends_on("[email protected]:", type="build")
157-
depends_on("protobuf@:3", type="build")
157+
depends_on("protobuf@3.12.4:", type="build")
158158
depends_on(
159159
160160
"+calib3d+features2d+highgui+imgcodecs+imgproc"

repos/spack_repo/builtin/packages/onnx/package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Onnx(CMakePackage):
7575
patch("OpSchemaRegisterOnce.patch", when="@1.18.0:1.19")
7676

7777
def patch(self):
78-
if self.spec.satisfies("@1.13:1.14 ^protobuf@3.22:"):
78+
if self.spec.satisfies("@1.13:1.14 ^protobuf@22:"):
7979
# CMAKE_CXX_STANDARD is overridden in CMakeLists.txt until 1.14
8080
cxxstd = self.spec["abseil-cpp"].variants["cxxstd"].value
8181
filter_file("CMAKE_CXX_STANDARD 11", f"CMAKE_CXX_STANDARD {cxxstd}", "CMakeLists.txt")
@@ -92,7 +92,7 @@ def cmake_args(self):
9292
"ONNX_USE_PROTOBUF_SHARED_LIBS", self.spec["protobuf"].variants["shared"].value
9393
),
9494
]
95-
if self.spec.satisfies("@1.15: ^protobuf@3.22:"):
95+
if self.spec.satisfies("@1.15: ^protobuf@22:"):
9696
# CMAKE_CXX_STANDARD can be set on command line as of 1.15
9797
cxxstd = self.spec["abseil-cpp"].variants["cxxstd"].value
9898
args.append(self.define("CMAKE_CXX_STANDARD", cxxstd))

repos/spack_repo/builtin/packages/paraview/package.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
302302
# protobuf requires newer abseil-cpp, which in turn requires C++14,
303303
# but paraview uses C++11 by default. Use for 5.8+ until ParaView updates
304304
# its C++ standard level.
305-
depends_on("[email protected]:3.21", when="@5.8:%gcc")
306-
depends_on("[email protected]:3.21", when="@5.8:%clang")
307-
depends_on("[email protected]:3.21", when="@5.11:")
308-
depends_on("[email protected]:3.21", when="@master")
305+
depends_on("[email protected]:21", when="@5.8:%gcc")
306+
depends_on("[email protected]:21", when="@5.8:%clang")
307+
depends_on("[email protected]:21", when="@5.11:")
308+
depends_on("[email protected]:21", when="@master")
309309
depends_on("libxml2")
310310
depends_on("lz4")
311311
depends_on("xz")

repos/spack_repo/builtin/packages/protobuf/package.py

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,41 @@ class Protobuf(CMakePackage):
1616

1717
license("BSD-3-Clause")
1818

19+
# note:
20+
# https://protobuf.dev/support/version-support/
21+
#
22+
# protobuf versioning scheme changed: after 3.20 there is 21.0.
23+
#
24+
# Prior to this change, all languages had major version "3" and 3 components. Now, protobuf
25+
# versions follow the protoc versioning, with 2 components.
26+
#
27+
# What about language versions? language runtimes still have a version which is composed as
28+
#
29+
# <lang-runtime-version>.<protobuf-major>.<protobuf-minor>
30+
#
31+
# Hence language runtime version has explicted also the protobuf version it is compatible with.
32+
1933
version("33.1", sha256="0c98bb704ceb4e68c92f93907951ca3c36130bc73f87264e8c0771a80362ac97")
34+
version("33.0", sha256="b6b03fbaa3a90f3d4f2a3fa4ecc41d7cd0326f92fcc920a7843f12206c8d52cd")
2035
version("32.1", sha256="d2081ab9528292f7980ef2d88d2be472453eea4222141046ad4f660874d5f24e")
21-
version("3.29.3", sha256="c8d0ed0085f559444f70311791cf7aef414246b9942441443963184b534dbf9e")
22-
version("3.28.2", sha256="1b6b6a7a7894f509f099c4469b5d4df525c2f3c9e4009e5b2db5b0f66cb8ee0e")
23-
version("3.27.5", sha256="a4aa92d0a207298149bf553d9a3192f3562eb91740086f50fa52331e60fa480c")
24-
version("3.26.1", sha256="f3c0830339eaa5036eba8ff8ce7fca5aa3088f7d616f7c3713d946f611ae92bf")
25-
version("3.25.3", sha256="da82be8acc5347c7918ef806ebbb621b24988f7e1a19b32cd7fc73bc29b59186")
26-
version("3.24.3", sha256="2c23dee0bdbc36bd43ee457083f8f5560265d0815cc1c56033de3932843262fe")
27-
version("3.23.3", sha256="5e4b555f72a7e3f143a7aff7262292500bb02c49b174351684bb70fc7f2a6d33")
28-
version("3.22.2", sha256="2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc")
29-
version("3.21.12", sha256="930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53")
30-
version("3.21.9", sha256="1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810")
31-
version("3.21.7", sha256="ce2fbea3c78147a41b2a922485d283137845303e5e1b6cbd7ece94b96ade7031")
32-
version("3.21.5", sha256="d7d204a59fd0d2d2387bd362c2155289d5060f32122c4d1d922041b61191d522")
33-
version("3.21.4", sha256="85d42d4485f36f8cec3e475a3b9e841d7d78523cd775de3a86dba77081f4ca25")
34-
version("3.21.3", sha256="c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126")
35-
version("3.21.2", sha256="66e1156ac78290db81335c79d1fc5a54123ebb62a43eb2e5b42a44ca23087517")
36-
version("3.21.1", sha256="a295dd3b9551d3e2749a9969583dea110c6cdcc39d02088f7c7bb1100077e081")
36+
version("31.1", sha256="c3a0a9ece8932e31c3b736e2db18b1c42e7070cd9b881388b26d01aa71e24ca2")
37+
version("30.2", sha256="07a43d88fe5a38e434c7f94129cad56a4c43a51f99336074d0799c2f7d4e44c5")
38+
version("29.3", sha256="c8d0ed0085f559444f70311791cf7aef414246b9942441443963184b534dbf9e")
39+
version("28.2", sha256="1b6b6a7a7894f509f099c4469b5d4df525c2f3c9e4009e5b2db5b0f66cb8ee0e")
40+
version("27.5", sha256="a4aa92d0a207298149bf553d9a3192f3562eb91740086f50fa52331e60fa480c")
41+
version("26.1", sha256="f3c0830339eaa5036eba8ff8ce7fca5aa3088f7d616f7c3713d946f611ae92bf")
42+
version("25.3", sha256="da82be8acc5347c7918ef806ebbb621b24988f7e1a19b32cd7fc73bc29b59186")
43+
version("24.3", sha256="2c23dee0bdbc36bd43ee457083f8f5560265d0815cc1c56033de3932843262fe")
44+
version("23.3", sha256="5e4b555f72a7e3f143a7aff7262292500bb02c49b174351684bb70fc7f2a6d33")
45+
version("22.2", sha256="2118051b4fb3814d59d258533a4e35452934b1ddb41230261c9543384cbb4dfc")
46+
version("21.12", sha256="930c2c3b5ecc6c9c12615cf5ad93f1cd6e12d0aba862b572e076259970ac3a53")
47+
version("21.9", sha256="1add10f9bd92775b91f326da259f243881e904dd509367d5031d4c782ba82810")
48+
version("21.7", sha256="ce2fbea3c78147a41b2a922485d283137845303e5e1b6cbd7ece94b96ade7031")
49+
version("21.5", sha256="d7d204a59fd0d2d2387bd362c2155289d5060f32122c4d1d922041b61191d522")
50+
version("21.4", sha256="85d42d4485f36f8cec3e475a3b9e841d7d78523cd775de3a86dba77081f4ca25")
51+
version("21.3", sha256="c29d8b4b79389463c546f98b15aa4391d4ed7ec459340c47bffe15db63eb9126")
52+
version("21.2", sha256="66e1156ac78290db81335c79d1fc5a54123ebb62a43eb2e5b42a44ca23087517")
53+
version("21.1", sha256="a295dd3b9551d3e2749a9969583dea110c6cdcc39d02088f7c7bb1100077e081")
3754
version("3.20.3", sha256="9c0fd39c7a08dff543c643f0f4baf081988129a411b977a07c46221793605638")
3855
version("3.20.2", sha256="88231778cffebf93bc905e76ea757fae0f2ef497cc00f64973e41f1acd4fc781")
3956
version("3.20.1", sha256="8b28fdd45bab62d15db232ec404248901842e5340299a57765e48abe8a80d930")
@@ -95,9 +112,9 @@ class Protobuf(CMakePackage):
95112
depends_on("cxx", type="build")
96113

97114
depends_on("abseil-cpp cxxstd=17", when="@32.1:")
98-
depends_on("[email protected]:", when="@3.22.5:")
115+
depends_on("[email protected]:", when="@22.5:")
99116
# https://github.com/protocolbuffers/protobuf/issues/11828#issuecomment-1433557509
100-
depends_on("abseil-cpp@20230125:", when="@3.22:")
117+
depends_on("abseil-cpp@20230125:", when="@22:")
101118
depends_on("zlib-api")
102119

103120
conflicts("%gcc@:4.6", when="@3.6.0:") # Requires c++11
@@ -121,25 +138,25 @@ class Protobuf(CMakePackage):
121138
# fix build on Centos 8, see also https://github.com/protocolbuffers/protobuf/issues/5144
122139
patch(
123140
"https://github.com/protocolbuffers/protobuf/commit/462964ed322503af52638d54c00a0a67d7133349.patch?full_index=1",
124-
when="@3.4:3.21",
141+
when="@3.4:21",
125142
sha256="9b6dcfa30dd3ae0abb66ab0f252a4fc1e1cc82a9820d2bdb72da35c4f80c3603",
126143
)
127144

128-
patch("msvc-abseil-target-namespace.patch", when="@3.22 %msvc")
145+
patch("msvc-abseil-target-namespace.patch", when="@22 %msvc")
129146

130147
# Misisng #include "absl/container/internal/layout.h"
131148
# See https://github.com/protocolbuffers/protobuf/pull/14042
132149
patch(
133150
"https://github.com/protocolbuffers/protobuf/commit/e052928c94f5a9a6a6cbdb82e09ab4ee92b7815f.patch?full_index=1",
134-
when="@3.22:3.24.3 ^abseil-cpp@20240116:",
151+
when="@22:24.3 ^abseil-cpp@20240116:",
135152
sha256="20e3cc99a9513b256e219653abe1bfc7d6b6a5413e269676e3d442830f99a1af",
136153
)
137154

138155
# Missing #include "absl/strings/str_cat.h"
139156
# See https://github.com/protocolbuffers/protobuf/pull/14054
140157
patch(
141158
"https://github.com/protocolbuffers/protobuf/commit/38a24729ec94e6576a1425951c898ad0b91ad2d2.patch?full_index=1",
142-
when="@3.22:3.24.3 ^abseil-cpp@20240116:",
159+
when="@22:24.3 ^abseil-cpp@20240116:",
143160
sha256="c061356db31cdce29c8cdd98a3a8219ef048ebc2318d0dec26c1f2c5e5dae29b",
144161
)
145162

@@ -158,7 +175,7 @@ def cmake_args(self):
158175
self.define("CMAKE_POSITION_INDEPENDENT_CODE", True),
159176
]
160177

161-
if self.spec.satisfies("@3.22:"):
178+
if self.spec.satisfies("@22:"):
162179
cxxstd = self.spec["abseil-cpp"].variants["cxxstd"].value
163180
args.extend(
164181
[

repos/spack_repo/builtin/packages/protobuf_c/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ class ProtobufC(AutotoolsPackage):
2626
depends_on("c", type="build") # generated
2727
depends_on("cxx", type="build") # generated
2828

29-
depends_on("protobuf@:3.21.12")
29+
depends_on("protobuf@:21.12")
3030
depends_on("pkgconfig", type="build")

repos/spack_repo/builtin/packages/py_protobuf/package.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ class PyProtobuf(PythonPackage):
7373
depends_on("py-setuptools", type=("build", "run"))
7474
depends_on("[email protected]:", when="@3.0:3.17", type=("build", "run"))
7575

76-
# Minor version must match protobuf
77-
for ver in range(32, 33):
76+
# https://protobuf.dev/support/version-support/#python
77+
for ver in range(30, 33):
7878
depends_on(f"protobuf@{ver}", when=f"@6.{ver}")
79-
for ver in range(26, 29):
80-
depends_on(f"protobuf@3.{ver}", when=f"@5.{ver}")
79+
for ver in range(26, 30):
80+
depends_on(f"protobuf@{ver}", when=f"@5.{ver}")
8181
for ver in range(21, 26):
82-
depends_on(f"protobuf@3.{ver}", when=f"@4.{ver}")
82+
depends_on(f"protobuf@{ver}", when=f"@4.{ver}")
8383
for ver in range(0, 21):
8484
depends_on(f"protobuf@3.{ver}", when=f"@3.{ver}")
8585

repos/spack_repo/builtin/packages/py_tf_keras/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class PyTfKeras(PythonPackage):
4343

4444
depends_on("[email protected]", type="build", when="@2.18:")
4545
# TODO: uncomment for 2.19
46-
# depends_on("protobuf@4.23.0", type="build", when="@2.19:")
46+
# depends_on("[email protected]", type="build", when="@2.19:")
4747
# the tf-keras versions are following along with TF versions
4848
# as defined in oss_setup.py
4949
for minor_ver in range(18, max_minor + 1):

0 commit comments

Comments
 (0)