Skip to content

Fix build version for mp_off_py_off config#4052

Open
atobiszei wants to merge 5 commits intomainfrom
atobisze_fix_build_version
Open

Fix build version for mp_off_py_off config#4052
atobiszei wants to merge 5 commits intomainfrom
atobisze_fix_build_version

Conversation

@atobiszei
Copy link
Collaborator

@atobiszei atobiszei commented Mar 11, 2026

Move OpenVINO and GenAI version resolution from macros in version.hpp to runtime functions in version.cpp. GenAI version is conditionally compiled using MEDIAPIPE_DISABLE define.

Split libovms_version into header-only target (zero deps) and libovms_version_impl (openvino + conditional genai, alwayslink=1) to avoid blocking parallel omponents builds and fix linker error when building with --config mp_off_py_off.

Move OpenVINO and GenAI version resolution from macros in version.hpp
to runtime functions in version.cpp. GenAI version is conditionally
compiled using MEDIAPIPE_DISABLE define.

Split libovms_version into header-only target (zero deps) and
libovms_version_impl (openvino + conditional genai, alwayslink=1)
to avoid blocking parallel builds and fix linker error when building
with --config mp_off_py_off.
Copilot AI review requested due to automatic review settings March 11, 2026 08:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves OpenVINO/GenAI version resolution from header macros to runtime functions to fix build/link issues in mp_off_py_off and improve parallel builds.

Changes:

  • Replaced OPENVINO_NAME / GENAI_NAME macros with ovms::getOpenvinoVersion() / ovms::getGenaiVersion() functions.
  • Added src/version.cpp with conditional GenAI compilation behind MEDIAPIPE_DISABLE.
  • Split Bazel target into libovms_version (header-only) and libovms_version_impl (OpenVINO/GenAI impl, alwayslink).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/version.hpp Removes OpenVINO/GenAI includes + version macros; exposes runtime version function declarations
src/version.cpp Implements runtime version resolution with conditional GenAI support
src/server.cpp Switches logging to runtime OpenVINO version function
src/cli_parser.cpp Switches --version output to runtime OpenVINO/GenAI version functions
src/capi_frontend/capi.cpp Switches metadata ov_version to runtime OpenVINO version function
src/BUILD Splits version library into header-only + impl target and links impl into main library

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


You can also share your feedback on Copilot code review. Take the survey.

ss << "OpenVINO backend " << OPENVINO_NAME << std::endl;
ss << "OpenVINO GenAI backend " << GENAI_NAME << std::endl;
ss << "OpenVINO backend " << ovms::getOpenVINOVersion() << std::endl;
const char* genaiVersion = ovms::getGenAIVersion();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why couldnt getGenAIVersion return std::string? This way you dont need to rely on zero-terminated string, but simply call genaiVersion.empty()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants