Open chenfucn opened 1 year ago
We don't support Visual Studio 17.
@pranavsharma - we also use VS 2022 in WindowsAI builds. So this may hit us too after pulling these changes in. Changming clarified below that building with ARM64 VS on ARM64 machines is not supported. Building ARM64 target DLL's on x64 machines is still supported.
Let me clarify it a bit: @chenfucn wants to build ORT code on a Windows ARM64 machine. It is not a typical usage. Our build.py script does not support it well. Arm64 Visual Studio is only a thing since 3 months ago. And at this moment I do not have bandwidth to update all our pipelines to use VS 2022. I really want to see it happening but I need to prioritize the tasks for the upcoming ONNX Runtime release.
Our build.py need to determine if it is doing a cross-compiling build before started to build protoc separately. Previously if we see the target CPU arch is ARM or ARM64 then we are pretty sure on that, because Visual Studio only supported Intel CPUs and we only ran VS on Intel CPUs. Now the situation is changed. That's why you see more problems coming out.
Describe the issue
After https://github.com/microsoft/onnxruntime/pull/15190 merged. Windows ARM64 build fail with build command:
Error message
Tried to mitigate the issue with provided script, still fails on Windows ARM64 machine:
Urgency
Now ARM64 development is fully blocked. Need to be solved ASAP.
Target platform
Windows ARM64
Build script
.\build.bat --config RelWithDebInfo --skip_tests --parallel --cmake_generator "Visual Studio 17 2022"
Error / output
PS > .\tools\ci_build\github\windows\install_protoc.ps1 ONNX Runtime src root: .\source\repos\onnxruntime
Mode LastWriteTime Length Name
d----- 3/28/2023 9:57 AM onnxruntime /MP /guard:cf /Qspectre /DWIN32 /D_WINDOWS /DWINVER=0x0601 /D_WIN32_WINNT=0x0601 /DNTDDI_VERSION=0x06010000 /W3 /Zi /O2 /Ob1 /DNDEBUG /Gw /GL Downloading protobuf from https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.20.2.zip TempToolPath=C:\temp\v3.20.2.zip Extracting 'C:\temp\v3.20.2.zip' to 'C:\temp\protobuf' Install-Protobuf : The term 'C:\Program Files\Git\usr\bin\patch.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At .\source\repos\onnxruntime\tools\ci_build\github\windows\install_protoc.ps1:76 char:1
Visual Studio Version
2022
GCC / Compiler Version
No response