Make RPM packages compatible with wide range of RHEL systems (#20762)

This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2023-10-31 10:25:35 +04:00
1 parent 991b9848fa
commit b13cb8ce12
18 files changed
+82 -250

No files matched your search

+2
View File
@@ -65,6 +65,8 @@ jobs:
run: |
pushd ${OPENVINO_REPO}
git submodule update --init -- ${OPENVINO_REPO}/src/plugins
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/zlib
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
-1
View File
@@ -111,7 +111,6 @@ jobs:
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_OPENCL=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DENABLE_PYTHON_PACKAGING=ON \
-DCPACK_GENERATOR=TGZ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-1
View File
@@ -153,7 +153,6 @@ jobs:
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_OPENCL=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCPACK_GENERATOR=TGZ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
+4 -1
View File
@@ -71,8 +71,11 @@ jobs:
- name: Init submodules for non-Conan dependencies
run: |
pushd ${OPENVINO_REPO}
git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/zlib
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
popd
@@ -1,10 +1,10 @@
* Sun Jul 4 12:00:00 2010 OpenVINO Developers <openvino@intel.com> - 2022.3.0-1
* Sun Dec 25 2022 OpenVINO Developers <openvino@intel.com> - 2022.3.0-1
- Implemented Debian, RPM packages support
- Support of Ubuntu 22.04
- Support of python 3.10
- Introduced OpenVINO Runtime 2.0 C API
* Thu Jul 28 12:00:00 2022 OpenVINO Developers <openvino@intel.com> - 2022.2.0-1
* Thu Jul 28 2022 OpenVINO Developers <openvino@intel.com> - 2022.2.0-1
- Broader model and hardware support - Optimize & deploy with ease across an expanded range of deep learning models including NLP, and access AI acceleration across an expanded range of hardware.
- NEW: Support for Intel 13th Gen Core Processor for desktop (code named Raptor Lake).
- NEW: Preview support for Intel’s discrete graphics cards, Intel® Data Center GPU Flex Series and Intel® Arc™ GPU for DL inferencing workloads in intelligent cloud, edge and media analytics workloads. Hundreds of models enabled.
@@ -18,6 +18,6 @@
- NEW: Introducing new performance hint (”Cumulative throughput”) in AUTO device, enabling multiple accelerators (e.g. multiple GPUs) to be used at once to maximize inferencing performance.
- NEW: Introducing Intel® FPGA AI Suite support which enables real-time, low-latency, and low-power deep learning inference in this easy-to-use package  
* Thu Mar 22 12:00:00 2022 OpenVINO Developers <openvino@intel.com> - 2022.1.0-1
* Thu Mar 22 2022 OpenVINO Developers <openvino@intel.com> - 2022.1.0-1
- Implemented OpenVINO 2.0 Runtime API for both C++ and Python
- Introduced IR v11 which is aligned with frameworks model format
@@ -120,8 +120,7 @@ macro(ov_rpm_specific_settings)
# group
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
# changelog file
# TODO: fix "error: bad date in %changelog"
# set(CPACK_RPM_CHANGELOG_FILE "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/rpm/changelog")
set(CPACK_RPM_CHANGELOG_FILE "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/rpm/changelog")
# use rpmlint to check packages in post-build step
set(CPACK_POST_BUILD_SCRIPTS "${OpenVINODeveloperScripts_DIR}/packaging/rpm/post_build.cmake")
# enable for debug cpack run
+1 -12
View File
@@ -152,15 +152,6 @@ else()
set(ENABLE_SYSTEM_LIBS_DEFAULT OFF)
endif()
if(BUILD_SHARED_LIBS)
set(ENABLE_SYSTEM_PUGIXML_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT})
else()
# for static libraries case libpugixml.a must be compiled with -fPIC
# but we still need an ability to compile with system PugiXML and BUILD_SHARED_LIBS
# for Conan case where everything is compiled statically
set(ENABLE_SYSTEM_PUGIXML_DEFAULT OFF)
endif()
if(ANDROID)
# when protobuf from /usr/include is used, then Android toolchain ignores include paths
# but if we build for Android using vcpkg / conan / etc where flatbuffers is not located in
@@ -179,9 +170,7 @@ endif()
ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT}
"THREADING MATCHES TBB" OFF)
# TODO: turn it off by default during the work on cross-os distribution, because pugixml is not
# available out of box on all systems (like RHEL, UBI)
ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" ${ENABLE_SYSTEM_PUGIXML_DEFAULT})
ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" OFF)
# the option is on by default, because we use only flatc compiler and don't use any libraries
ov_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT}
"ENABLE_OV_TF_LITE_FRONTEND" OFF)
-6
View File
@@ -347,18 +347,12 @@ macro(ov_cpack_settings)
set(samples_build_deps "cmake, g++, gcc, libc6-dev, make, pkg-config")
set(samples_build_deps_suggest "libopencv-core-dev, libopencv-imgproc-dev, libopencv-imgcodecs-dev")
set(samples_opencl_suggest "ocl-icd-opencl-dev, opencl-headers")
# Ubuntu 18.04, Debian 9 cases have nlohmann-json-dev
# newer systems have nlohmann-json3-dev
# according to https://www.debian.org/doc/debian-policy/ch-relationships.html#syntax-of-relationship-fields
# we can use | (pipe) to provide alternative package names
set(json_library "nlohmann-json3-dev | nlohmann-json-dev")
# c_samples / cpp_samples
set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Samples")
set(CPACK_COMPONENT_SAMPLES_DEPENDS "${OV_CPACK_COMP_CORE_DEV}")
set(CPACK_DEBIAN_SAMPLES_PACKAGE_NAME "openvino-samples-${cpack_name_ver}")
set(CPACK_DEBIAN_SAMPLES_PACKAGE_SUGGESTS "${samples_build_deps_suggest}, ${samples_opencl_suggest}, ${all_plugins_suggest}")
set(CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS "libgflags-dev, zlib1g-dev, ${json_library}")
# can be skipped with --no-install-recommends
set(CPACK_DEBIAN_SAMPLES_PACKAGE_RECOMMENDS "${samples_build_deps}")
set(CPACK_DEBIAN_SAMPLES_PACKAGE_ARCHITECTURE "all")
+1 -3
View File
@@ -307,7 +307,7 @@ macro(ov_cpack_settings)
# SUGGESTS may be unsupported, it's part of RPM 4.12.0 (Sep 16th 2014) only
# see https://rpm.org/timeline.html
set(CPACK_RPM_SAMPLES_PACKAGE_SUGGESTS "${samples_build_deps_suggest}, ${samples_opencl_deps_suggest}, ${plugin_packages}")
set(CPACK_RPM_SAMPLES_PACKAGE_REQUIRES "${core_dev_package}, ${samples_build_deps}, gflags-devel, json-devel, zlib-devel")
set(CPACK_RPM_SAMPLES_PACKAGE_REQUIRES "${core_dev_package}, ${samples_build_deps}")
set(CPACK_RPM_SAMPLES_PACKAGE_ARCHITECTURE "noarch")
ov_rpm_generate_conflicts(${OV_CPACK_COMP_CPP_SAMPLES} ${conflicting_versions})
@@ -315,8 +315,6 @@ macro(ov_cpack_settings)
# contains samples source codes
"devel-file-in-non-devel-package /usr/${OV_CPACK_SAMPLESDIR}/cpp/*"
"devel-file-in-non-devel-package /usr/${OV_CPACK_SAMPLESDIR}/c/*"
# depends on gflags-devel
"devel-dependency gflags-devel"
# duplicated files are OK
"files-duplicate /usr/${OV_CPACK_SAMPLESDIR}/cpp/CMakeLists.txt /usr/${OV_CPACK_SAMPLESDIR}/c/CMakeLists.txt"
"files-duplicate /usr/${OV_CPACK_SAMPLESDIR}/cpp/build_samples.sh /usr/${OV_CPACK_SAMPLESDIR}/c/build_samples.sh"
-3
View File
@@ -13,17 +13,14 @@
"opencl-clhpp-headers/2023.04.17#7c62fcc7ac2559d4839150d2ebaac5c8%1685450803.672",
"onnx/1.14.1#d95f4e64bedf3dc6898253847ac69005%1693130309.828",
"onetbb/2021.10.0#cbb2fc43088070b48f6e4339bc8fa0e1%1693812561.235",
"nlohmann_json/3.11.2#a35423bb6e1eb8f931423557e282c7ed%1666619820.488",
"ittapi/3.24.0#9246125f13e7686dee2b0c992b71db94%1682969872.743",
"hwloc/2.9.2#1c63e2eccac57048ae226e6c946ebf0e%1688677682.002",
"gflags/2.2.2#48d1262ffac8d30c3224befb8275a533%1676224985.343",
"flatbuffers/23.5.26#b153646f6546daab4c7326970b6cd89c%1685838458.449",
"ade/0.1.2c#8c03c130df6dc35186b38ba73a40a71d%1694253992.577"
],
"build_requires": [
"zlib/1.2.13#97d5730b529b4224045fe7090592d4c1%1692672717.049",
"protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69",
"protobuf/3.21.9#515ceb0a1653cf84363d9968b812d6be%1678364058.993",
"pkgconf/1.9.5#743ca0d41d35a84b1f89af337ddaa1a0%1688570267.802",
"patchelf/0.13#0eaada8970834919c3ce14355afe7fac%1680534241.341",
"ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21%1684431244.21",
+2 -4
View File
@@ -4,14 +4,11 @@ onetbb/[>=2021.2.1]
pugixml/[>=1.10]
protobuf/3.21.12
ittapi/[>=3.23.0]
zlib/[>=1.2.8]
opencl-icd-loader/[>=2023.04.17]
rapidjson/[>=1.1.0]
xbyak/[>=6.62]
snappy/[>=1.1.7]
gflags/2.2.2
onnx/1.14.1
nlohmann_json/[>=3.1.1]
pybind11/[>=2.10.1]
flatbuffers/[>=22.9.24]
@@ -19,11 +16,12 @@ flatbuffers/[>=22.9.24]
cmake/[>=3.20]
pkgconf/1.9.5
patchelf/[>=0.12]
protobuf/3.21.9
protobuf/3.21.12
flatbuffers/[>=22.9.24]
[options]
protobuf/*:lite=True
protobuf/*:with_zlib=False
protobuf/*:shared=False
flatbuffers/*:header_only=True
@@ -25,7 +25,16 @@
.. note::
Installing OpenVINO from YUM is only supported on RHEL 8.2 and higher versions. CentOS 7 is not supported for this installation method.
OpenVINO RPM packages are compatible with and can be run on the following operating systems:
- RHEL 8.2 and higher
- Amazon Linux 2022 and 2023
- Rocky Linux 8.7, 8.8 and 9.2
- Alma Linux 8.7, 8.8 and 9.2
- Oracle Linix 8.7, 8.8 and 9.2
- Fedora 29 and higher up to 40
- OpenEuler 20.03 and 22.03
- Anolis OS 8.6 and 8.8
- CentOS Stream 8 and 9
.. tab-item:: Processor Notes
:sync: processor-notes
-27
View File
@@ -108,32 +108,6 @@ endif()
if(TARGET gflags)
set(GFLAGS_TARGET gflags)
elseif(gflags_required)
if(EXISTS /etc/debian_version)
set(gflags_component nothreads_static)
else()
set(gflags_component shared)
endif()
find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflags_component})
if(gflags_FOUND)
if(TARGET ${GFLAGS_TARGET})
# nothing
elseif(TARGET gflags_nothreads-static)
# Debian 9: gflag_component is ignored
set(GFLAGS_TARGET gflags_nothreads-static)
elseif(TARGET gflags-shared)
# gflags shared case for CentOS / RHEL / Fedora
set(GFLAGS_TARGET gflags-shared)
elseif(TARGET gflags::gflags)
# gflags case for Conan
set(GFLAGS_TARGET gflags::gflags)
else()
message(FATAL_ERROR "Internal error: failed to find imported target 'gflags' using '${gflags_component}' component")
endif()
message(STATUS "gflags (${gflags_VERSION}) is found at ${gflags_DIR} using '${gflags_component}' component")
endif()
if(NOT gflags_FOUND)
set(GFLAGS_TARGET gflags_nothreads_static)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags")
add_subdirectory(thirdparty/gflags EXCLUDE_FROM_ALL)
@@ -145,7 +119,6 @@ elseif(gflags_required)
message(FATAL_ERROR "Failed to find 'gflags' library using '${gflags_component}' component")
endif()
endif()
endif()
# include common utils
add_subdirectory(common)
-42
View File
@@ -15,47 +15,6 @@ ov_add_sample(NAME ${TARGET_NAME}
# Required nlohmann_json dependency
if(NOT TARGET nlohmann_json::nlohmann_json)
find_package(PkgConfig QUIET)
find_package(nlohmann_json QUIET
# exception for Ubuntu 18.04, where cmake files for nlohmann_json
# are located in a wrong directory
HINTS /usr/lib/cmake)
if(TARGET nlohmann_json)
# Ubuntu 18.04 case where target 'nlohmann_json' is here, but nlohmann_json_FOUND is OFF
if(NOT TARGET nlohmann_json::nlohmann_json)
set_target_properties(nlohmann_json PROPERTIES IMPORTED_GLOBAL ON)
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
endif()
set(nlohmann_json_FOUND ON)
endif()
if(nlohmann_json_FOUND)
message(STATUS "nlohmann_json (${nlohmann_json_VERSION}) is found at ${nlohmann_json_DIR}")
elseif(PkgConfig_FOUND)
pkg_search_module(nlohmann_json QUIET
IMPORTED_TARGET GLOBAL
nlohmann_json)
if(nlohmann_json_FOUND)
add_library(nlohmann_json::nlohmann_json ALIAS PkgConfig::nlohmann_json)
endif()
endif()
if(NOT nlohmann_json_FOUND)
# try to find header file json.hpp
# for example, on debian 9 there is no cmake / pkgconfig files
find_file(nlohmann_include_file
NAMES "json.hpp"
"Path to json.hpp (nlohmann-json-dev)")
if(nlohmann_include_file)
add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED)
get_filename_component(nlohmann_include_dir "${nlohmann_include_file}" PATH)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${nlohmann_include_dir}"
INTERFACE_COMPILE_DEFINITIONS JSON_HEADER)
set(nlohmann_json_FOUND ON)
endif()
endif()
if(NOT nlohmann_json_FOUND)
if(EXISTS "${Samples_SOURCE_DIR}/thirdparty/nlohmann_json")
# OpenVINO package puts thirdparty to samples dir
# suppress shadowing names warning
@@ -72,7 +31,6 @@ if(NOT TARGET nlohmann_json::nlohmann_json)
message(FATAL_ERROR "Failed to find / build nlohmann_json library")
endif()
endif()
endif()
target_link_libraries(${TARGET_NAME} PRIVATE nlohmann_json::nlohmann_json)
+1 -15
View File
@@ -8,22 +8,8 @@ file (GLOB HDR ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
# Required zlib and cnpy dependencies
find_package(ZLIB QUIET)
if(NOT TARGET ZLIB::ZLIB)
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_search_module(zlib QUIET
IMPORTED_TARGET GLOBAL
zlib)
if(zlib_FOUND)
add_library(ZLIB::ZLIB ALIAS PkgConfig::zlib)
endif()
endif()
if(zlib_FOUND)
message(STATUS "${PKG_CONFIG_EXECUTABLE}: zlib (${zlib_VERSION}) is found at ${zlib_PREFIX}")
elseif(EXISTS "${Samples_SOURCE_DIR}/thirdparty/zlib")
if(EXISTS "${Samples_SOURCE_DIR}/thirdparty/zlib")
# OpenVINO package puts thirdparty to samples dir
add_subdirectory("${Samples_SOURCE_DIR}/thirdparty/zlib"
"${Samples_BINARY_DIR}/thirdparty/zlib" EXCLUDE_FROM_ALL)
@@ -94,10 +94,16 @@ if [ "$os" == "auto" ] ; then
os="rhel8"
fi
case $os in
centos7|centos8|rhel8|rhel9.1|\
almalinux8.7|amzn2|\
centos7|centos8|centos9|\
rhel8|rhel9.1|\
anolis8.6|anolis8.8|\
openEuler20.03|openEuler22.03|openEuler23.03|\
almalinux8.7|almalinux8.8|almalinux9.2|\
amzn2|amzn2022|amzn2023|\
ol8.7|ol8.8|ol9.2|\
rocky8.7|rocky8.8|rocky9.2|\
fedora29|fedora30|fedora31|fedora32|fedora33|fedora34|fedora35|fedora36|fedora37|fedora38|fedora39|fedora40|\
opensuse-leap15.3|\
fedora34|fedora35|fedora36|fedora37|fedora38|\
raspbian9|debian9|ubuntu18.04|\
raspbian10|debian10|ubuntu20.04|ubuntu20.10|ubuntu21.04|\
raspbian11|debian11|ubuntu21.10|ubuntu22.04|\
@@ -118,26 +124,26 @@ if [ "$os" == "raspbian9" ] || [ "$os" == "debian9" ] ; then
# - cmake version is 3.7.2
# which are not supported by OpenVINO
pkgs_core=(libpugixml1v5)
pkgs_core=()
pkgs_gpu=(ocl-icd-libopencl1)
pkgs_python=()
pkgs_dev=(pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json-dev make curl sudo)
pkgs_dev=(pkg-config g++ gcc libc6-dev make sudo)
elif [ "$os" == "ubuntu18.04" ] ; then
pkgs_core=(libtbb2 libpugixml1v5)
pkgs_core=(libtbb2)
pkgs_gpu=(ocl-icd-libopencl1)
pkgs_python=(python3.8 libpython3.8 python3.8-venv python3-pip)
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json-dev make curl sudo)
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev make sudo)
elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbian10" ] ||
[ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] || [ "$os" == "debian11" ] || [ "$os" == "raspbian11" ] ||
[ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ]; then
pkgs_core=(libpugixml1v5)
pkgs_core=()
pkgs_gpu=(ocl-icd-libopencl1)
pkgs_python=(python3 python3-venv python3-pip)
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json3-dev make curl sudo)
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev make sudo)
if [ "$os" == "ubuntu22.04" ] || [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] ||
[ "$os" == "debian12" ] || [ "$os" == "raspbian12" ] ; then
@@ -160,11 +166,17 @@ elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbi
pkgs_python+=(libpython3.11)
fi
elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
[ "$os" == "rhel8" ] || [ "$os" == "rhel9.1" ] ||
[ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora36" ] || [ "$os" == "fedora38" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "amzn2" ] ; then
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] ||
[ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] || [ "$os" == "ol9.2" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] || [ "$os" == "rocky9.2" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] || [ "$os" == "almalinux9.2" ] ||
[ "$os" == "amzn2" ] || [ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ; then
arch=$(uname -m)
@@ -172,8 +184,10 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
amazon-linux-extras install epel python3.8
fi
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake3 "json-devel.$arch" "zlib-devel.$arch" sudo)
pkgs_core=()
pkgs_gpu=()
pkgs_python=()
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake3 sudo)
if [ "$os" == "centos7" ] || [ "$os" == "amzn2" ] ; then
pkgs_dev+=(pkgconfig)
@@ -181,53 +195,39 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
pkgs_dev+=(pkgconf-pkg-config)
fi
if [ "$os" == "rhel9.1" ] ; then
pkgs_dev+=(curl-minimal)
else
pkgs_dev+=(curl)
fi
if [ "$os" == "fedora35" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora36" ] || [ "$os" == "fedora38" ] ; then
pkgs_core=("tbb.$arch" "pugixml.$arch" "gflags.$arch")
pkgs_python=(python3 python3-pip)
pkgs_dev+=("gflags-devel.$arch")
if [ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] || [ "$os" == "ol9.2" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] || [ "$os" == "rocky9.2" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] || [ "$os" == "almalinux9.2" ] ||
[ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
[ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] ; then
pkgs_core+=("tbb.$arch")
pkgs_python+=(python3 python3-pip)
fi
if [ "$os" == "centos7" ] || [ "$os" == "amzn2" ] ; then
pkgs_core=("tbb.$arch" "pugixml.$arch" "gflags.$arch")
pkgs_gpu+=("ocl-icd.$arch")
pkgs_dev+=("gflags-devel.$arch")
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm")
elif [ "$os" == "centos8" ] || [ "$os" == "rhel8" ] || [ "$os" == "almalinux8.7" ] ; then
pkgs_core+=(
"https://vault.centos.org/centos/8/AppStream/$arch/os/Packages/tbb-2018.2-9.el8.$arch.rpm"
"https://dl.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/p/pugixml-1.13-1.el8.$arch.rpm"
"https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/gflags-2.1.2-6.el8.$arch.rpm"
)
elif [ "$os" == "rhel8" ] ; then
pkgs_core+=("https://vault.centos.org/centos/8/AppStream/$arch/os/Packages/tbb-2018.2-9.el8.$arch.rpm")
pkgs_gpu+=("http://mirror.centos.org/centos/8-stream/AppStream/$arch/os/Packages/ocl-icd-2.2.12-1.el8.$arch.rpm")
pkgs_python+=(python38 python38-pip)
pkgs_dev+=(
"https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/gflags-devel-2.1.2-6.el8.$arch.rpm"
"https://dl.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/j/json-devel-3.6.1-2.el8.$arch.rpm"
)
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm")
elif [ "$os" == "rhel9.1" ] ; then
pkgs_core=(
"http://mirror.stream.centos.org/9-stream/AppStream/$arch/os/Packages/tbb-2020.3-8.el9.$arch.rpm"
"https://dl.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/p/pugixml-1.13-1.el9.$arch.rpm"
"https://dl.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/g/gflags-2.2.2-9.el9.$arch.rpm"
)
pkgs_core+=("http://mirror.stream.centos.org/9-stream/AppStream/$arch/os/Packages/tbb-2020.3-8.el9.$arch.rpm")
pkgs_gpu+=("https://mirror.stream.centos.org/9-stream/AppStream/$arch/os/Packages/ocl-icd-2.2.13-4.el9.$arch.rpm")
pkgs_python=(python3 python3-pip)
pkgs_dev+=("https://dl.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/g/gflags-devel-2.2.2-9.el9.$arch.rpm")
pkgs_python+=(python3 python3-pip)
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm")
fi
elif [ "$os" == "opensuse-leap15.3" ] ; then
pkgs_core=(libtbb2 libtbbmalloc2 libpugixml1)
pkgs_core=(libtbb2 libtbbmalloc2)
pkgs_gpu=(libOpenCL1)
pkgs_python=(python39-base python39 python39-venv python39-pip)
pkgs_dev=(cmake pkg-config gcc-c++ gcc gflags-devel-static zlib-devel nlohmann_json-devel make curl sudo)
pkgs_dev=(cmake pkg-config gcc-c++ gcc make sudo)
else
echo "Internal script error: invalid OS (${os}) after check (package selection)" >&2
exit 3
@@ -279,11 +279,18 @@ if [ "$os" == "debian9" ] || [ "$os" == "raspbian9" ] || [ "$os" == "ubuntu18.04
apt-get update && apt-get install --no-install-recommends "$iopt" "${pkgs[@]}"
elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
[ "$os" == "rhel8" ] || [ "$os" == "rhel9.1" ] ||
[ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] ||
[ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
[ "$os" == "fedora36" ] || [ "$os" == "fedora38" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "amzn2" ] ; then
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] || [ "$os" == "ol9.2" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] || [ "$os" == "rocky9.2" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] || [ "$os" == "almalinux9.2" ] ||
[ "$os" == "amzn2" ] || [ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ; then
[ -z "$interactive" ] && iopt="--assumeyes"
[ -n "$dry" ] && iopt="--downloadonly"
+1 -78
View File
@@ -124,27 +124,8 @@ endif()
#
if(ENABLE_SAMPLES OR ENABLE_TESTS)
find_package(ZLIB QUIET)
if(ZLIB_FOUND)
# FindZLIB module defines ZLIB::ZLIB, no extra steps are required
endif()
# cmake has failed to find zlib, let's try pkg-config
if(NOT ZLIB_FOUND AND PkgConfig_FOUND)
pkg_search_module(zlib QUIET
IMPORTED_TARGET
zlib)
if(zlib_FOUND)
add_library(ZLIB::ZLIB INTERFACE IMPORTED)
set_target_properties(ZLIB::ZLIB PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::zlib)
message(STATUS "${PKG_CONFIG_EXECUTABLE}: zlib (${zlib_VERSION}) is found at ${zlib_PREFIX}")
endif()
endif()
if(NOT (zlib_FOUND OR ZLIB_FOUND))
add_subdirectory(thirdparty/zlib EXCLUDE_FROM_ALL)
endif()
endif()
#
# cnpy
@@ -324,52 +305,9 @@ endif()
#
if(ENABLE_SAMPLES OR ENABLE_TESTS)
if(OV_VCPKG_BUILD OR OV_CONAN_BUILD)
# vcpkg contains only libs compiled with threads
# conan case
find_package(gflags QUIET)
elseif(APPLE OR WIN32)
# on Windows and macOS we don't use gflags, because will be dynamically linked
elseif(CMAKE_HOST_LINUX AND LINUX)
if(OV_OS_RHEL)
set(gflag_component nothreads_shared)
elseif(OV_OS_DEBIAN)
set(gflag_component nothreads_static)
endif()
find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflag_component})
endif()
if(gflags_FOUND)
if(TARGET gflags)
# no extra steps
elseif(TARGET gflags_nothreads-static)
# Debian 9: gflag_component is ignored
set(gflags_target gflags_nothreads-static)
elseif(TARGET gflags_nothreads-shared)
# CentOS / RHEL / Fedora case
set(gflags_target gflags_nothreads-shared)
elseif(TARGET ${GFLAGS_TARGET})
set(gflags_target ${GFLAGS_TARGET})
else()
message(FATAL_ERROR "Internal error: failed to find imported target 'gflags' using '${gflag_component}' component")
endif()
if(gflags_target)
if(OV_PkgConfig_VISILITY)
# need to set GLOBAL visibility in order to create ALIAS for this target
set_target_properties(${gflags_target} PROPERTIES IMPORTED_GLOBAL ON)
endif()
add_library(gflags ALIAS ${gflags_target})
endif()
message(STATUS "gflags (${gflags_VERSION}) is found at ${gflags_DIR} using '${gflag_component}' component")
endif()
if(NOT TARGET gflags)
add_subdirectory(thirdparty/gflags EXCLUDE_FROM_ALL)
ov_developer_package_export_targets(TARGET gflags)
endif()
endif()
#
# Google Tests framework
@@ -607,21 +545,6 @@ endif()
# Install
#
if(CPACK_GENERATOR MATCHES "^(DEB|RPM|CONDA-FORGE|BREW|CONAN|VCPKG)$")
# These libraries are dependencies for openvino-samples package
if(ENABLE_SAMPLES OR ENABLE_TESTS)
if(NOT gflags_FOUND AND CPACK_GENERATOR MATCHES "^(DEB|RPM)$")
message(FATAL_ERROR "gflags must be used as a ${CPACK_GENERATOR} package. Install libgflags-dev / gflags-devel")
endif()
if(NOT (zlib_FOUND OR ZLIB_FOUND))
message(FATAL_ERROR "zlib must be used as a ${CPACK_GENERATOR} package. Install zlib1g-dev / zlib-devel")
endif()
endif()
if(NOT ENABLE_SYSTEM_PUGIXML)
message(FATAL_ERROR "Pugixml must be used as a ${CPACK_GENERATOR} package. Install libpugixml-dev / pugixml-devel")
endif()
elseif(APPLE OR WIN32)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty
COMPONENT ${OV_CPACK_COMP_CPP_SAMPLES}
@@ -640,6 +563,7 @@ elseif(APPLE OR WIN32)
PATTERN INSTALL.md EXCLUDE
PATTERN README.md EXCLUDE
PATTERN .travis.yml EXCLUDE
PATTERN src/gflags_completions.sh EXCLUDE
PATTERN WORKSPACE EXCLUDE)
file(GLOB zlib_sources ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib/zlib/*.c
@@ -673,7 +597,6 @@ elseif(APPLE OR WIN32)
PATTERN tests EXCLUDE
PATTERN tools EXCLUDE
PATTERN wsjcpp.yml EXCLUDE)
endif()
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cnpy
DESTINATION ${OV_CPACK_SAMPLESDIR}/cpp/thirdparty
-2
View File
@@ -17,8 +17,6 @@
"builtin-baseline": "db0473513e5dc73ec6b6f431ff05d2f398eea042",
"dependencies": [
"ade",
"gflags",
"nlohmann-json",
{
"name": "pkgconf",
"host": true