Skip to content

Commit 09b03d4

Browse files
Merge pull request #67 from RH-steve-grubb/2025.1-update
OVMS update for the 2.21 release
2 parents 9aa7bc0 + a4fd7f5 commit 09b03d4

File tree

7 files changed

+128
-16
lines changed

7 files changed

+128
-16
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# Optimizations used for TF Serving release builds.
1818
build:release --copt=-mavx
1919
build:release --copt=-msse4.2
20+
build:linux --copt="-march=haswell"
2021

2122
# Options used to build with CUDA.
2223
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain

Dockerfile.redhat

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
2626

2727
ARG JOBS=8
2828
ARG VERBOSE_LOGS=OFF
29+
ARG LTO_ENABLE=OFF
30+
ARG LTO_CXX_FLAGS=""
31+
ARG LTO_LD_FLAGS="-Wl,-z,relro"
2932

3033
# hadolint ignore=DL3041
3134
RUN echo -e "max_parallel_downloads=8\nretries=50" >> /etc/dnf/dnf.conf && \
@@ -51,7 +54,10 @@ WORKDIR /boost
5154
RUN wget -nv https://sourceforge.net/projects/boost/files/boost/1.68.0/boost_1_68_0.tar.gz && \
5255
if [ "$VERBOSE_LOGS" == "ON" ] ; then export BVERBOSE="-d+2" ; else export BVERBOSE="" ; fi && \
5356
tar xf boost_1_68_0.tar.gz && cd boost_1_68_0 && ./bootstrap.sh && \
54-
./b2 -j ${JOBS} cxxstd=17 link=static cxxflags='-fPIC' cflags='-fPIC' \
57+
./b2 -j ${JOBS} cxxstd=17 link=static variant=release \
58+
cxxflags="-fPIC $LTO_CXX_FLAGS" \
59+
cflags="-fPIC $LTO_CXX_FLAGS" \
60+
linkflags="$LTO_LD_FLAGS" \
5561
--with-chrono --with-date_time --with-filesystem \
5662
--with-program_options --with-system \
5763
--with-random --with-thread --with-atomic --with-regex \
@@ -65,7 +71,9 @@ COPY third_party/pugixml /ovms/third_party/pugixml
6571
RUN git clone -b v1.13 https://github.com/zeux/pugixml && \
6672
cd pugixml && \
6773
patch -p1 < /ovms/third_party/pugixml/pugixml_v1.13_flags.patch && \
68-
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} && \
74+
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} \
75+
-DCMAKE_CXX_FLAGS="${LTO_CXX_FLAGS}" \
76+
-DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" && \
6977
make all -j ${JOBS} && \
7078
cp -P libpugixml.so* /usr/lib64/
7179

@@ -79,10 +87,10 @@ RUN git clone --recurse-submodules --depth 1 --branch v2.10.16 https://github.co
7987
patch -d /azure/azure-storage-cpp/ -p1 </ovms/third_party/azure/azure_sdk.patch
8088

8189
WORKDIR /azure/cpprestsdk/Release/build.release
82-
RUN cmake .. -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON -DBoost_USE_STATIC_LIBS=ON -DWERROR=OFF -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF && make --jobs=$JOBS install
90+
RUN cmake .. -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} -DCMAKE_CXX_FLAGS="-fPIC ${LTO_CXX_FLAGS}" -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON -DBoost_USE_STATIC_LIBS=ON -DWERROR=OFF -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF && make --jobs=$JOBS install
8391

8492
WORKDIR /azure/azure-storage-cpp/Microsoft.WindowsAzure.Storage/build.release
85-
RUN CASABLANCA_DIR=/azure/cpprestsdk cmake .. -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON -DBoost_USE_STATIC_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} && make --jobs=$JOBS && make --jobs=$JOBS install
93+
RUN CASABLANCA_DIR=/azure/cpprestsdk cmake .. -DCMAKE_CXX_FLAGS="-fPIC ${LTO_CXX_FLAGS}" -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON -DBoost_USE_STATIC_LIBS=ON -DCMAKE_VERBOSE_MAKEFILE=${VERBOSE_LOGS} && make --jobs=$JOBS && make --jobs=$JOBS install
8694
####### End of Azure SDK
8795

8896
####### Build OpenCV
@@ -99,6 +107,7 @@ SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
99107

100108
ARG JOBS=40
101109
ARG VERBOSE_LOGS=OFF
110+
ARG LTO_ENABLE=OFF
102111

103112
# hadolint ignore=DL3041
104113
RUN dnf install -y https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/opencl-headers-3.0-6.20201007gitd65bcc5.el9.noarch.rpm && \
@@ -165,9 +174,12 @@ RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.n
165174
# hadolint ignore=DL3003
166175
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; git clone https://github.com/$ov_source_org/openvino.git /openvino && cd /openvino && git checkout $ov_source_branch && git submodule update --init --recursive
167176
RUN if [ "$ov_use_binary" == "0" ]; then true ; else exit 0 ; fi ; if ! [[ $debug_bazel_flags == *"py_off"* ]]; then true ; else exit 0 ; fi ; pip3 install --no-cache-dir -r /openvino/src/bindings/python/wheel/requirements-dev.txt
177+
WORKDIR /openvino
178+
COPY openvino-lto.patch .
179+
RUN if [ "$ov_use_binary" == "0" ]; then patch -p1 < openvino-lto.patch ; rm -f openvino-lto.patch ; fi
168180
WORKDIR /openvino/build
169-
RUN if [ "$ov_use_binary" == "0" ] && [[ $debug_bazel_flags == *"PYTHON_DISABLE=1"* ]]; then true ; else exit 0 ; fi ; if ! [[ $debug_bazel_flags == *"PYTHON_DISABLE=1"* ]]; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_PYTHON=ON -DENABLE_INTEL_NPU=OFF -DENABLE_SAMPLES=0 -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses " ..
170-
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_SAMPLES=0 -DENABLE_INTEL_NPU=OFF -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses " ..
181+
RUN if [ "$ov_use_binary" == "0" ] && [[ $debug_bazel_flags == *"PYTHON_DISABLE=1"* ]]; then true ; else exit 0 ; fi ; if ! [[ $debug_bazel_flags == *"PYTHON_DISABLE=1"* ]]; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_LTO=${LTO_ENABLE} -DENABLE_PYTHON=ON -DENABLE_INTEL_NPU=OFF -DENABLE_SAMPLES=0 -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" ..
182+
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; cmake -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DENABLE_LTO=${LTO_ENABLE} -DENABLE_SAMPLES=0 -DENABLE_INTEL_NPU=OFF -DCMAKE_CXX_FLAGS=" -Wno-error=parentheses ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" ..
171183
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; make --jobs=$JOBS
172184
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; make install
173185
RUN if [ "$ov_use_binary" == "0" ] ; then true ; else exit 0 ; fi ; \
@@ -214,7 +226,7 @@ ARG ov_tokenizers_branch=master
214226
# hadolint ignore=DL3003
215227
RUN git clone https://github.com/openvinotoolkit/openvino_tokenizers.git /openvino_tokenizers && cd /openvino_tokenizers && git checkout $ov_tokenizers_branch && git submodule update --init --recursive
216228
WORKDIR /openvino_tokenizers/build
217-
RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" && cmake --build . --parallel $JOBS ; cp /openvino_tokenizers/build/src/lib*.so /opt/intel/openvino/runtime/lib/intel64/
229+
RUN cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE="${VERBOSE_LOGS}" -DCMAKE_CXX_FLAGS=" ${LTO_CXX_FLAGS} " -DCMAKE_SHARED_LINKER_FLAGS="${LTO_LD_FLAGS}" && cmake --build . --parallel $JOBS ; cp /openvino_tokenizers/build/src/lib*.so /opt/intel/openvino/runtime/lib/intel64/
218230

219231
# Build OpenVINO Model Server
220232
WORKDIR /ovms
@@ -283,8 +295,8 @@ RUN bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms
283295
COPY ci/check_coverage.bat /ovms/
284296
ARG CHECK_COVERAGE=0
285297
ARG RUN_TESTS=0
286-
COPY run_unit_tests.sh prepare_llm_models.sh prepare_gpu_models.sh /ovms/
287-
RUN if [ "$RUN_TESTS" == "1" ] ; then ./prepare_llm_models.sh /ovms/src/test/llm_testing docker && ./run_unit_tests.sh ; fi
298+
COPY run_unit_tests.sh prepare_llm_models.sh prepare_gpu_models.sh demos/common/export_models/export_model.py /ovms/
299+
RUN if [ "$RUN_TESTS" == "1" ] ; then mkdir -p demos/common/export_models/ && mv export_model.py demos/common/export_models/ && ./prepare_llm_models.sh /ovms/src/test/llm_testing docker && ./run_unit_tests.sh ; fi
288300

289301
ARG ovms_metadata_file
290302

@@ -391,5 +403,14 @@ COPY --from=pkg /usr/local/lib64/python3.*/site-packages/MarkupSafe-3.0.2.dist-i
391403
COPY --from=pkg /usr/local/lib64/python3.*/site-packages/markupsafe /ovms/python_deps/markupsafe
392404

393405
COPY --from=pkg /licenses /licenses
406+
407+
# Setup Python Demos Environment
408+
COPY demos/python_demos/requirements.txt .
409+
RUN if [ -f /usr/bin/dnf ] ; then export DNF_TOOL=dnf ; \
410+
else export DNF_TOOL=microdnf ; fi ; \
411+
$DNF_TOOL install -y python3-pip git iproute net-tools ; $DNF_TOOL clean all ; \
412+
pip3 install --no-cache-dir -r requirements.txt ; \
413+
rm -f requirements.txt
414+
394415
USER ovms
395416
ENTRYPOINT ["/ovms/bin/ovms"]

Dockerfile.ubuntu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ WORKDIR /ovms
280280
# Test Coverage
281281
COPY ci/check_coverage.bat /ovms/
282282
ARG CHECK_COVERAGE=0
283-
COPY run_unit_tests.sh prepare_llm_models.sh install_va.sh /ovms/
283+
COPY run_unit_tests.sh prepare_llm_models.sh install_va.sh demos/common/export_models/export_model.py /ovms/
284284

285285
ARG FUZZER_BUILD=0
286286
# Custom Nodes
@@ -295,7 +295,7 @@ ARG OPTIMIZE_BUILDING_TESTS=0
295295
RUN if [ "$FUZZER_BUILD" == "0" ]; then bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms $(if [ "${OPTIMIZE_BUILDING_TESTS}" == "1" ] ; then echo -n //src:ovms_test; fi); fi;
296296

297297
ARG RUN_TESTS=0
298-
RUN if [ "$RUN_TESTS" == "1" ] ; then ./prepare_llm_models.sh /ovms/src/test/llm_testing docker && ./run_unit_tests.sh ; fi
298+
RUN if [ "$RUN_TESTS" == "1" ] ; then mkdir -p demos/common/export_models/ && mv export_model.py demos/common/export_models/ && ./prepare_llm_models.sh /ovms/src/test/llm_testing docker && ./run_unit_tests.sh ; fi
299299

300300
RUN if [ "$FUZZER_BUILD" == "0" ]; then /ovms/bazel-bin/src/ovms --version && /ovms/bazel-bin/src/ovms; fi;
301301

openvino-lto.patch

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 2187deb8e8..ad15a73395 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -65,6 +65,7 @@ if(ENABLE_COVERAGE)
6+
include(cmake/coverage.cmake)
7+
endif()
8+
9+
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
10+
if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET AND
11+
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.15)
12+
message(FATAL_ERROR "OpenVINO requires MACOSX_DEPLOYMENT_TARGET at least 10.15, specified ${CMAKE_OSX_DEPLOYMENT_TARGET}")
13+
diff --git a/src/frontends/common/CMakeLists.txt b/src/frontends/common/CMakeLists.txt
14+
index e4d2fe63e1..eace2a5593 100644
15+
--- a/src/frontends/common/CMakeLists.txt
16+
+++ b/src/frontends/common/CMakeLists.txt
17+
@@ -52,7 +52,8 @@ target_link_libraries(${TARGET_NAME}_obj PRIVATE openvino::util openvino::core::
18+
19+
# TODO: fix lto
20+
set_target_properties(${TARGET_NAME}_obj PROPERTIES
21+
- INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF)
22+
+ INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
23+
+ov_add_compiler_flags(-march=haswell)
24+
25+
set(FRONTEND_LIB_SUFFIX "${FRONTEND_NAME_SUFFIX}${OV_BUILD_POSTFIX}")
26+
if(APPLE)
27+
--- a/thirdparty/onnx/CMakeLists.txt
28+
+++ b/thirdparty/onnx/CMakeLists.txt
29+
@@ -21,7 +21,10 @@ endif()
30+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
31+
# 4244 conversion from 'XXX' to 'YYY', possible loss of data
32+
ov_add_compiler_flags(/wd4244)
33+
+else()
34+
+ ov_add_compiler_flags(-march=haswell)
35+
endif()
36+
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
37+
38+
set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
39+
set(ONNX_USE_PROTOBUF_SHARED_LIBS OFF CACHE BOOL "Use dynamic protobuf by ONNX library" FORCE)
40+
diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt
41+
index a16bd56d11..2829926e68 100644
42+
--- a/thirdparty/protobuf/CMakeLists.txt
43+
+++ b/thirdparty/protobuf/CMakeLists.txt
44+
@@ -10,6 +10,7 @@ set(BUILD_SHARED_LIBS OFF)
45+
46+
if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR (OV_COMPILER_IS_INTEL_LLVM AND UNIX))
47+
ov_add_compiler_flags(-Wno-all)
48+
+ ov_add_compiler_flags(-march=haswell)
49+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11 AND CMAKE_COMPILER_IS_GNUCXX)
50+
ov_add_compiler_flags(-Wno-stringop-overflow)
51+
endif()
52+
@@ -48,6 +49,7 @@ else()
53+
set(protobuf_dir protobuf/cmake)
54+
endif()
55+
56+
+set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
57+
add_subdirectory(${protobuf_dir} EXCLUDE_FROM_ALL)
58+
get_directory_property(protobuf_VERSION DIRECTORY ${protobuf_dir} DEFINITION protobuf_VERSION)
59+
60+
@@ -63,7 +65,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR OV_COMPILER_IS_INTEL_LLVM
61+
CXX_VISIBILITY_PRESET default
62+
C_VISIBILITY_PRESET default
63+
VISIBILITY_INLINES_HIDDEN OFF
64+
- INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF)
65+
+ INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
66+
endif()
67+
ov_disable_all_warnings(${_protoc_libs} libprotobuf-lite)
68+
set_target_properties(libprotobuf-lite PROPERTIES

src/config.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,18 @@ bool Config::check_hostname_or_ip(const std::string& input) {
7676
}
7777
bool all_numeric = true;
7878
for (char c : input) {
79-
if (c == '.') {
79+
if (c == '.' || c == ':') {
8080
continue;
8181
}
82-
if (!::isdigit(c)) {
82+
if (!::isxdigit(c)) {
8383
all_numeric = false;
8484
}
8585
}
8686
if (all_numeric) {
87-
std::regex valid_ip_regex("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$");
88-
return std::regex_match(input, valid_ip_regex);
87+
static const std::regex valid_ipv4_regex("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$");
88+
static const std::regex valid_ipv6_regex(R"(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))");
89+
return std::regex_match(input, valid_ipv4_regex) ||
90+
std::regex_match(input, valid_ipv6_regex);
8991
} else {
9092
std::regex valid_hostname_regex("^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$");
9193
return std::regex_match(input, valid_hostname_regex);

src/test/ovmsconfig_test.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,25 @@ TEST_F(OvmsParamsTest, hostname_ip_regex) {
335335
EXPECT_EQ(ovms::Config::check_hostname_or_ip("(%$#*F"), false);
336336
std::string too_long(256, 'a');
337337
EXPECT_EQ(ovms::Config::check_hostname_or_ip(too_long), false);
338+
// Uncompressed IPv6 address
339+
EXPECT_EQ(ovms::Config::check_hostname_or_ip(
340+
"fe80:0000:0000:0000:0202:b3ff:fe1e:8329", true);
341+
// Zero compressed IPv6 address
342+
EXPECT_EQ(ovms::Config::check_hostname_or_ip(
343+
"2001:db8:85a3::8a2e:370:7334", true);
344+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("::1", true);
345+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("::", true);
346+
// Link-local IPv6 with zone index (RFC 4007 § 11) - unsupported
347+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("fe80::1234%eth0", false);
348+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("fe80::1234%1", false);
349+
// IPv4-Embedded IPv6 addresses
350+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("64:ff9b::192.0.2.33", true);
351+
EXPECT_EQ(ovms::Config::check_hostname_or_ip(
352+
"2001:db8:122:344::192.0.2.33", true);
353+
// IPv4-mapped IPv6 addresses
354+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("::ffff:192.0.2.128", true);
355+
// IPv4-translated IPv6 addresses
356+
EXPECT_EQ(ovms::Config::check_hostname_or_ip("::ffff:0:192.0.2.128", true);
338357
}
339358

340359
TEST(OvmsConfigTest, positiveMulti) {

third_party/opencv/opencv_cmake_flags.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
-D BUILD_LIST=core,improc,imgcodecs,calib3d,features2d,highgui,imgproc,video,videoio,optflow \
22
-D OPENCV_EXTRA_MODULES_PATH=/opt/opencv_contrib_repo/modules \
33
-D CMAKE_BUILD_TYPE=Release \
4+
-D ENABLE_LTO=${LTO_ENABLE} \
45
-D CMAKE_INSTALL_PREFIX=/opt/opencv \
56
-D OPENCV_LIB_INSTALL_PATH=lib \
67
-D BUILD_TESTS=OFF \
@@ -39,4 +40,4 @@
3940
-D WITH_JPEG=ON \
4041
-D WITH_PNG=ON \
4142
-D WITH_TIFF=OFF \
42-
-D WITH_OPENEXR=OFF
43+
-D WITH_OPENEXR=OFF

0 commit comments

Comments
 (0)