Skip to content
New issue

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

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

Already on GitHub? # to your account

[Build] api-ms-win-core-heap-l2-1-0.dll missing on windows server 2012 R2 #15025

Open
sinall opened this issue Mar 13, 2023 · 12 comments
Open

[Build] api-ms-win-core-heap-l2-1-0.dll missing on windows server 2012 R2 #15025

sinall opened this issue Mar 13, 2023 · 12 comments
Labels
build build issues; typically submitted using template platform:windows issues related to the Windows platform

Comments

@sinall
Copy link

sinall commented Mar 13, 2023

Describe the issue

api-ms-win-core-heap-l2-1-0.dll missing on windows server 2012

微信截图_20230313235431

Urgency

No response

Target platform

windows server 2012

Build script

N/A

Error / output

api-ms-win-core-heap-l2-1-0.dll missing on windows server 2012

Visual Studio Version

2019

GCC / Compiler Version

No response

@sinall sinall added the build build issues; typically submitted using template label Mar 13, 2023
@github-actions github-actions bot added the platform:windows issues related to the Windows platform label Mar 13, 2023
@skottmckay
Copy link
Contributor

Not clear how this is related to onnxruntime. Can you please elaborate?

@sinall
Copy link
Author

sinall commented Mar 14, 2023

Not clear how this is related to onnxruntime. Can you please elaborate?

onnxruntime.dll depends on this api-ms-win-core-heap-l2-1-0.dll.
微信截图_20230314123520

@skottmckay
Copy link
Contributor

skottmckay commented Mar 14, 2023

Where did you get the onnxruntime dll from and what version is it?

api-ms-win-core-heap-l2-1-0.dll is a low-level windows library. You may need to install a Visual C++ Redistributable package such as

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

@sinall
Copy link
Author

sinall commented Mar 14, 2023

Where did you get the onnxruntime dll from and what version is it?

api-ms-win-core-heap-l2-1-0.dll is a low-level windows library. You may need to install a Visual C++ Redistributable package such as

https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170

1.14.1 from Nuget. I have already installed the latest vcredist (The screenshot on the original thread shows it is installed)

@skottmckay
Copy link
Contributor

The onnxruntime binary was built with Visual Studio 2019 and the dll in question comes from a Windows 'api set' which isn't something we distribute directly. It's just a lightweight redirection dll to point to a function in kernelbase.dll and I'm not sure how to get that particular version onto a Windows Server 2012 machine if installing the VC++ redist package wasn't enough.

Might be worth trying building directly to see if that changes the dependencies. https://onnxruntime.ai/docs/build/inferencing.html#windows

@sinall
Copy link
Author

sinall commented Mar 20, 2023

I tried to download lots of api-ms-win-core-heap-l2-1-0-dll from internet, none of them works.

I found this article:
error api-ms-win-core-heap-l2-1-0.dll is missing from your computer when saving pdf in Acrobat Reader RC

The weird thing is that I tried to search my local computer on which my app works, I still can not find that dll file under C:\Windows\SysWOW64. I only found api-ms-win-core-heap-l1-1-0.dll.

Some related links:
APIs present on all Windows 10 devices

I don't know if other people needs to deploy their apps on Windows earlier than Windows-10. I guess technically onnxruntime could use LoadLibrary against LocalFree function to avoid this problem.

@fdwr
Copy link
Contributor

fdwr commented Mar 20, 2023

🤔 According to https://github.com/microsoft/onnxruntime/releases/tag/v1.13.1, "Support for Windows 7+ Desktop versions (including Windows servers) will be retained by building ONNX Runtime from source". So ORT should be able to run on Windows Server 2012 R2 too, if built locally. However, I don't know what command line switches must be passed to the build to configure it correctly. (I'd be interested to know though, because I have a personal ORT-based app I want to run on Win7 too)

@sinall
Copy link
Author

sinall commented Mar 21, 2023

🤔 According to https://github.com/microsoft/onnxruntime/releases/tag/v1.13.1, "Support for Windows 7+ Desktop versions (including Windows servers) will be retained by building ONNX Runtime from source". So ORT should be able to run on Windows Server 2012 R2 too, if built locally. However, I don't know what command line switches must be passed to the build to configure it correctly. (I'd be interested to know though, because I have a personal ORT-based app I want to run on Win7 too)

I guess we have to build it from source for this moment. It is not available in conan-index, otherwise we could use conan:(

@sinall
Copy link
Author

sinall commented Mar 22, 2023

@skottmckay @fdwr "Windows builds are not compatible with Windows 8.x in this release. Please use v1.11 for now." great news, I looked dependency walker with onnxruntime.dll v1.11.1, it seems it doesn't depends on api-ms-win-core-heap-l2-1-0.dll.

@yuanrui
Copy link

yuanrui commented Jun 28, 2023

@sinall Help, do you try on win server 2012 onnxruntime support last version is v1.11.1?

@2934036269
Copy link

这个问题我研究了好几天,终于解决了!!我现在将这个文件分享出来。。
链接:https://pan.baidu.com/s/1IJn7BkH1CWX8ghg09LZxyw?pwd=v5te
提取码:v5te
--来自百度网盘超级会员V5的分享

@hawkhai
Copy link

hawkhai commented Dec 13, 2024

You can implement it yourself to support Windows 7. The issue is resolved here:
可以自己实现,以支持 win7,这里解决了:https://github.com/yycmagic/onnxruntime-for-win7

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
build build issues; typically submitted using template platform:windows issues related to the Windows platform
Projects
None yet
Development

No branches or pull requests

6 participants