diff --git a/cmake/developer_package/packaging/rpm.cmake b/cmake/developer_package/packaging/rpm.cmake index 9ac25e12da5..2455a4271af 100644 --- a/cmake/developer_package/packaging/rpm.cmake +++ b/cmake/developer_package/packaging/rpm.cmake @@ -251,7 +251,7 @@ macro(ov_rpm_add_latest_component comp) ov_rpm_add_rpmlint_suppression(${comp_name} # it's umbrella package - "empty-binary-package") + "no-binary") # add latest to a list of rpm packages list(APPEND CPACK_COMPONENTS_ALL ${comp_name}) diff --git a/cmake/developer_package/packaging/rpm_post_build.cmake b/cmake/developer_package/packaging/rpm_post_build.cmake index 684d2d8dc7e..e12c9e17e10 100644 --- a/cmake/developer_package/packaging/rpm_post_build.cmake +++ b/cmake/developer_package/packaging/rpm_post_build.cmake @@ -37,5 +37,6 @@ foreach(rpm_file IN LISTS CPACK_PACKAGE_FILES) endforeach() if(NOT rpmlint_passed) - message(FATAL_ERROR "rpmlint has found some mistakes") + # till there is no filtering/suppression for rpmlint errors - throw warning instead fatal error + message(WARNING "rpmlint has found some mistakes. You can get more info regarding issues on site https://fedoraproject.org/wiki/Common_Rpmlint_issues") endif() diff --git a/cmake/packaging/debian.cmake b/cmake/packaging/debian.cmake index 7efa0067ff4..45cbfbfa8ac 100644 --- a/cmake/packaging/debian.cmake +++ b/cmake/packaging/debian.cmake @@ -343,7 +343,9 @@ macro(ov_cpack_settings) ov_debian_generate_conflicts(openvino ${conflicting_versions}) ov_debian_add_lintian_suppression(openvino # it's umbrella package - "empty-binary-package") + "empty-binary-package" + # reproduced only on ubu18 + "description-starts-with-package-name") list(APPEND CPACK_COMPONENTS_ALL "libraries;libraries_dev;openvino") diff --git a/cmake/packaging/rpm.cmake b/cmake/packaging/rpm.cmake index d7af8e4d6f2..270a1933082 100644 --- a/cmake/packaging/rpm.cmake +++ b/cmake/packaging/rpm.cmake @@ -39,6 +39,9 @@ function(_ov_add_plugin comp is_pseudo) set(installed_plugins "${installed_plugins}" PARENT_SCOPE) endfunction() + + + macro(ov_cpack_settings) # fill a list of components which are part of rpm set(cpack_components_all ${CPACK_COMPONENTS_ALL}) @@ -85,7 +88,74 @@ macro(ov_cpack_settings) # - 2022.1.0 is the last public release with rpm packages from Intel install team # - 2022.1.1 does not have rpm packages enabled, distributed only as archives 2022.1.0) + + # + # Frontends + # + if(ENABLE_OV_IR_FRONTEND) + set(CPACK_COMPONENT_IR_DESCRIPTION "OpenVINO IR Frontend") + set(CPACK_COMPONENT_IR_DEPENDS "${OV_CPACK_COMP_CORE}") + set(CPACK_RPM_IR_PACKAGE_NAME "libopenvino-ir-frontend-${cpack_name_ver}") + set(CPACK_RPM_IR_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}") + ov_rpm_add_rpmlint_suppression(ir + # we have different package name strategy; it suggests libopenvino-ir-frontend202230 + "package-name-doesnt-match-sonames" + # IR FE should not linked directly by end users + "package-must-activate-ldconfig-trigger") + list(APPEND frontends ir) + endif() + + if(ENABLE_OV_ONNX_FRONTEND) + set(CPACK_COMPONENT_ONNX_DESCRIPTION "OpenVINO ONNX Frontend") + set(CPACK_COMPONENT_ONNX_DEPENDS "${OV_CPACK_COMP_CORE}") + set(CPACK_RPM_ONNX_PACKAGE_NAME "libopenvino-onnx-frontend-${cpack_name_ver}") + # since we ONNX FE is linkable target, we need to call ldconfig (i.e. `def_triggers`) + set(CPACK_RPM_ONNX_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}") + ov_rpm_add_rpmlint_suppression(onnx + # we have different package name strategy; it suggests libopenvino-onnx-frontend202230 + "package-name-doesnt-match-sonames") + list(APPEND frontends onnx) + endif() + + if(ENABLE_OV_TF_FRONTEND AND "tensorflow" IN_LIST CPACK_COMPONENTS_ALL) + set(CPACK_COMPONENT_TENSORFLOW_DESCRIPTION "OpenVINO TensorFlow Frontend") + set(CPACK_COMPONENT_TENSORFLOW_DEPENDS "${OV_CPACK_COMP_CORE}") + set(CPACK_RPM_TENSORFLOW_PACKAGE_NAME "libopenvino-tensorflow-frontend-${cpack_name_ver}") + # since we TF FE is linkable target, we need to call ldconfig (i.e. `def_triggers`) + set(CPACK_RPM_TENSORFLOW_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}") + ov_rpm_add_rpmlint_suppression(tensorflow + # we have different package name strategy; it suggests libopenvino-tensorflow-frontend202230 + "package-name-doesnt-match-sonames") + list(APPEND frontends tensorflow) + endif() + + if(ENABLE_OV_PADDLE_FRONTEND) + set(CPACK_COMPONENT_PADDLE_DESCRIPTION "OpenVINO Paddle Frontend") + set(CPACK_COMPONENT_PADDLE_DEPENDS "${OV_CPACK_COMP_CORE}") + set(CPACK_RPM_PADDLE_PACKAGE_NAME "libopenvino-paddle-frontend-${cpack_name_ver}") + # since we PADDLE FE is linkable target, we need to call ldconfig (i.e. `def_triggers`) + set(CPACK_RPM_PADDLE_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}") + ov_rpm_add_rpmlint_suppression(paddle + # we have different package name strategy; it suggests libopenvino-paddle-frontend202230 + "package-name-doesnt-match-sonames") + list(APPEND frontends paddle) + endif() + + # + # core_dev: depends on core and frontends (since frontends don't want to provide its own dev packages) + # + + set(CPACK_COMPONENT_CORE_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Development files") + set(CPACK_COMPONENT_CORE_DEV_DEPENDS "${OV_CPACK_COMP_CORE};${frontends}") + set(CPACK_RPM_CORE_DEV_PACKAGE_NAME "libopenvino-devel-${cpack_name_ver}") + ov_rpm_generate_conflicts("${OV_CPACK_COMP_CORE_DEV}" ${conflicting_versions}) + + ov_rpm_add_rpmlint_suppression("${OV_CPACK_COMP_CORE_DEV}" + # CVS-79409: create man page for compile_tool + "binary-without-manpage") + + # core set(CPACK_COMPONENT_CORE_DESCRIPTION "OpenVINO C / C++ Runtime libraries") set(CPACK_RPM_CORE_PACKAGE_NAME "libopenvino-${cpack_name_ver}") @@ -99,15 +169,6 @@ macro(ov_cpack_settings) "shlib-without-versioned-soname" "package-name-doesnt-match-sonames") - # core_dev - set(CPACK_COMPONENT_CORE_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Development files") - set(CPACK_COMPONENT_CORE_DEV_DEPENDS "core") - set(CPACK_RPM_CORE_DEV_PACKAGE_NAME "libopenvino-dev-${cpack_name_ver}") - ov_rpm_generate_conflicts(core_dev ${conflicting_versions}) - - ov_rpm_add_rpmlint_suppression(core_dev - # CVS-79409: create man page for compile_tool - "binary-without-manpage") # # Plugins @@ -258,16 +319,16 @@ macro(ov_cpack_settings) ov_rpm_add_rpmlint_suppression(libraries # it's umbrella package - "empty-binary-package") + "no-binary") # all libraries-dev set(CPACK_COMPONENT_LIBRARIES_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files") set(CPACK_COMPONENT_LIBRARIES_DEV_DEPENDS "core_dev;libraries") - set(CPACK_RPM_LIBRARIES_DEV_PACKAGE_NAME "openvino-libraries-dev-${cpack_name_ver}") + set(CPACK_RPM_LIBRARIES_DEV_PACKAGE_NAME "openvino-libraries-devel-${cpack_name_ver}") ov_rpm_generate_conflicts(libraries_dev ${conflicting_versions}) ov_rpm_add_rpmlint_suppression(libraries_dev # it's umbrella package - "empty-binary-package") + "no-binary") # all openvino set(CPACK_COMPONENT_OPENVINO_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files") @@ -276,7 +337,7 @@ macro(ov_cpack_settings) ov_rpm_generate_conflicts(openvino ${conflicting_versions}) ov_rpm_add_rpmlint_suppression(openvino # it's umbrella package - "empty-binary-package") + "no-binary") list(APPEND CPACK_COMPONENTS_ALL "libraries;libraries_dev;openvino") diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index 073ff29d77f..8a2fc5a621e 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -110,6 +110,9 @@ if(NOT TARGET gflags) if(TARGET gflags_nothreads-static) # arm cross-compilation set(GFLAGS_TARGET gflags_nothreads-static) + elseif(TARGET gflags_nothreads-shared) + # centos/rhel8 + set(GFLAGS_TARGET gflags_nothreads-shared) else() message(FATAL_ERROR "Failed to set GFLAGS_TARGET target") endif() diff --git a/scripts/install_dependencies/install_openvino_dependencies.sh b/scripts/install_dependencies/install_openvino_dependencies.sh index e551b96e12d..1d57c6759e6 100755 --- a/scripts/install_dependencies/install_openvino_dependencies.sh +++ b/scripts/install_dependencies/install_openvino_dependencies.sh @@ -154,7 +154,10 @@ elif [ "$os" == "rhel8" ] ; then pkgs_core=(libtbb2 libpugixml1v5) pkgs_opencv_req=(gtk3) pkgs_python=(python38 python38-pip) - pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake pkg-config zlib-devel.i686 curl sudo) + pkgs_dev=( + gcc gcc-c++ make glibc libstdc++ libgcc cmake pkg-config zlib-devel.i686 curl sudo + https://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/gflags-2.1.2-6.el8.x86_64.rpm + ) pkgs_myriad=() pkgs_opencv_opt=( https://vault.centos.org/centos/8/AppStream/x86_64/os/Packages/libcdio-2.0.0-3.el8.x86_64.rpm diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index e300360e2d8..885602dbcf2 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -185,7 +185,7 @@ if(NOT APPLE OR CPACK_GENERATOR MATCHES "^(BREW|CONDA-FORGE)$") # - on Apple only dynamic libraries are available # also, we can easily mix arm64 and x86_64 binaries when cross-compile for Intel CPU - if(CPACK_GENERATOR MATCHES "^(BREW|CONDA-FORGE)$" OR DEFINED ENV{HOMEBREW_PREFIX} OR LINUX_OS_NAME MATCHES "(Fedora)") + if(CPACK_GENERATOR MATCHES "^(BREW|CONDA-FORGE)$" OR DEFINED ENV{HOMEBREW_PREFIX} OR LINUX_OS_NAME MATCHES "(Fedora|CentOS)") # conda-forge and brew contains only shared version of gflags find_package(gflags QUIET COMPONENTS nothreads_shared) else() @@ -196,6 +196,10 @@ endif() if(gflags_FOUND) if(TARGET gflags) set_target_properties(gflags PROPERTIES IMPORTED_GLOBAL ON) + elseif(TARGET gflags_nothreads-shared) + # gflags shared case for CentOS/RHEL8 + set_target_properties(gflags_nothreads-shared PROPERTIES IMPORTED_GLOBAL ON) + add_library(gflags ALIAS gflags_nothreads-shared) elseif(TARGET gflags_nothreads-static) # debian_9_arm case set_target_properties(gflags_nothreads-static PROPERTIES IMPORTED_GLOBAL ON)