Skip to content

Build OpenCV Windows MSVC 2022 ARM64 failed during usage of Github CI Worker #27401

@luadebug

Description

@luadebug

Waiting for actions/runner-images#12316
Github CI windows-2022/windows-2025 worker ARM64 build-log.txt
Unfortunately I am unable to represent this issue during local build on my x64 PC... build-arm64-static-opencv-log.txt Because different MSVC versions being used.
Currently workaround for Github CI is to use windows-11-arm worker instead of windows-2022/windows-2025 worker. Or patch windows-2022/windows-2025 WindowsSDK include file https://github.com/nihui/opencv-mobile/blob/master/fix-windows-sdk-26100-arm64-wchar.patch
As for local build issue, workaround is to use CLang compiler instead of MSVC or use different MSVC version or patch WindowsSDK include file https://github.com/nihui/opencv-mobile/blob/master/fix-windows-sdk-26100-arm64-wchar.patch, AFAIK.
I tried to update my MSVC 2022 ARM64, so I could repeat issue locally on my x64 PC...
build-arm64-static-opencv-log.txt

System Information


CMake Deprecation Warning at CMakeLists.txt:25 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is MSVC 19.43.34808.0
-- The C compiler identification is MSVC 19.43.34808.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.43.34808/bin/HostX64/ARM64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.43.34808/bin/HostX64/ARM64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- ocv_init_download: OpenCV source tree is not fetched as git repository. 3rdparty resources will be downloaded from github.com by default.
-- Detected processor: arm64
-- Found PythonInterp: C:/hostedtoolcache/windows/Python/3.9.13/x64/python3.exe (found suitable version "3.9.13", minimum required is "3.2")
-- Found PythonLibs: C:/hostedtoolcache/windows/Python/3.13.3/x64/libs/python313.lib (found suitable version "3.13.3", minimum required is "3.9")
-- Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)
-- If you want to enable Python/Numpy support, set the following variables:
--   PYTHON2_INCLUDE_PATH
--   PYTHON2_LIBRARIES (optional on Unix-like systems)
--   PYTHON2_NUMPY_INCLUDE_DIRS
--   PYTHON3_INCLUDE_PATH
--   PYTHON3_LIBRARIES (optional on Unix-like systems)
--   PYTHON3_NUMPY_INCLUDE_DIRS
-- Performing Test HAVE_CXX_FP:PRECISE
-- Performing Test HAVE_CXX_FP:PRECISE - Success
-- Performing Test HAVE_C_FP:PRECISE
-- Performing Test HAVE_C_FP:PRECISE - Success
-- Performing Test HAVE_CPU_NEON_SUPPORT (check file: cmake/checks/cpu_neon.cpp)
-- Performing Test HAVE_CPU_NEON_SUPPORT - Success
-- Performing Test HAVE_CPU_FP16_SUPPORT (check file: cmake/checks/cpu_fp16.cpp)
-- Performing Test HAVE_CPU_FP16_SUPPORT - Failed
-- FP16 is not supported by C++ compiler
-- Performing Test HAVE_CPU_NEON_DOTPROD_SUPPORT (check file: cmake/checks/cpu_neon_dotprod.cpp)
-- Performing Test HAVE_CPU_NEON_DOTPROD_SUPPORT - Success
-- Performing Test HAVE_CPU_NEON_BF16_SUPPORT (check file: cmake/checks/cpu_neon_bf16.cpp)
-- Performing Test HAVE_CPU_NEON_BF16_SUPPORT - Failed
-- NEON_BF16 is not supported by C++ compiler
-- Dispatch optimization NEON_FP16 is not available, skipped
-- Dispatch optimization NEON_BF16 is not available, skipped
[18/1594] C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\add.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\add.cpp
FAILED: 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/add.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\add.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\add.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: while trying to match the argument list '(uint16x4_t)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: while trying to match the argument list '(uint16x4_t)'
[19/1594] C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\absdiff.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\absdiff.cpp
FAILED: 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/absdiff.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\absdiff.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\absdiff.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: while trying to match the argument list '(uint16x4_t)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: while trying to match the argument list '(uint16x4_t)'
[20/1594] C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\add_weighted.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\add_weighted.cpp
FAILED: 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/add_weighted.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\add_weighted.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\add_weighted.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: while trying to match the argument list '(uint16x4_t)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: while trying to match the argument list '(uint16x4_t)'
[21/1594] C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\bitwise.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\bitwise.cpp
FAILED: 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/bitwise.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\bitwise.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\bitwise.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: while trying to match the argument list '(uint16x4_t)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: while trying to match the argument list '(uint16x4_t)'
[22/1594] C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\blur.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\blur.cpp
FAILED: 3rdparty/carotene/hal/carotene/CMakeFiles/carotene_objs.dir/src/blur.cpp.obj 
C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\HostX64\ARM64\cl.exe  /nologo /TP -DCAROTENE_NS=carotene_o4t -DWITH_NEON -D_VARIADIC_MAX=10 -D_WIN32_WINNT=0x0601 -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -IC:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\include /DWIN32 /D_WINDOWS /W3 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /D _ARM64_DISTINCT_NEON_TYPES /Oi  /fp:precise /FS  /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819   /DWIN32 /D_WINDOWS /GR /O2 /Ob2 /DNDEBUG -MD  -MD /showIncludes /Fo3rdparty\carotene\hal\carotene\CMakeFiles\carotene_objs.dir\src\blur.cpp.obj /Fdpdb\ /FS -c C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\3rdparty\carotene\src\blur.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): note: while trying to match the argument list '(uint16x4_t)'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\arm64_neon.h(1957): note: see declaration of '__uint64x1_t_to_n64'
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(381): note: while trying to match the argument list '(uint16x4_t)'
ninja: build stopped: subcommand failed.
error: @programdir\core\sandbox\modules\os.lua:378: execv(C:\Users\runneradmin\AppData\Local\.xmake\packages\n\ninja\v1.12.1\f99acdf63a7d4fc88c165b22351691b6\bin\ninja.exe install -C C:\Users\runneradmin\AppData\Local\.xmake\cache\packages\2506\o\opencv\4.11.0\source\bd -v -j 6) failed(1)
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:1075]:
    [@programdir\core\sandbox\modules\os.lua:378]:
    [@programdir\core\sandbox\modules\os.lua:291]: in function 'vrunv'
    [@programdir\modules\package\tools\ninja.lua:67]: in function 'install'
    [@programdir\modules\package\tools\cmake.lua:1186]: in function '_install_for_ninja'
    [@programdir\modules\package\tools\cmake.lua:1390]: in function 'install'
    [D:\a\xmake-repo\xmake-repo\packages\o\opencv\xmake.lua:205]: in function 'script'
    [...dir\modules\private\action\require\impl\utils\filter.lua:114]: in function 'call'
    [...\modules\private\action\require\impl\actions\install.lua:470]:

  => install opencv 4.11.0 .. failed

Detailed description

C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\wchar.h(254): error C2664: '__n64 __uint64x1_t_to_n64(uint64x1_t)': cannot convert argument 1 from 'uint16x4_t' to 'uint64x1_t'
Issue present exactly for Github CI Worker ARM64 MSVC 2022.
https://github.com/xmake-io/xmake-repo/actions/runs/15422040197/job/43399439145?pr=7283
https://github.com/xmake-io/xmake-repo/actions/runs/15427097904/job/43416664282?pr=7283

https://github.com/shimat/opencv_files/actions/runs/14820387274/job/41606524130
os=windows-2022 OR os=windows-2025
arch=arm64
Both runtimes MT & MD.
Issue being discussed in some term before here #25052

Set either /D _ARM64_DISTINCT_NEON_TYPES or /Zc:arm64-aliased-neon-types- using cmake
But that'll disable all the FP16 instructions in arm64_neon.h which is a standard header file provided with Visual Studio.
#if !defined(_ARM64_DISTINCT_NEON_TYPES)
#define vget_lane_f16(Dm, lane) neon_dups16((Dm), (lane))
#define vcvt_f32_f16(src) __n128_to_float32x4_t(neon_fcvtl_32(__float16x4_t_to_n64(src)))
#define vcvt_f16_f32(src) __n64_to_float16x4_t(neon_fcvtn_32(__float32x4_t_to_n128(src)))

This was reported here microsoft/vcpkg#44310 (4.10.0)
One of example of failed workflow during use of ARM64 MSVC 2022 worker https://github.com/shimat/opencv_files/blob/4129745d672ad9faf5127bbec7fe98f8e0634e92/.github/workflows/windows.yml
Reports:
4.10.0 build:
https://developercommunity.visualstudio.com/t/arm64-fails-in-wcharh-with-the-lastest/10898403?space=62&sort=newest
Similar issue:
https://developercommunity.visualstudio.com/t/wcharh-header-fails-compilation-on-ARM6/10868106?sort=active

Steps to reproduce

Use Github CI Worker MSVC 2022
--vs_sdkver=10.0.26100.0
os=windows-2022 OR os=windows-2025
arch=arm64
Both runtimes MT & MD.
Try to emulate https://github.com/shimat/opencv_files
Trigger by commit like this.
Image
Once this build error is gone -> its fixed https://github.com/shimat/opencv_files/actions/runs/14820387274/job/41606524130
See this PR: shimat/opencv_files#29 logs_38058675558.zip

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy