Skip to content

Commit

Permalink
Rebuild libabseil20240722 grpc165 libprotobuf5275 0 1 h023473 (#107)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Sep 30, 2024
2 parents 3416c84 + 034172a commit 42609dc
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ docker_image:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
megabuild:
- 'true'
pin_run_as_build:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ docker_image:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
megabuild:
- 'true'
pin_run_as_build:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
__migrator:
build_number: 1
commit_message: Rebuild for libabseil 20240722, libgrp 1.65 & libprotobuf 5.27.5
kind: version
migration_number: 1
exclude:
- abseil-cpp
- grpc-cpp
- libprotobuf
- protobuf
- re2
libabseil:
- 20240722
libgrpc:
- "1.65"
libprotobuf:
- 5.27.5
migrator_ts: 1727040240.8650293
4 changes: 2 additions & 2 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ cxx_compiler_version:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
macos_machine:
- x86_64-apple-darwin13.4.0
megabuild:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ cxx_compiler_version:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
macos_machine:
- arm64-apple-darwin20.0.0
megabuild:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/win_64_python3.10.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cxx_compiler:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
megabuild:
- 'false'
pin_run_as_build:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/win_64_python3.11.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cxx_compiler:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
megabuild:
- 'false'
pin_run_as_build:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/win_64_python3.12.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cxx_compiler:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
megabuild:
- 'false'
pin_run_as_build:
Expand Down
4 changes: 2 additions & 2 deletions .ci_support/win_64_python3.9.____cpython.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ cxx_compiler:
flatbuffers:
- 24.3.25
libabseil:
- '20240116'
- '20240722'
libprotobuf:
- 4.25.3
- 5.27.5
megabuild:
- 'false'
pin_run_as_build:
Expand Down
4 changes: 2 additions & 2 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# !/usr/bin/env bash

set +ex
set -exuo pipefail

if [[ "$CONDA_BUILD_CROSS_COMPILATION" == 1 ]]; then
if [[ "${CONDA_BUILD_CROSS_COMPILATION:-0}" == 1 ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DProtobuf_PROTOC_EXECUTABLE=$BUILD_PREFIX/bin/protoc"
fi

Expand Down
6 changes: 5 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ source:
- url: https://github.com/openvinotoolkit/openvino/archive/refs/tags/{{ version }}.tar.gz
sha256: aeb6297e3e88b4ab7803b27b231a72bd0493b6761ef98f225142146be500f538
patches:
- patches/001-protobuf-version.patch
- patches/003-lin-arm64-compute-lib.patch # [aarch64]
- url: https://github.com/ARM-software/ComputeLibrary/archive/refs/tags/v24.08.tar.gz # [aarch64 or arm64]
sha256: b3576ffa2a70e7704bdf7febe7109f4cfb416a0178222b58f5ee0fd455980337 # [aarch64 or arm64]
Expand All @@ -34,7 +35,7 @@ source:
folder: thirdparty/onnx/onnx

build:
number: 0
number: 1

requirements:
build:
Expand Down Expand Up @@ -147,6 +148,7 @@ outputs:
- cmake
host:
- libprotobuf
- libabseil
- {{ pin_subpackage('libopenvino', exact=True) }}
run:
- {{ pin_subpackage('libopenvino', exact=True) }}
Expand Down Expand Up @@ -177,6 +179,7 @@ outputs:
- cmake
host:
- libprotobuf
- libabseil
- {{ pin_subpackage('libopenvino', exact=True) }}
run:
- {{ pin_subpackage('libopenvino', exact=True) }}
Expand Down Expand Up @@ -509,6 +512,7 @@ outputs:
- pugixml # for OpenVINO Developer package only
- python
- pip
- setuptools
- {{ pin_subpackage('libopenvino', exact=True) }}
# subpackages below have explicit python bindings
- {{ pin_subpackage('libopenvino-onnx-frontend', exact=True) }}
Expand Down
95 changes: 95 additions & 0 deletions recipe/patches/001-protobuf-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
diff --git a/src/frontends/onnx/frontend/src/frontend.cpp b/src/frontends/onnx/frontend/src/frontend.cpp
index d4b83fee20..f352c07894 100644
--- a/src/frontends/onnx/frontend/src/frontend.cpp
+++ b/src/frontends/onnx/frontend/src/frontend.cpp
@@ -2,14 +2,16 @@
// SPDX-License-Identifier: Apache-2.0
//

-#include <google/protobuf/port_def.inc>
+#include <google/protobuf/runtime_version.h>
+
#if PROTOBUF_VERSION >= 4022000 // protobuf 4.22
# define OV_PROTOBUF_ABSL_IS_USED
#endif
-#include <google/protobuf/port_undef.inc>

-#ifndef OV_PROTOBUF_ABSL_IS_USED
-# include <google/protobuf/stubs/logging.h>
+#ifdef OV_PROTOBUF_ABSL_IS_USED
+# include <absl/log/globals.h>
+#else
+# include <google/protobuf/stubs/logging.h>
#endif

#include <fstream>
@@ -45,7 +47,9 @@ ONNX_FRONTEND_C_API void* get_front_end_data() {
};
#ifndef OPENVINO_DEBUG_ENABLE
// disable protobuf logging
-# ifndef OV_PROTOBUF_ABSL_IS_USED
+# ifdef OV_PROTOBUF_ABSL_IS_USED
+ absl::SetGlobalVLogLevel(0);
+# else
google::protobuf::SetLogHandler(nullptr);
# endif
#endif
diff --git a/src/frontends/paddle/src/frontend.cpp b/src/frontends/paddle/src/frontend.cpp
index c6febe0843..6b8be8c5c8 100644
--- a/src/frontends/paddle/src/frontend.cpp
+++ b/src/frontends/paddle/src/frontend.cpp
@@ -4,14 +4,16 @@

#include "openvino/frontend/paddle/frontend.hpp"

-#include <google/protobuf/port_def.inc>
+#include <google/protobuf/runtime_version.h>
+
#if PROTOBUF_VERSION >= 4022000 // protobuf 4.22
# define OV_PROTOBUF_ABSL_IS_USED
#endif
-#include <google/protobuf/port_undef.inc>

-#ifndef OV_PROTOBUF_ABSL_IS_USED
-# include <google/protobuf/stubs/logging.h>
+#ifdef OV_PROTOBUF_ABSL_IS_USED
+# include <absl/log/globals.h>
+#else
+# include <google/protobuf/stubs/logging.h>
#endif

#include <fstream>
@@ -594,7 +596,9 @@ PADDLE_C_API void* get_front_end_data() {

#ifndef OPENVINO_DEBUG_ENABLE
// disable protobuf logging
-# ifndef OV_PROTOBUF_ABSL_IS_USED
+# ifdef OV_PROTOBUF_ABSL_IS_USED
+ absl::SetGlobalVLogLevel(0);
+# else
google::protobuf::SetLogHandler(nullptr);
# endif
#endif
diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake
index 9d7b16aeb8..40af5fff2d 100644
--- a/thirdparty/dependencies.cmake
+++ b/thirdparty/dependencies.cmake
@@ -325,17 +325,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND
# try to find newer version first (major is changed)
# see https://protobuf.dev/support/version-support/ and
# https://github.com/protocolbuffers/protobuf/commit/d61f75ff6db36b4f9c0765f131f8edc2f86310fa
- find_package(Protobuf 4.22.0 QUIET CONFIG)
- if(Protobuf_FOUND)
- # protobuf was found via CONFIG mode, let's save it for later usage in OpenVINOConfig.cmake static build
- set(protobuf_config CONFIG)
- else()
- if(OV_VCPKG_BUILD)
- set(protobuf_config CONFIG)
- endif()
- # otherwise, fallback to existing default
- find_package(Protobuf 3.20.3 REQUIRED ${protobuf_config})
- endif()
+ find_package(Protobuf QUIET CONFIG)

# with newer protobuf versions (4.22 and newer), we use CONFIG first
# so, the Protobuf_PROTOC_EXECUTABLE variable must be checked explicitly,

0 comments on commit 42609dc

Please sign in to comment.