summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@verizonmedia.com>2024-04-08 14:13:04 +0200
committerGitHub <noreply@github.com>2024-04-08 14:13:04 +0200
commit113e9e80dfa106cb1ca4d7f96039976311cab8dc (patch)
tree9fd11e524dc9d283920f383900e85d130e496a4c
parent88b23778c4a4bc6b3210e82f0aab015deb6a7495 (diff)
parentf8f0e7afcb6fac3325e72be014496e78790c1b58 (diff)
Merge pull request #30833 from vespa-engine/toregge/update-protobuf-version
Update to protobuf 5.26.1 (C++ API).
-rw-r--r--CMakeLists.txt2
-rw-r--r--dist/vespa.spec27
-rw-r--r--documentapi/src/vespa/documentapi/CMakeLists.txt1
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/CMakeLists.txt3
-rw-r--r--logd/src/logd/CMakeLists.txt4
-rw-r--r--searchlib/src/vespa/searchlib/CMakeLists.txt1
-rw-r--r--searchlib/src/vespa/searchlib/engine/CMakeLists.txt2
-rw-r--r--storage/src/vespa/storage/CMakeLists.txt1
-rw-r--r--storage/src/vespa/storage/storageserver/rpc/CMakeLists.txt2
-rw-r--r--storage/src/vespa/storageapi/mbusprot/CMakeLists.txt2
-rw-r--r--storageserver/src/apps/storaged/CMakeLists.txt1
11 files changed, 29 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab79c607cab..3c353863053 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,7 @@ find_package(JNI REQUIRED)
find_package(GTest REQUIRED)
-find_package(Protobuf REQUIRED)
+find_package(Protobuf REQUIRED CONFIG)
include(build_settings.cmake)
diff --git a/dist/vespa.spec b/dist/vespa.spec
index 4886bd43db8..2c90b99a9dc 100644
--- a/dist/vespa.spec
+++ b/dist/vespa.spec
@@ -32,7 +32,12 @@
%define _create_vespa_service 1
%define _defattr_is_vespa_vespa 0
%define _command_cmake cmake3
-%global _vespa_build_depencencies_version 1.2.7
+%global _vespa_abseil_cpp_version 20240116.1
+%global _vespa_build_depencencies_version 1.3.0
+%global _vespa_gtest_version 1.14.0
+%global _vespa_protobuf_version 5.26.1
+%global _use_vespa_abseil_cpp 1
+%global _use_vespa_protobuf 1
Name: vespa
Version: _VESPA_VERSION_
@@ -74,33 +79,35 @@ Requires: zstd
%define _use_vespa_gtest 1
%define _use_vespa_openblas 1
%define _use_vespa_openssl 1
-%define _use_vespa_protobuf 1
%if 0%{?centos} || 0%{?rocky} || 0%{?oraclelinux}
%define _command_cmake cmake
%endif
-Requires: vespa-gtest = 1.13.0
+Requires: vespa-gtest = %{_vespa_gtest_version}
%endif
%if 0%{?el9}
%global _centos_stream %(grep -qs '^NAME="CentOS Stream"' /etc/os-release && echo 1 || echo 0)
%define _devtoolset_enable /opt/rh/gcc-toolset/enable
-%define _use_vespa_protobuf 1
-Requires: gtest
+%define _use_vespa_gtest 1
+
+Requires: vespa-gtest = %{_vespa_gtest_version}
%endif
%if 0%{?amzn2023}
%define _java_home /usr/lib/jvm/java-17-amazon-corretto
+%define _use_vespa_gtest 1
%define _use_vespa_re2 1
%define _use_vespa_xxhash 1
+Requires: vespa-gtest = %{_vespa_gtest_version}
Requires: vespa-xxhash >= 0.8.1
%endif
-%if 0%{?fedora}
+%if 0%{?fedora} && !0%{?amzn2023}
Requires: gtest
%endif
@@ -115,7 +122,7 @@ Requires: xxhash-libs >= 0.8.1
# Ugly workaround because vespamalloc/src/vespamalloc/malloc/mmap.cpp uses the private
# _dl_sym function.
# Exclude automated requires for libraries in /opt/vespa-deps/lib64.
-%global __requires_exclude ^lib(c\\.so\\.6\\(GLIBC_PRIVATE\\)|pthread\\.so\\.0\\(GLIBC_PRIVATE\\)|(lz4%{?_use_vespa_protobuf:|protobuf}|zstd|onnxruntime%{?_use_vespa_openssl:|crypto|ssl}%{?_use_vespa_openblas:|openblas}%{?_use_vespa_re2:|re2}%{?_use_vespa_xxhash:|xxhash}%{?_use_vespa_gtest:|(gtest|gmock)(_main)?})\\.so\\.[0-9.]*\\([A-Za-z._0-9]*\\))\\(64bit\\)$
+%global __requires_exclude ^lib(c\\.so\\.6\\(GLIBC_PRIVATE\\)|pthread\\.so\\.0\\(GLIBC_PRIVATE\\)|(lz4%{?_use_vespa_protobuf:|protobuf}|zstd|onnxruntime%{?_use_vespa_openssl:|crypto|ssl}%{?_use_vespa_openblas:|openblas}%{?_use_vespa_re2:|re2}%{?_use_vespa_xxhash:|xxhash}%{?_use_vespa_gtest:|(gtest|gmock)(_main)?}%{?_use_vespa_abseil_cpp:|absl_[a-z_0-9]*})\\.so\\.[0-9.]*\\([A-Za-z._0-9]*\\))\\(64bit\\)$
%description
@@ -187,14 +194,14 @@ Requires: openssl-libs
%endif
%if 0%{?el8}
Requires: llvm-libs
-Requires: vespa-protobuf = 3.21.12
+Requires: vespa-protobuf = %{_vespa_protobuf_version}
%endif
%if 0%{?el9}
Requires: llvm-libs
-Requires: vespa-protobuf = 3.21.12
+Requires: vespa-protobuf = %{_vespa_protobuf_version}
%endif
%if 0%{?fedora}
-Requires: protobuf
+Requires: vespa-protobuf = %{_vespa_protobuf_version}
Requires: llvm-libs
%endif
Requires: vespa-onnxruntime = 1.17.1
diff --git a/documentapi/src/vespa/documentapi/CMakeLists.txt b/documentapi/src/vespa/documentapi/CMakeLists.txt
index 1d0b3784a9d..8f9fbc4ac11 100644
--- a/documentapi/src/vespa/documentapi/CMakeLists.txt
+++ b/documentapi/src/vespa/documentapi/CMakeLists.txt
@@ -6,6 +6,7 @@ vespa_add_library(documentapi
$<TARGET_OBJECTS:documentapi_documentapipolicies>
INSTALL lib64
DEPENDS
+ protobuf::libprotobuf
)
vespa_add_target_package_dependency(documentapi Protobuf)
diff --git a/documentapi/src/vespa/documentapi/messagebus/CMakeLists.txt b/documentapi/src/vespa/documentapi/messagebus/CMakeLists.txt
index d59fd56037d..b1660943355 100644
--- a/documentapi/src/vespa/documentapi/messagebus/CMakeLists.txt
+++ b/documentapi/src/vespa/documentapi/messagebus/CMakeLists.txt
@@ -1,9 +1,8 @@
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-find_package(Protobuf REQUIRED)
-
# .proto files are in a higher-level directory as they are shared across languages
set(documentapi_messagebus_PROTOBUF_REL_PATH "../../../protobuf")
+set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON)
PROTOBUF_GENERATE_CPP(documentapi_messagebus_PROTOBUF_SRCS documentapi_messagebus_PROTOBUF_HDRS
"${documentapi_messagebus_PROTOBUF_REL_PATH}/docapi_common.proto"
"${documentapi_messagebus_PROTOBUF_REL_PATH}/docapi_feed.proto"
diff --git a/logd/src/logd/CMakeLists.txt b/logd/src/logd/CMakeLists.txt
index ef4ac360881..f9bf58cd03c 100644
--- a/logd/src/logd/CMakeLists.txt
+++ b/logd/src/logd/CMakeLists.txt
@@ -3,7 +3,8 @@
# logd is the only cpp module using the protobuf files for the log protocol.
# We have choosen to generate the cpp code where it is used, instead of changing the java logserver module to also generate and export cpp code just for this case.
# If more cpp modules requires the cpp protobuf files we should move code generation to a common place.
-find_package(Protobuf REQUIRED)
+
+set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON)
protobuf_generate_cpp(logd_PROTOBUF_SRCS logd_PROTOBUF_HDRS ../../../logserver/src/protobuf/log_protocol.proto)
vespa_add_source_target(protobufgen_logd DEPENDS ${logd_PROTOBUF_SRCS} ${logd_PROTOBUF_HDRS})
@@ -22,6 +23,7 @@ vespa_add_library(logd STATIC
${logd_PROTOBUF_SRCS}
DEPENDS
+ protobuf::libprotobuf
)
vespa_generate_config(logd ../main/resources/configdefinitions/logd.def)
diff --git a/searchlib/src/vespa/searchlib/CMakeLists.txt b/searchlib/src/vespa/searchlib/CMakeLists.txt
index c15cf055a60..849d22455d0 100644
--- a/searchlib/src/vespa/searchlib/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/CMakeLists.txt
@@ -39,6 +39,7 @@ vespa_add_library(searchlib
vespalib
ICU::i18n
ICU::uc
+ protobuf::libprotobuf
${VESPA_ATOMIC_LIB}
)
diff --git a/searchlib/src/vespa/searchlib/engine/CMakeLists.txt b/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
index b02b977f0e4..09c2002f113 100644
--- a/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
+++ b/searchlib/src/vespa/searchlib/engine/CMakeLists.txt
@@ -1,6 +1,6 @@
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-find_package(Protobuf REQUIRED)
+set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON)
protobuf_generate_cpp(searchlib_engine_PROTOBUF_SRCS searchlib_engine_PROTOBUF_HDRS ../../../../src/protobuf/search_protocol.proto)
vespa_add_source_target(protobufgen_searchlib_engine DEPENDS ${searchlib_engine_PROTOBUF_SRCS} ${searchlib_engine_PROTOBUF_HDRS})
diff --git a/storage/src/vespa/storage/CMakeLists.txt b/storage/src/vespa/storage/CMakeLists.txt
index e5b62f917d5..7e02124d170 100644
--- a/storage/src/vespa/storage/CMakeLists.txt
+++ b/storage/src/vespa/storage/CMakeLists.txt
@@ -33,6 +33,7 @@ vespa_add_library(storage
$<TARGET_OBJECTS:storageapi_mbusprot>
INSTALL lib64
DEPENDS
+ protobuf::libprotobuf
)
vespa_add_target_package_dependency(storage Protobuf)
diff --git a/storage/src/vespa/storage/storageserver/rpc/CMakeLists.txt b/storage/src/vespa/storage/storageserver/rpc/CMakeLists.txt
index b749f35b8bd..c920319e51a 100644
--- a/storage/src/vespa/storage/storageserver/rpc/CMakeLists.txt
+++ b/storage/src/vespa/storage/storageserver/rpc/CMakeLists.txt
@@ -1,6 +1,6 @@
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-find_package(Protobuf REQUIRED)
+set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON)
PROTOBUF_GENERATE_CPP(storage_storageserver_rpc_PROTOBUF_SRCS storage_storageserver_rpc_PROTOBUF_HDRS
protobuf/rpc_envelope.proto
)
diff --git a/storage/src/vespa/storageapi/mbusprot/CMakeLists.txt b/storage/src/vespa/storageapi/mbusprot/CMakeLists.txt
index 171e8918f71..fa9d9b165a1 100644
--- a/storage/src/vespa/storageapi/mbusprot/CMakeLists.txt
+++ b/storage/src/vespa/storageapi/mbusprot/CMakeLists.txt
@@ -1,6 +1,6 @@
# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-find_package(Protobuf REQUIRED)
+set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON)
PROTOBUF_GENERATE_CPP(storageapi_PROTOBUF_SRCS storageapi_PROTOBUF_HDRS
protobuf/common.proto
protobuf/feed.proto
diff --git a/storageserver/src/apps/storaged/CMakeLists.txt b/storageserver/src/apps/storaged/CMakeLists.txt
index 89f0a3488ce..67377c6cba3 100644
--- a/storageserver/src/apps/storaged/CMakeLists.txt
+++ b/storageserver/src/apps/storaged/CMakeLists.txt
@@ -7,6 +7,7 @@ vespa_add_executable(storageserver_storaged_app
INSTALL sbin
DEPENDS
storageserver_storageapp
+ protobuf::libprotobuf
)
vespa_add_target_package_dependency(storageserver_storaged_app Protobuf)