Skip to content

Commit 7ec4ed4

Browse files
committed
Fix Docker (full) build: disable ASM so OpenCV 5's MLAS doesn't break the extern link
The now-actually-running test-native stage caught a pre-existing bug: OpenCV 5.0.0's vendored MLAS declares and calls MlasHGemmSupported() on its FP16/GQA path but never defines it, leaving libOpenCvSharpExtern.so with an undefined reference. windows.yml/linux-arm64.yml/macos.yml already work around this by dropping CMAKE_ASM_COMPILER so MLAS reports itself unavailable and DNN falls back to its built-in SGEMM; apply the same fix here.
1 parent 4f6d5cc commit 7ec4ed4

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • packaging/docker/ubuntu24-dotnet10-opencv5.0.0

packaging/docker/ubuntu24-dotnet10-opencv5.0.0/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ RUN set -eux; \
6363
mv opencv_contrib-${OPENCV_VERSION} /opencv_contrib
6464

6565
# Configure, build, and install OpenCV with ccache and parallel build
66+
#
67+
# -D CMAKE_ASM_COMPILER="": disables the ASM language so OpenCV 5's vendored
68+
# MLAS turns off and DNN falls back to its built-in SGEMM. The MLAS FP16/GQA
69+
# path references MlasHGemmSupported(), which OpenCV 5.0.0 declares and calls
70+
# but never defines, breaking the extern link with an undefined reference
71+
# (same fix as windows.yml / linux-arm64.yml / macos.yml).
6672
RUN --mount=type=cache,target=/root/.ccache \
6773
set -eux; \
6874
cmake -G Ninja \
@@ -72,7 +78,8 @@ RUN --mount=type=cache,target=/root/.ccache \
7278
-D CMAKE_BUILD_TYPE=RELEASE \
7379
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
7480
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
75-
-D CMAKE_INSTALL_PREFIX=/opencv_artifacts; \
81+
-D CMAKE_INSTALL_PREFIX=/opencv_artifacts \
82+
-D CMAKE_ASM_COMPILER=""; \
7683
cmake --build /opencv/build --parallel "$(nproc)"; \
7784
cmake --install /opencv/build; \
7885
ldconfig

0 commit comments

Comments
 (0)