Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Compiler error when building ONNXRuntime: undeclared identifier STRSAFE_PCNZCH #22158

Closed
marovira opened this issue Sep 19, 2024 · 10 comments
Labels
documentation improvements or additions to documentation; typically submitted using template

Comments

@marovira
Copy link
Contributor

Describe the issue

When building ONNXRuntime, I get a series of compiler errors saying that STRSAFE_PCNZCH, and STRSAFE_LPSTR are not defined. The issue is reproducible in Windows 11 Enterprise, though I am unable to reproduce it in Windows 11 Pro.

The compiler error appears in Windows 11 Enterprise regardless of the environment in which it is launched. I can reliably reproduce it in any of the following:

  • Regular command prompt
  • Developer Command Prompt for VS 2022
  • x64 Native Tools Command Prompt for VS 2022

In Windows 11 Pro, I am able to compile with any of the aforementioned prompts.

Note 1: I'm unsure if this is specific to Windows 11 Enterprise, but that is the only OS where I can reproduce this consistently.
Note 2: The build script below is using the latest version of ONNXRuntime (1.19.2) but I can reproduce this as far back as 1.16.3, so the issue is not new.

Urgency

This is blocking me from completing an automated build system necessary for CI scripts.

Target platform

Windows 11 Enterprise

Build script

@echo off

git clone "https://github.com/microsoft/onnxruntime.git" onnxruntime --branch v1.19.2 --recurse-submodules
cd onnxruntime
.\build.bat --config Release --build_shared_lib --parallel --skip_submodule_sync

Error / output

Relevant output:

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2093,74): error C2065: 'STRSAFE_PCNZCH': undeclared identifier [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2093,89): error C2146: syntax error: missing ')' before identifier 'psz' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2094,9): error C2143: syntax error: missing ';' before '{' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2094,9): error C2447: '{': missing function header (old-style formal list?) [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2121,83): error C2065: 'STRSAFE_PCNZCH': undeclared identifier [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2121,98): error C2146: syntax error: missing ')' before identifier 'psz' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2122,9): error C2143: syntax error: missing ';' before '{' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2122,9): error C2447: '{': missing function header (old-style formal list?) [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2140,125): error C2065: 'STRSAFE_PCNZCH': undeclared identifier [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2140,158): error C2275: 'size_t': expected an expression instead of a type [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2140,165): error C2146: syntax error: missing ')' before identifier 'cchDest' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2141,9): error C2143: syntax error: missing ';' before '{' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2141,9): error C2447: '{': missing function header (old-style formal list?) [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2150,92): error C2065: 'STRSAFE_LPSTR': undeclared identifier [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2150,106): error C2146: syntax error: missing ')' before identifier 'pszDest' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2151,9): error C2143: syntax error: missing ';' before '{' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2151,9): error C2447: '{': missing function header (old-style formal list?) [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2202,85): error C2065: 'STRSAFE_LPSTR': undeclared identifier [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2202,99): error C2146: syntax error: missing ')' before identifier 'pszDest' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2203,9): error C2143: syntax error: missing ';' before '{' [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2203,9): error C2447: '{': missing function header (old-style formal list?) [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2258,156): error C2064: term does not evaluate to a function taking 3 arguments [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

E:\onnxruntime\build\Windows\Release\_deps\microsoft_wil-src\include\wil\result_macros.h(2649,31): error C2064: term does not evaluate to a function taking 4 arguments [E:\onnxruntime\build\Windows\Release\onnxruntime_common.vcxproj]
  (compiling source file '../../../../../../onnxruntime/core/platform/windows/env.cc')

Full output is available here

Visual Studio Version

Visual Studio Enterprise 2022 17.11.4

GCC / Compiler Version

No response

@marovira marovira added the build build issues; typically submitted using template label Sep 19, 2024
@satyajandhyala
Copy link
Contributor

@marovira you say "In Windows 11 Pro, I am able to compile with any of the aforementioned prompts."
Are you saying that you are NOT able to compile. I seems it is something in your environment causing the error. Can you attach the output of env command?

@marovira
Copy link
Contributor Author

@marovira you say "In Windows 11 Pro, I am able to compile with any of the aforementioned prompts."
Are you saying that you are NOT able to compile. I seems it is something in your environment causing the error. Can you attach the output of env command?

Just to clarify:

  • In Windows 11 Enterprise, I am unable to compile regardless of the prompt used.
  • I Windows 11 Pro, I am able to compile regardless of the prompt used.

I will send the env output tomorrow. Do you want me to send it for a particular prompt? If so, which one(s)?

@satyajandhyala
Copy link
Contributor

Please send it from x64 Native Tools Command Prompt for VS 2022.

@marovira
Copy link
Contributor Author

Here's the output for env on the x64 Native Tools Command Prompt for VS 2022:

C:\Program Files\Microsoft Visual Studio\2022\Enterprise>env
!C:=C:\Program Files\Microsoft Visual Studio\2022\Enterprise
!ExitCode=00000000
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\mauriciogalvez\AppData\Roaming
CommandPromptType=Native
COMMONPROGRAMFILES=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=MAURICIO-PC
COMSPEC=C:\Windows\system32\cmd.exe
DevEnvDir=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\
DriverData=C:\Windows\System32\Drivers\DriverData
DXSDK_DIR=C:\Program Files (x86)\Microsoft DirectX 9.0 SDK (October 2005)\
EFC_150940=1
ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
EXTERNAL_INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
Framework40Version=v4.0
FrameworkDir=C:\Windows\Microsoft.NET\Framework64\
FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\
FrameworkVersion=v4.0.30319
FrameworkVersion64=v4.0.30319
FSHARPINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools
HOMEDRIVE=C:
HOMEPATH=\Users\mauriciogalvez
HTMLHelpDir=C:\Program Files (x86)\HTML Help Workshop
INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um
LIB=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.20348.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.20348.0\\um\x64
LIBCLANG_PATH=C:\Users\mauriciogalvez\scoop\apps\llvm\current\bin
LIBPATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.20348.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.20348.0;C:\Windows\Microsoft.NET\Framework64\v4.0.30319
LLVM_LIB_DIR=C:\Users\mauriciogalvez\scoop\apps\llvm\current\lib
LOCALAPPDATA=C:\Users\mauriciogalvez\AppData\Local
NEOVIDE_FORK=1
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\
NUMBER_OF_PROCESSORS=24
OneDrive=C:\Users\mauriciogalvez\OneDrive
OneDriveCommercial=C:\Users\mauriciogalvez\OneDrive
OS=Windows_NT
PAI_MODEL_DIR=C:\ProgramData\Topaz Labs LLC\Topaz Photo AI\models
PATH=/c/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/VC/VCPackages:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/bin/Roslyn:/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64:/c/Program Files (x86)/HTML Help Workshop:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Team Tools/DiagnosticsHub/Collector:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/Extensions/Microsoft/CodeCoverage.Console:/c/Program Files (x86)/Windows Kits/10/bin/10.0.20348.0/x64:/c/Program Files (x86)/Windows Kits/10/bin/x64:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/amd64:/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/Tools:/c/Program Files (x86)/Microsoft DirectX 9.0 SDK (October 2005)/Utilities/Bin/x86:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files/Microsoft SQL Server/150/Tools/Binn:/c/Program Files (x86)/Seapine/TestTrack:/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/c/Program Files/dotnet:/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/c/Program Files/Perforce:/cmd:/mingw64/bin:/usr/bin:/c/Users/mauriciogalvez/scoop/apps/vulkan/current/Bin:/c/Users/mauriciogalvez/scoop/apps/vulkan/current/Tools:/c/Users/mauriciogalvez/scoop/apps/python/current/Scripts:/c/Users/mauriciogalvez/scoop/apps/python/current:/c/Users/mauriciogalvez/scoop/apps/python310/current/Scripts:/c/Users/mauriciogalvez/scoop/apps/python310/current:/c/Users/mauriciogalvez/scoop/apps/miktex/current/texmfs/install/miktex/bin/x64:/c/Users/mauriciogalvez/scoop/apps/nodejs/current/bin:/c/Users/mauriciogalvez/scoop/apps/nodejs/current:/c/Users/mauriciogalvez/scoop/apps/llvm/current/bin:/c/Users/mauriciogalvez/scoop/shims:/c/Users/mauriciogalvez/AppData/Local/Microsoft/WindowsApps:/c/Users/mauriciogalvez/AppData/Local/Pandoc:/cmd:/mingw64/bin:/usr/bin:/c/Users/mauriciogalvez/AppData/Local/SumatraPDF:/c/Program Files/kryptex/bin:/c/Program Files/lua/bin:/c/VulkanSDK/1.3.268.0/Bin:/c/Users/mauriciogalvez/.dotnet/tools:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja:/c/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/VC/Linux/bin/ConnectionManagerExe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Platform=x64
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD
PROCESSOR_LEVEL=25
PROCESSOR_REVISION=6102
ProgramData=C:\ProgramData
PROGRAMFILES=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SYSTEMDRIVE=C:
SYSTEMROOT=C:\Windows
TEMP=/tmp
TMP=/tmp
TTPRO_APPDIR=C:\Program Files (x86)\Seapine\TestTrack
UCRTVersion=10.0.20348.0
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
USERNAME=mauriciogalvez
USERPROFILE=C:\Users\mauriciogalvez
VCIDEInstallDir=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\VC\
VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\
VCToolsInstallDir=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.41.34120\
VCToolsRedistDir=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.40.33807\
VCToolsVersion=14.41.34120
VisualStudioVersion=17.0
VK_SDK_PATH=C:\Users\mauriciogalvez\scoop\apps\vulkan\current
VS170COMNTOOLS=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x64
VSCMD_ARG_TGT_ARCH=x64
VSCMD_VER=17.11.4
VSIDEPATH2022=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\
VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
VULKAN_SDK=C:\Users\mauriciogalvez\scoop\apps\vulkan\current
WINDIR=C:\Windows
WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.20348.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.20348.0
WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
WindowsSDKLibVersion=10.0.20348.0\
WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.20348.0\
WindowsSDKVersion=10.0.20348.0\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\
XDG_CONFIG_HOME=C:\Users\mauriciogalvez\AppData\Local
__DOTNET_ADD_64BIT=1
__DOTNET_PREFERRED_BITNESS=64
__VSCMD_PREINIT_PATH=C:\Program Files (x86)\Microsoft DirectX 9.0 SDK (October 2005)\Utilities\Bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\Seapine\TestTrack;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Perforce\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\mauriciogalvez\scoop\apps\vulkan\current\Bin;C:\Users\mauriciogalvez\scoop\apps\vulkan\current\Tools;C:\Users\mauriciogalvez\scoop\apps\python\current\Scripts;C:\Users\mauriciogalvez\scoop\apps\python\current;C:\Users\mauriciogalvez\scoop\apps\python310\current\Scripts;C:\Users\mauriciogalvez\scoop\apps\python310\current;C:\Users\mauriciogalvez\scoop\apps\miktex\current\texmfs\install\miktex\bin\x64;C:\Users\mauriciogalvez\scoop\apps\nodejs\current\bin;C:\Users\mauriciogalvez\scoop\apps\nodejs\current;C:\Users\mauriciogalvez\scoop\apps\llvm\current\bin;C:\Users\mauriciogalvez\scoop\shims;C:\Users\mauriciogalvez\AppData\Local\Microsoft\WindowsApps;C:\Users\mauriciogalvez\AppData\Local\Pandoc\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\mauriciogalvez\AppData\Local\SumatraPDF\;C:\Program Files\kryptex\bin;C:\Program Files\lua\bin;C:\VulkanSDK\1.3.268.0\Bin;C:\Users\mauriciogalvez\.dotnet\tools
TERM=xterm-256color
HOME=/c/Users/mauriciogalvez

@marovira
Copy link
Contributor Author

@satyajandhyala did you get a chance to see the output?

@marovira
Copy link
Contributor Author

marovira commented Oct 8, 2024

Any updates on this issue?

@snnn
Copy link
Member

snnn commented Oct 22, 2024

I think it might to relevant to the Windows SDK version you are using. The log you posted has the following information:

-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.22631.

Could you please compare it in the two different builds, the passed one and the failed one, to see if there is any difference. I suggest using the newest Windows SDK.

@marovira
Copy link
Contributor Author

I think it might to relevant to the Windows SDK version you are using. The log you posted has the following information:

-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.22631.

Could you please compare it in the two different builds, the passed one and the failed one, to see if there is any difference. I suggest using the newest Windows SDK.

I have verified it, and it is indeed a problem caused by the Windows SDK version. It appears that the version of WIL used by ONNXRuntime is incompatible with older versions of the Windows SDK.

As a side note, I searched through the official documentation from ONNXRuntime regarding this and I couldn't find any mentions of a minimum Windows SDK version. Perhaps it would be worth adding it?

@snnn
Copy link
Member

snnn commented Oct 22, 2024

We recommend using the most recent Windows SDK. I am not sure what the minimum version that works. Sorry I did not test it that much.

@snnn snnn added documentation improvements or additions to documentation; typically submitted using template and removed build build issues; typically submitted using template waiting-for-customer labels Oct 22, 2024
@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
@marovira
Copy link
Contributor Author

That's fair. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation improvements or additions to documentation; typically submitted using template
Projects
None yet
Development

No branches or pull requests

3 participants