-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unable to use any OnnxRuntime packages >1.7 with CMake #11230
Comments
Sorry I can't reproduce the problem. Very likely you loaded a wrong onnxruntime.dll (just my guessing). To debug it. I recommend using windbg and enable loader snaps. Here is one example: #4009 (comment) When you get it enabled, you will see where onnxruntime.dll was loaded from. Please check the path. Is it the one which was just downloaded by cmake? I suspect on that. |
Thank you for helping with this. I setup the CMake dependency using FetchDeclareContent automatically and the links are from the github relelase. Here's the line where this is done. https://github.com/aravindyeduvaka/OnnxCMake/blob/77b85611098dd27cff01da96e039bd637634f9b3/CMakeLists.txt#L16 |
Have you tried windbg? |
I am also getting this. I downloaded version 1.11 of the GPU runtime from https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.gpu and linked against
|
That's the problem. |
For more information, please read: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order The Standard Search Order for Desktop Applications starts with the directory from which the application loaded. i.e. where your main executable(*.exe) lives. So, please copy onnxruntime.dll there. |
Do not load System32 copy of |
I am not an expert in dotnet or CPP but here is what solved the problem - I installed Visual C++ runtime for x64 (Server was Xeon running Windows 2016 server 64 bit) solved the problem for me |
@snnn, we are hitting a similar issue now. It's certainly not OK to have a system library to print something if loaded, but not used. Are you going to fix that? |
@smaslov-intel, I'm looking into it. |
This issue is exactly about what is wrong: the system's onnxruntime.dll is printing out the
Please also consider renaming the system's version to something else than onnxruntime.dll since many users are going to be affected by this due to obscure DLL search rules in Windows. |
same problem on Linux!!! |
@wenkaiH Hi,have you solved it? |
@wenkaiH , which Linux version do you have? Do you have multiple libonnxruntime.so in your system? |
any movement on this?
any movement on this? I'm using 1.17.1 and facing same problem. |
@ShubhamSaini01 Copying the right DLL to your binary location should fix the problem. I have an xmake project using 1.17.1 and I was facing this issue and all I had to do was to setup a small post-build step to copy the files over. Like so:
|
Describe the bug
I am using the prebuilt binaries from Github release to setup OnnxRuntime with a CMake Project. However, I am unable to use any version higher than 7. I get the following error:
"The given version [8] is not supported, only version 1 to 7 is supported in this build="
Same with any other releases including 9,10 and 11.
System information
To Reproduce
Describe steps/code to reproduce the behavior.
(I setup a very bare bones CMake project that repros this issues. https://github.com/aravindyeduvaka/OnnxCMake )
Setup a new CMake Projects that downloads the prebuilt binary and links it to the target executable.
When running the project, it throws an error complaining about the version
"The given version [10] is not supported, only version 1 to 7 is supported in this build"
The sample does work with version 7 so something changed between 7 and 8 that is not supported for CMake projects
Attach the ONNX model to the issue (where applicable) to expedite investigation.
This error is thrown when creating the environment so the actual model that we are loading is irrelevant.
Expected behavior
I would expect this should work since its a very basic setup with prebuilt binaries. Is the support for CMake discontinued since version 8?
The text was updated successfully, but these errors were encountered: