Skip to content

[Build] Both 1.31.0 and 1.31.1 failed to Build Windows msvc2019 x64 Release with error C2440  #33636

Open

Description

Describe the issue

GitHub Action workflow with Workflow file:
Build Windows x86 release successfully, failed to build Windows x64 release with errors(see more details)

Urgency

No response

Target platform

windows-2022, msvc2019 x64

Build script

name: Build ONNX Runtime for macOS and Windows

on:
  push:
    branches: [main]
    paths:
      - '.github/workflows/build-onnxruntime.yml'
      - 'ort_macos_build.sh'

env:
  ONNXRUNTIME_VERSION: "1.31.1"

jobs:
  macos-shared:
    if: true
    name: ${{ matrix.os }} ${{ matrix.arch }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: macos-latest
            arch: arm64
          - os: macos-15-intel
            arch: universal

    steps:
      - name: Cache build result for ${{ env.ONNXRUNTIME_VERSION }}
        id: cache-build-result
        uses: actions/cache@v4
        with:
          path: onnxruntime-osx-${{ matrix.arch }}-${{ env.ONNXRUNTIME_VERSION }}
          key: onnxruntime-osx-${{ matrix.arch }}-${{ env.ONNXRUNTIME_VERSION }}-cache-v2

      - name: ccache
        uses: hendrikmuhs/ccache-action@v1.2
        with:
          key: ${{ matrix.os }}-${{ matrix.arch }}

      - name: Checkout v${{ env.ONNXRUNTIME_VERSION }}
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        uses: actions/checkout@v7
        with:
          repository: microsoft/onnxruntime
          submodules: true
          ref: v${{ env.ONNXRUNTIME_VERSION }}

      - name: Install dependencies on macos
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        shell: bash
        run: |
          brew install ninja 7zip
          cmake --version
          brew install tree
          tree --version
      - name: Build onnxruntime ${{ env.ONNXRUNTIME_VERSION }} for macOS ${{ matrix.arch }}
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        shell: bash
        run: |
          export CMAKE_CXX_COMPILER_LAUNCHER=ccache
          export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
          curl -L https://raw.githubusercontent.com/JingDict/nw3rdBuild/refs/heads/main/ort_macos_build.sh -o ort_macos_build.sh
          sed -i.bak '/SOVERSION/d' ./cmake/onnxruntime.cmake
          git diff
          build_dir=./build-macos/${{ matrix.arch }}
          version=${{ env.ONNXRUNTIME_VERSION }}
          config=${{ matrix.config }}
          matrixarch=${{ matrix.arch }}
          arch="arm64"
          extra_opt="--no_kleidiai"
          # sed -i.bak s/\"arm64e\",/\"x86_64\;arm64\",/g ./tools/ci_build/build.py
          artifact=onnxruntime-osx-arm64-${{ env.ONNXRUNTIME_VERSION }}
          source ./ort_macos_build.sh
          arch=${{ matrix.arch }}
          if [[ $arch == universal ]]; then
            arch="x86_64"
            extra_opt=""
            artifact=onnxruntime-osx-x86_64-${{ env.ONNXRUNTIME_VERSION }}
            source ./ort_macos_build.sh
          fi
          pwd && ls -la onnxruntime-osx-*
      - name: Collect results
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        id: vars
        shell: bash
        run: |
          echo "update_date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
          arch=${{ matrix.arch }}
          artifact1=onnxruntime-osx-arm64-${{ env.ONNXRUNTIME_VERSION }}
          tree ./$artifact1
          if [[ $arch == arm64 ]]; then
            # zip -r ${artifact1}.zip ./$artifact1
            7z -mx5 a ./${artifact1}.7z ./$artifact1
          fi
          if [[ $arch == universal ]]; then
            artifact2=onnxruntime-osx-x86_64-${{ env.ONNXRUNTIME_VERSION }}
            tree ./$artifact2
            # zip -r ${artifact2}.zip ./$artifact2
            7z -mx5 a ./${artifact2}.7z ./$artifact2
            WSP_ROOT=$PWD
            artifact=onnxruntime-osx-${{ matrix.arch }}-${{ env.ONNXRUNTIME_VERSION }}
            mkdir -p $WSP_ROOT/$artifact/lib
            cp -R $WSP_ROOT/$artifact2/include $WSP_ROOT/$artifact
            cp -v $WSP_ROOT/$artifact2/README.md $WSP_ROOT/$artifact/README.md
            cp -v $WSP_ROOT/$artifact2/Privacy.md $WSP_ROOT/$artifact/Privacy.md
            cp -v $WSP_ROOT/$artifact2/LICENSE $WSP_ROOT/$artifact/LICENSE
            cp -v $WSP_ROOT/$artifact2/ThirdPartyNotices.txt $WSP_ROOT/$artifact/ThirdPartyNotices.txt
            cp -v $WSP_ROOT/$artifact2/VERSION_NUMBER $WSP_ROOT/$artifact/VERSION_NUMBER
            version=${{ env.ONNXRUNTIME_VERSION }}
            lipo \
                $WSP_ROOT/$artifact2/lib/libonnxruntime.$version.dylib \
                $WSP_ROOT/$artifact1/lib/libonnxruntime.$version.dylib \
                -create -output $WSP_ROOT/$artifact/lib/libonnxruntime.$version.dylib
            pushd $WSP_ROOT/$artifact/lib
            ln -s libonnxruntime.$version.dylib libonnxruntime.dylib
            popd
            tree ./$artifact
            # zip -r ${artifact}.zip ./$artifact
            7z -mx5 a ./${artifact}.7z ./$artifact
            rm -rf $WSP_ROOT/$artifact1
            rm -rf $WSP_ROOT/$artifact2
          fi
          pwd && ls -la
      - name: Upload artifact
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        uses: actions/upload-artifact@v4
        with:
          name: onnxruntime-osx-${{ matrix.arch }}-${{ env.ONNXRUNTIME_VERSION }}
          path: onnxruntime-osx-${{ matrix.arch }}-${{ env.ONNXRUNTIME_VERSION }}

      - name: Upload v${{ env.ONNXRUNTIME_VERSION }}
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        uses: svenstaro/upload-release-action@v2
        with:
          file_glob: true
          file: "./*.7z"
          overwrite: true
          tag: onnxruntime-${{ env.ONNXRUNTIME_VERSION }}
          release_name: ONNX Runtime ${{ env.ONNXRUNTIME_VERSION }}
          body: |
            date: ${{ steps.vars.outputs.update_date }}
  windows_x64:
    if: true
    name: Build Windows ${{ matrix.target }} Release
    runs-on: windows-2022
    strategy:
      fail-fast: false
      matrix:
        target: ["x64", "x86"]

    steps:
      - name: Cache build result for ${{ env.ONNXRUNTIME_VERSION }} ${{ matrix.target }}
        id: cache-build-result
        uses: actions/cache@v4
        with:
          path: onnxruntime-win-${{ matrix.target }}-${{ env.ONNXRUNTIME_VERSION }}
          key: onnxruntime-win-${{ matrix.target }}-${{ env.ONNXRUNTIME_VERSION }}-cache-v2

      - name: Checkout v${{ env.ONNXRUNTIME_VERSION }}
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        uses: actions/checkout@v4
        with:
          repository: microsoft/onnxruntime
          submodules: true
          ref: v${{ env.ONNXRUNTIME_VERSION }}

      - name: Setup Python
        if: false && steps.cache-build-result.outputs.cache-hit != 'true' && matrix.target == 'x86'
        uses: actions/setup-python@v6
        with:
          python-version: '3.14'
          architecture: x86 # x86 Python

      - name: Setup msvc2019 x64 Environment
        if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.target == 'x64'
        uses: TheMrMilchmann/setup-msvc-dev@v4
        with:
          arch: x64
          toolset: 14.29

      - name: Setup msvc2019 x86 Environment
        if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.target == 'x86'
        uses: TheMrMilchmann/setup-msvc-dev@v4
        with:
          arch: x86
          toolset: 14.29

      - name: Install python modules
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        shell: cmd
        run: python -m pip install -r "${{ github.workspace }}\tools\ci_build\github\windows\python\requirements.txt"

      - name: Install dependencies on Windows
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        shell: bash
        run: |
          python3 -m pip install cmake
          python3 -m pip install ninja
          cmake --version
      - name: Build onnxruntime ${{ env.ONNXRUNTIME_VERSION }} for ${{ matrix.target }}
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        id: vars
        shell: bash
        run: |
          where cl.exe && cl.exe
          build_dir=./build/windows_${{ matrix.target }}
          arch=${{ matrix.target }}
          extra_opt=""
          if [[ $arch == x86 ]]; then
            curl -L https://raw.githubusercontent.com/JingDict/nw3rdBuild/refs/heads/main/onnx_amx_common.patch -o onnx_amx_common.patch
            cat ./onnx_amx_common.patch | patch -Z -d ./onnxruntime -p1 --verbose || exit 1
            extra_opt="--x86 --cmake_extra_defines CMAKE_VS_PLATFORM_NAME=x86"
          fi
          dst_dir=onnxruntime-win-${{ matrix.target }}-${{ env.ONNXRUNTIME_VERSION }}
          WSP_ROOT=$PWD
          python3 ./tools/ci_build/build.py \
            --compile_no_warning_as_error \
            --build_dir $build_dir --no_telemetry \
            --config Release \
            --parallel \
            $extra_opt \
            --cmake_generator "Ninja" \
            --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF \
            --cmake_extra_defines CMAKE_INSTALL_PREFIX=$WSP_ROOT/$dst_dir \
            --skip_tests \
            --build_shared_lib \
            --disable_memleak_checker \
            --update \
            --build --target install
          cd $dst_dir
          7z -mx5 a ../${dst_dir}.7z *
          cd ..
          ls -lh
          echo "update_date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
          echo "cl_exe_info=$(cl > cl_version 2>&1 && head -n 1 cl_version)" >> $GITHUB_OUTPUT
      - name: Upload artifact
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        uses: actions/upload-artifact@v4
        with:
          name: onnxruntime-win-${{ matrix.target }}-${{ env.ONNXRUNTIME_VERSION }}
          path: onnxruntime-win-${{ matrix.target }}-${{ env.ONNXRUNTIME_VERSION }}

      - name: Upload v${{ env.ONNXRUNTIME_VERSION }}
        if: steps.cache-build-result.outputs.cache-hit != 'true'
        uses: svenstaro/upload-release-action@v2
        with:
          file_glob: true
          file: "./*.7z"
          overwrite: true
          tag: onnxruntime-${{ env.ONNXRUNTIME_VERSION }}
          release_name: ONNX Runtime ${{ env.ONNXRUNTIME_VERSION }}
          body: |
            date: ${{ steps.vars.outputs.update_date }}
            cl: ${{ steps.vars.outputs.cl_exe_info }}

Error / output

2026-10-27T04:39:52.2549014Z "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe"  /nologo /TP -DCPUINFO_SUPPORTED -DCPUINFO_SUPPORTED_PLATFORM=1 -DEIGEN_HAS_CONSTEXPR -DEIGEN_HAS_CXX11_ATOMIC -DEIGEN_HAS_CXX11_MATH -DEIGEN_HAS_VARIADIC_TEMPLATES -DEIGEN_MPL2_ONLY -DEIGEN_STRONG_INLINE=inline -DEIGEN_USE_THREADS -DNOGDI -DNOMINMAX -DONLY_C_LOCALE=0 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DONNX_USE_LITE_PROTO=1 -DORT_ENABLE_GQA_VALUE_LAYOUT -DORT_ENABLE_STREAM -DPLATFORM_WINDOWS -DUSE_DX_INTEROP=0 -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -D_USE_MATH_DEFINES -D__ONNX_NO_DOC_STRINGS -ID:\a\nw3rdBuild\nw3rdBuild\include\onnxruntime -ID:\a\nw3rdBuild\nw3rdBuild\include\onnxruntime\core\session -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\pytorch_cpuinfo-src\include -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release -ID:\a\nw3rdBuild\nw3rdBuild\onnxruntime -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\safeint-src -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\gsl-src\include -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\date-src\include -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\onnx-src -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\onnx-build -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\third_party\utf8_range -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\flatbuffers-src\include -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\mp11-src\include -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\nlohmann_json-src\include -ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\eigen3-src -ID:\a\nw3rdBuild\nw3rdBuild\model_package\include /MP /Zc:__cplusplus /EHsc /wd26812 -DEIGEN_HAS_C99_MATH /O2 /Ob2 /DNDEBUG -std:c++20 -MD -Zi /GR /W4 /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\microsoft_wil-src\include /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\nlohmann_json-src\include\ /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\onnx-src /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\onnx-build /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\re2-src /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\mp11-src\include /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\safeint-src /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\flatbuffers-src\include /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\gsl-src\include /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\date-src\include /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\eigen3-src /external:ID:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\pytorch_cpuinfo-src\include /utf-8 /sdl /experimental:external /external:W0 /external:ID:/a/nw3rdBuild/nw3rdBuild/cmake /external:ID:/a/nw3rdBuild/nw3rdBuild/build/windows_x64/Release /wd4251 /wd4201 /wd4324 /wd5054 /w15038 /showIncludes /FoCMakeFiles\onnxruntime_session.dir\D_\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\environment.cc.obj /FdCMakeFiles\onnxruntime_session.dir\onnxruntime_session.pdb /FS -c D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\environment.cc
2026-10-27T04:39:52.2562532Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(133): warning C4100: 'context': unreferenced formal parameter
2026-10-27T04:39:52.2564030Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(133): warning C4100: 'fn': unreferenced formal parameter
2026-10-27T04:39:52.2566040Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(599): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:39:52.2584663Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(600): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:39:52.2585760Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(601): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:39:52.2586823Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(84): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:39:52.2588740Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(87): warning C4458: declaration of 'size' hides class member
2026-10-27T04:39:52.2589903Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(72): note: see declaration of 'google::protobuf::internal::MicroString::LargeRep::size'
2026-10-27T04:39:52.2591060Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(89): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:39:52.2592379Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(97): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:39:52.2593502Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(109): warning C4458: declaration of 'size' hides class member
2026-10-27T04:39:52.2594597Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(102): note: see declaration of 'google::protobuf::internal::MicroString::MicroRep::size'
2026-10-27T04:39:52.2595787Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1760): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:39:52.2597731Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1765): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:39:52.2598991Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1769): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:39:52.2600152Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(306): warning C4100: 'p': unreferenced formal parameter
2026-10-27T04:39:52.2601154Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(307): warning C4100: 'view': unreferenced formal parameter
2026-10-27T04:39:52.2602217Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(308): warning C4100: 'p': unreferenced formal parameter
2026-10-27T04:39:52.2603455Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector(1176): error C2672: 'std::vector<OrtEpFactory *,std::allocator<OrtEpFactory *>>::_Assign_range': no matching overloaded function found
2026-10-27T04:39:52.2605258Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\environment.cc(1046): note: see reference to function template instantiation 'void std::vector<OrtEpFactory *,std::allocator<OrtEpFactory *>>::assign<std::ranges::transform_view<std::ranges::iota_view<_Ty1,_Ty2>,onnxruntime::EpLibrary::GetFactories::<lambda_1>>::_Iterator<false>,0>(_Iter,_Iter)' being compiled
2026-10-27T04:39:52.2606505Z         with
2026-10-27T04:39:52.2606706Z         [
2026-10-27T04:39:52.2606904Z             _Ty1=size_t,
2026-10-27T04:39:52.2607125Z             _Ty2=size_t,
2026-10-27T04:39:52.2607629Z             _Iter=std::ranges::transform_view<std::ranges::iota_view<size_t,size_t>,onnxruntime::EpLibrary::GetFactories::<lambda_1>>::_Iterator<false>
2026-10-27T04:39:52.2608168Z         ]
2026-10-27T04:39:52.2609475Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\environment.cc(1046): note: see reference to function template instantiation 'void std::vector<OrtEpFactory *,std::allocator<OrtEpFactory *>>::assign<std::ranges::transform_view<std::ranges::iota_view<_Ty1,_Ty2>,onnxruntime::EpLibrary::GetFactories::<lambda_1>>::_Iterator<false>,0>(_Iter,_Iter)' being compiled
2026-10-27T04:39:52.2611507Z         with
2026-10-27T04:39:52.2611698Z         [
2026-10-27T04:39:52.2611885Z             _Ty1=size_t,
2026-10-27T04:39:52.2612102Z             _Ty2=size_t,
2026-10-27T04:39:52.2612644Z             _Iter=std::ranges::transform_view<std::ranges::iota_view<size_t,size_t>,onnxruntime::EpLibrary::GetFactories::<lambda_1>>::_Iterator<false>
2026-10-27T04:39:52.2613223Z         ]
2026-10-27T04:39:52.2613942Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector(1176): error C2440: 'initializing': cannot convert from 'std::output_iterator_tag' to 'std::forward_iterator_tag'
2026-10-27T04:39:52.2615480Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector(1176): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
2026-10-27T04:39:52.2616846Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector(1176): error C2440: 'initializing': cannot convert from 'std::output_iterator_tag' to 'std::input_iterator_tag'
2026-10-27T04:39:52.2618187Z C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector(1176): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
2026-10-27T04:39:53.1835390Z [977/1366] Building CXX object CMakeFiles\onnxruntime_session.dir\D_\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\interop_api.cc.obj
2026-10-27T04:39:58.5001933Z [978/1366] Building CXX object CMakeFiles\onnxruntime_session.dir\D_\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\inference_session_utils.cc.obj
2026-10-27T04:39:58.5003064Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(133): warning C4100: 'context': unreferenced formal parameter
2026-10-27T04:39:58.5004038Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(133): warning C4100: 'fn': unreferenced formal parameter
2026-10-27T04:39:58.5005036Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(599): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:39:58.5005961Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(600): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:39:58.5006925Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(601): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:39:58.5007849Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/base/prefetch.h(183): warning C4100: 'addr': unreferenced formal parameter
2026-10-27T04:39:58.5008878Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(84): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:39:58.5010033Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(87): warning C4458: declaration of 'size' hides class member
2026-10-27T04:39:58.5011156Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(72): note: see declaration of 'google::protobuf::internal::MicroString::LargeRep::size'
2026-10-27T04:39:58.5012271Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(89): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:39:58.5013459Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(97): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:39:58.5014797Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(109): warning C4458: declaration of 'size' hides class member
2026-10-27T04:39:58.5015889Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(102): note: see declaration of 'google::protobuf::internal::MicroString::MicroRep::size'
2026-10-27T04:39:58.5017121Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1760): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:39:58.5018386Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1765): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:39:58.5019753Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1769): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:39:58.5020869Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(306): warning C4100: 'p': unreferenced formal parameter
2026-10-27T04:39:58.5021899Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(307): warning C4100: 'view': unreferenced formal parameter
2026-10-27T04:39:58.5022910Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(308): warning C4100: 'p': unreferenced formal parameter
2026-10-27T04:39:58.5023881Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(228): warning C4127: conditional expression is constant
2026-10-27T04:39:58.5024939Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(229): note: consider using 'if constexpr' statement instead
2026-10-27T04:39:58.5026557Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(219): note: while compiling class template member function 'absl::lts_20250814::InlinedVector<gsl::not_null<const onnxruntime::KernelRegistry *>,6,std::allocator<T>>::InlinedVector(absl::lts_20250814::InlinedVector<T,6,std::allocator<T>> &&) noexcept'
2026-10-27T04:39:58.5027800Z         with
2026-10-27T04:39:58.5027968Z         [
2026-10-27T04:39:58.5028188Z             T=gsl::not_null<const onnxruntime::KernelRegistry *>
2026-10-27T04:39:58.5028440Z         ]
2026-10-27T04:39:58.5029614Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core/framework/kernel_registry_manager.h(65): note: see reference to function template instantiation 'absl::lts_20250814::InlinedVector<gsl::not_null<const onnxruntime::KernelRegistry *>,6,std::allocator<T>>::InlinedVector(absl::lts_20250814::InlinedVector<T,6,std::allocator<T>> &&) noexcept' being compiled
2026-10-27T04:39:58.5030776Z         with
2026-10-27T04:39:58.5030932Z         [
2026-10-27T04:39:58.5031143Z             T=gsl::not_null<const onnxruntime::KernelRegistry *>
2026-10-27T04:39:58.5031412Z         ]
2026-10-27T04:39:58.5032248Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core/framework/kernel_registry_manager.h(57): note: see reference to class template instantiation 'absl::lts_20250814::InlinedVector<gsl::not_null<const onnxruntime::KernelRegistry *>,6,std::allocator<T>>' being compiled
2026-10-27T04:39:58.5033161Z         with
2026-10-27T04:39:58.5033295Z         [
2026-10-27T04:39:58.5033502Z             T=gsl::not_null<const onnxruntime::KernelRegistry *>
2026-10-27T04:39:58.5033780Z         ]
2026-10-27T04:39:58.5034376Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(352): warning C4127: conditional expression is constant
2026-10-27T04:39:58.5035429Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(353): note: consider using 'if constexpr' statement instead
2026-10-27T04:39:58.5036891Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(343): note: while compiling class template member function 'absl::lts_20250814::inlined_vector_internal::Storage<T,2,A>::~Storage(void)'
2026-10-27T04:39:58.5037812Z         with
2026-10-27T04:39:58.5037967Z         [
2026-10-27T04:39:58.5038134Z             T=onnxruntime::BufferUniquePtr,
2026-10-27T04:39:58.5038391Z             A=std::allocator<onnxruntime::BufferUniquePtr>
2026-10-27T04:39:58.5038657Z         ]
2026-10-27T04:39:58.5039660Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(299): note: see reference to function template instantiation 'absl::lts_20250814::inlined_vector_internal::Storage<T,2,A>::~Storage(void)' being compiled
2026-10-27T04:39:58.5040468Z         with
2026-10-27T04:39:58.5040610Z         [
2026-10-27T04:39:58.5040783Z             T=onnxruntime::BufferUniquePtr,
2026-10-27T04:39:58.5041073Z             A=std::allocator<onnxruntime::BufferUniquePtr>
2026-10-27T04:39:58.5041335Z         ]
2026-10-27T04:39:58.5042104Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(101): note: see reference to class template instantiation 'absl::lts_20250814::inlined_vector_internal::Storage<T,2,A>' being compiled
2026-10-27T04:39:58.5042955Z         with
2026-10-27T04:39:58.5043107Z         [
2026-10-27T04:39:58.5043280Z             T=onnxruntime::BufferUniquePtr,
2026-10-27T04:39:58.5043553Z             A=std::allocator<onnxruntime::BufferUniquePtr>
2026-10-27T04:39:58.5043782Z         ]
2026-10-27T04:39:58.5044657Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core/framework/session_state.h(565): note: see reference to class template instantiation 'absl::lts_20250814::InlinedVector<onnxruntime::BufferUniquePtr,2,std::allocator<onnxruntime::BufferUniquePtr>>' being compiled
2026-10-27T04:39:58.5046014Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/strings/internal/str_format/constexpr_parser.h(257): warning C4127: conditional expression is constant
2026-10-27T04:39:58.5047137Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/strings/internal/str_format/constexpr_parser.h(257): note: consider using 'if constexpr' statement instead
2026-10-27T04:39:58.5048896Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/strings/internal/str_format/constexpr_parser.h(349): note: see reference to function template instantiation 'const char *absl::lts_20250814::str_format_internal::ConsumeConversion<true>(const char *,const char *const ,absl::lts_20250814::str_format_internal::UnboundConversion *,int *)' being compiled
2026-10-27T04:40:06.1788205Z [979/1366] Building CXX object CMakeFiles\onnxruntime_session.dir\D_\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\inference_session.cc.obj
2026-10-27T04:40:06.1789206Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(133): warning C4100: 'context': unreferenced formal parameter
2026-10-27T04:40:06.1790079Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(133): warning C4100: 'fn': unreferenced formal parameter
2026-10-27T04:40:06.1790952Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(599): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:40:06.1791781Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(600): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:40:06.1792538Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/port.h(601): warning C4100: 'ptr': unreferenced formal parameter
2026-10-27T04:40:06.1793323Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/base/prefetch.h(183): warning C4100: 'addr': unreferenced formal parameter
2026-10-27T04:40:06.1793917Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(84): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:40:06.1794541Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(87): warning C4458: declaration of 'size' hides class member
2026-10-27T04:40:06.1795227Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(72): note: see declaration of 'google::protobuf::internal::MicroString::LargeRep::size'
2026-10-27T04:40:06.1796301Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(89): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:40:06.1796956Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(97): warning C4267: '=': conversion from 'size_t' to 'uint32_t', possible loss of data
2026-10-27T04:40:06.1797566Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(109): warning C4458: declaration of 'size' hides class member
2026-10-27T04:40:06.1798189Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/micro_string.h(102): note: see declaration of 'google::protobuf::internal::MicroString::MicroRep::size'
2026-10-27T04:40:06.1798884Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1760): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:40:06.1799593Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1765): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:40:06.1800288Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/repeated_ptr_field.h(1769): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
2026-10-27T04:40:06.1800922Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(306): warning C4100: 'p': unreferenced formal parameter
2026-10-27T04:40:06.1801833Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(307): warning C4100: 'view': unreferenced formal parameter
2026-10-27T04:40:06.1802738Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\protobuf-src\src\google/protobuf/parse_context.h(308): warning C4100: 'p': unreferenced formal parameter
2026-10-27T04:40:06.1803327Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(228): warning C4127: conditional expression is constant
2026-10-27T04:40:06.1803900Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(229): note: consider using 'if constexpr' statement instead
2026-10-27T04:40:06.1804852Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(219): note: while compiling class template member function 'absl::lts_20250814::InlinedVector<gsl::not_null<const onnxruntime::IExecutionProvider *>,6,std::allocator<T>>::InlinedVector(absl::lts_20250814::InlinedVector<T,6,std::allocator<T>> &&) noexcept'
2026-10-27T04:40:06.1805628Z         with
2026-10-27T04:40:06.1805792Z         [
2026-10-27T04:40:06.1805980Z             T=gsl::not_null<const onnxruntime::IExecutionProvider *>
2026-10-27T04:40:06.1806164Z         ]
2026-10-27T04:40:06.1806808Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\inference_session.cc(2075): note: see reference to function template instantiation 'absl::lts_20250814::InlinedVector<gsl::not_null<const onnxruntime::IExecutionProvider *>,6,std::allocator<T>>::InlinedVector(absl::lts_20250814::InlinedVector<T,6,std::allocator<T>> &&) noexcept' being compiled
2026-10-27T04:40:06.1807597Z         with
2026-10-27T04:40:06.1807701Z         [
2026-10-27T04:40:06.1807855Z             T=gsl::not_null<const onnxruntime::IExecutionProvider *>
2026-10-27T04:40:06.1808055Z         ]
2026-10-27T04:40:06.1808648Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core/optimizer/transformer_memcpy.h(34): note: see reference to class template instantiation 'absl::lts_20250814::InlinedVector<gsl::not_null<const onnxruntime::IExecutionProvider *>,6,std::allocator<T>>' being compiled
2026-10-27T04:40:06.1809539Z         with
2026-10-27T04:40:06.1809810Z         [
2026-10-27T04:40:06.1810061Z             T=gsl::not_null<const onnxruntime::IExecutionProvider *>
2026-10-27T04:40:06.1810556Z         ]
2026-10-27T04:40:06.1811102Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(352): warning C4127: conditional expression is constant
2026-10-27T04:40:06.1812177Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(353): note: consider using 'if constexpr' statement instead
2026-10-27T04:40:06.1813471Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(343): note: while compiling class template member function 'absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>::~Storage(void)'
2026-10-27T04:40:06.1814327Z         with
2026-10-27T04:40:06.1814485Z         [
2026-10-27T04:40:06.1814714Z             T=std::unique_ptr<OrtValue,std::default_delete<OrtValue>>,
2026-10-27T04:40:06.1815126Z             A=std::allocator<std::unique_ptr<OrtValue,std::default_delete<OrtValue>>>
2026-10-27T04:40:06.1815457Z         ]
2026-10-27T04:40:06.1816232Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(299): note: see reference to function template instantiation 'absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>::~Storage(void)' being compiled
2026-10-27T04:40:06.1817148Z         with
2026-10-27T04:40:06.1817301Z         [
2026-10-27T04:40:06.1817524Z             T=std::unique_ptr<OrtValue,std::default_delete<OrtValue>>,
2026-10-27T04:40:06.1817894Z             A=std::allocator<std::unique_ptr<OrtValue,std::default_delete<OrtValue>>>
2026-10-27T04:40:06.1818194Z         ]
2026-10-27T04:40:06.1818972Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(101): note: see reference to class template instantiation 'absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>' being compiled
2026-10-27T04:40:06.1819809Z         with
2026-10-27T04:40:06.1819955Z         [
2026-10-27T04:40:06.1820171Z             T=std::unique_ptr<OrtValue,std::default_delete<OrtValue>>,
2026-10-27T04:40:06.1820534Z             A=std::allocator<std::unique_ptr<OrtValue,std::default_delete<OrtValue>>>
2026-10-27T04:40:06.1820859Z         ]
2026-10-27T04:40:06.1821713Z D:\a\nw3rdBuild\nw3rdBuild\onnxruntime\core\session\inference_session.cc(4111): note: see reference to class template instantiation 'absl::lts_20250814::InlinedVector<std::unique_ptr<OrtValue,std::default_delete<OrtValue>>,6,std::allocator<T>>' being compiled
2026-10-27T04:40:06.1822564Z         with
2026-10-27T04:40:06.1822722Z         [
2026-10-27T04:40:06.1822960Z             T=std::unique_ptr<OrtValue,std::default_delete<OrtValue>>
2026-10-27T04:40:06.1823260Z         ]
2026-10-27T04:40:06.1823860Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/strings/internal/str_format/constexpr_parser.h(257): warning C4127: conditional expression is constant
2026-10-27T04:40:06.1825094Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/strings/internal/str_format/constexpr_parser.h(257): note: consider using 'if constexpr' statement instead
2026-10-27T04:40:06.1826925Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/strings/internal/str_format/constexpr_parser.h(349): note: see reference to function template instantiation 'const char *absl::lts_20250814::str_format_internal::ConsumeConversion<true>(const char *,const char *const ,absl::lts_20250814::str_format_internal::UnboundConversion *,int *)' being compiled
2026-10-27T04:40:06.1828565Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(600): warning C4127: conditional expression is constant
2026-10-27T04:40:06.1829581Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(601): note: consider using 'if constexpr' statement instead
2026-10-27T04:40:06.1831132Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(577): note: while compiling class template member function 'void absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>::InitFrom(const absl::lts_20250814::inlined_vector_internal::Storage<T,6,A> &)'
2026-10-27T04:40:06.1832155Z         with
2026-10-27T04:40:06.1832308Z         [
2026-10-27T04:40:06.1832499Z             T=const onnxruntime::lora::LoraAdapter *,
2026-10-27T04:40:06.1832811Z             A=std::allocator<const onnxruntime::lora::LoraAdapter *>
2026-10-27T04:40:06.1833088Z         ]
2026-10-27T04:40:06.1834086Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/inlined_vector.h(202): note: see reference to function template instantiation 'void absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>::InitFrom(const absl::lts_20250814::inlined_vector_internal::Storage<T,6,A> &)' being compiled
2026-10-27T04:40:06.1835121Z         with
2026-10-27T04:40:06.1835272Z         [
2026-10-27T04:40:06.1835458Z             T=const onnxruntime::lora::LoraAdapter *,
2026-10-27T04:40:06.1835768Z             A=std::allocator<const onnxruntime::lora::LoraAdapter *>
2026-10-27T04:40:06.1836041Z         ]
2026-10-27T04:40:06.1836877Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(552): note: see reference to class template instantiation 'absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>::Inlined' being compiled
2026-10-27T04:40:06.1837744Z         with
2026-10-27T04:40:06.1837888Z         [
2026-10-27T04:40:06.1838069Z             T=const onnxruntime::lora::LoraAdapter *,
2026-10-27T04:40:06.1838373Z             A=std::allocator<const onnxruntime::lora::LoraAdapter *>
2026-10-27T04:40:06.1838640Z         ]
2026-10-27T04:40:06.1839423Z D:\a\nw3rdBuild\nw3rdBuild\build\windows_x64\Release\_deps\abseil_cpp-src\absl/container/internal/inlined_vector.h(566): note: see reference to class template instantiation 'absl::lts_20250814::inlined_vector_internal::Storage<T,6,A>::Data' being compiled
2026-10-27T04:40:06.1840259Z         with
2026-10-27T04:40:06.1840403Z         [
2026-10-27T04:40:06.1840577Z             T=const onnxruntime::lora::LoraAdapter *,
2026-10-27T04:40:06.1840886Z             A=std::allocator<const onnxruntime::lora::LoraAdapter *>
2026-10-27T04:40:06.1841152Z         ]
2026-10-27T04:40:06.1841321Z ninja: build stopped: subcommand failed.
2026-10-27T04:40:06.2077390Z Traceback (most recent call last):
2026-10-27T04:40:06.2077833Z   File "D:\a\nw3rdBuild\nw3rdBuild\tools\ci_build\build.py", line 2858, in <module>
2026-10-27T04:40:06.2091470Z Namespace(build_dir='./build/windows_x64', config=['Release'], update=True, build=True, clean=False, parallel=0, targets=['install'], compile_no_warning_as_error=True, build_shared_lib=True, build_apple_framework=False, enable_lto=False, use_cache=False, use_binskim_compliant_compile_flags=False, cmake_extra_defines=['onnxruntime_BUILD_UNIT_TESTS=OFF', 'CMAKE_INSTALL_PREFIX=D:/a/nw3rdBuild/nw3rdBuild/onnxruntime-win-x64-1.31.1'], cmake_path='cmake', cmake_generator='Ninja', use_vcpkg=False, use_vcpkg_ms_internal_asset_cache=False, terrapin_retrieval_tool_path=None, skip_submodule_sync=False, skip_pip_install=False, test=False, skip_tests=True, ctest_path='ctest', enable_onnx_tests=False, path_to_protoc_exe=None, cmake_deps_mirror_dir=None, fuzz_testing=False, enable_symbolic_shape_infer_tests=False, skip_onnx_tests=False, skip_winml_tests=False, skip_nodejs_tests=False, ctest_timeout='10800', test_parallel=None, enable_transformers_tool_test=False, build_micro_benchmarks=False, code_coverage=False, enable_training=False, enable_training_apis=False, enable_training_ops=False, enable_nccl=False, nccl_home=None, enable_memory_profile=False, enable_address_sanitizer=False, gen_doc=None, rv64=False, riscv_toolchain_root='', riscv_qemu_path='', android=False, android_abi='arm64-v8a', android_api=27, android_sdk_path='C:\\Android\\android-sdk', android_ndk_path='C:\\Android\\android-sdk\\ndk\\27.3.13750724', android_cpp_shared=False, android_run_emulator=False, build_wasm=False, build_wasm_static_lib=False, emsdk_version='4.0.23', enable_wasm_jspi=False, enable_wasm_simd=False, enable_wasm_relaxed_simd=False, enable_wasm_threads=False, disable_wasm_exception_catching=False, enable_wasm_api_exception_catching=False, enable_wasm_exception_throwing_override=True, wasm_run_tests_in_browser=False, enable_wasm_profiling=False, enable_wasm_debug_info=False, wasm_malloc=None, emscripten_settings=[], use_full_protobuf=False, use_mimalloc=False, external_graph_transformer_path=None, use_extensions=False, extensions_overridden_path=None, minimal_build=None, include_ops_by_config=None, enable_reduced_operator_type_support=False, disable_contrib_ops=False, disable_ml_ops=False, disable_generation_ops=False, disable_rtti=False, disable_types=[], disable_exceptions=False, client_package_build=False, enable_session_threadpool_callbacks=False, enable_pybind=False, build_wheel=False, wheel_name_suffix=None, skip_keras_test=False, build_csharp=False, build_nuget=False, msbuild_extra_options=[], build_java=False, build_nodejs=False, build_objc=False, use_cuda=False, cuda_version=None, cuda_home=None, cudnn_home=None, enable_cuda_line_info=False, enable_cuda_nhwc_ops=False, disable_cuda_nhwc_ops=False, enable_cuda_minimal_build=False, nvcc_threads=4, flash_nvcc_threads=-1, enable_nvtx_profile=False, enable_cuda_profiling=False, no_sve=False, enable_arm_neon_nchwc=False, enable_rvv=False, use_dnnl=False, dnnl_gpu_runtime='', dnnl_opencl_root='', dnnl_aarch64_runtime='', dnnl_acl_root='', use_openvino=None, use_tensorrt=False, use_tensorrt_builtin_parser=True, use_tensorrt_oss_parser=False, tensorrt_home=None, tensorrt_rtx_home=None, use_nv_tensorrt_rtx=False, use_dml=False, dml_path='', dml_external_project=False, use_nnapi=False, nnapi_min_api=None, use_coreml=False, use_qnn=None, qnn_home=None, use_snpe=False, snpe_root=None, use_vitisai=False, use_acl=False, acl_home=None, acl_libs=None, no_kleidiai=False, use_qmx=False, use_rknpu=False, use_cann=False, cann_home=None, use_migraphx=False, migraphx_home=None, rocm_version=None, rocm_home=None, use_webnn=False, use_jsep=False, use_webgpu=None, use_external_dawn=False, use_dawn_agility_sdk=False, wgsl_template='static', use_xnnpack=False, use_vsinpu=False, use_azure=False, enable_dx_interop=False, enable_lazy_tensor=False, ms_experimental=False, enable_msinternal=False, use_lock_free_queue=False, enable_generic_interface=False, use_telemetry=False, use_telemetry_legacy=False, use_windows_telemetry=False, msvc_toolset=None, windows_sdk_version=None, enable_msvc_static_runtime=False, caller_framework=None, x86=False, arm=False, arm64=False, arm64ec=False, buildasx=False, disable_memleak_checker=True, enable_pix_capture=False, enable_wcos=False, use_gdk=False, gdk_edition='', gdk_platform='Scarlett', use_winml=False, winml_root_namespace_override=None)
2026-10-27T04:40:06.2104402Z     sys.exit(main())
2026-10-27T04:40:06.2104543Z              ^^^^^^
2026-10-27T04:40:06.2104729Z   File "D:\a\nw3rdBuild\nw3rdBuild\tools\ci_build\build.py", line 2759, in main
2026-10-27T04:40:06.2105172Z     build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.targets)
2026-10-27T04:40:06.2105482Z   File "D:\a\nw3rdBuild\nw3rdBuild\tools\ci_build\build.py", line 1536, in build_targets
2026-10-27T04:40:06.2105721Z     run_subprocess(cmd_args, env=env)
2026-10-27T04:40:06.2105942Z   File "D:\a\nw3rdBuild\nw3rdBuild\tools\ci_build\build.py", line 149, in run_subprocess
2026-10-27T04:40:06.2106235Z     return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
2026-10-27T04:40:06.2106482Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2026-10-27T04:40:06.2106713Z   File "D:\a\nw3rdBuild\nw3rdBuild\tools\python\util\run.py", line 50, in run
2026-10-27T04:40:06.2106929Z     completed_process = subprocess.run(
2026-10-27T04:40:06.2107179Z                         ^^^^^^^^^^^^^^^
2026-10-27T04:40:06.2107413Z   File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\subprocess.py", line 571, in run
2026-10-27T04:40:06.2201168Z     raise CalledProcessError(retcode, process.args,
2026-10-27T04:40:06.2201862Z subprocess.CalledProcessError: Command '['C:\\hostedtoolcache\\windows\\Python\\3.12.10\\x64\\Scripts\\cmake.EXE', '--build', './build/windows_x64\\Release', '--config', 'Release', '--target', 'install', '--', '-j4']' returned non-zero exit status 2.
2026-10-27T04:40:06.2478549Z ##[error]Process completed with exit code 1.

Visual Studio Version

2019

GCC / Compiler Version

No response

Activity

  1. added
    platform:windowsissues related to the Windows platform
    platform:mobileissues related to ONNX Runtime mobile; typically submitted using template
    on Oct 27, 2026
  2. changed the title [-][Build] Both 1.31.0 and 1.31.1 failed to Build Windows msvc2019 x64 Release with --cmake_generator "Ninja"[/-] [+][Build] Both 1.31.0 and 1.31.1 failed to Build Windows msvc2019 x64 Release with error C2440 [/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateplatform:mobileissues related to ONNX Runtime mobile; typically submitted using templateplatform:windowsissues related to the Windows platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions