microsoft / microsoft/onnxruntime
[Build] Test onnxruntime_shared_lib_dlopen_test failing
@snnn is already working on this.
Since Jun 11, 2025.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
Describe the issue
Building on Windows x64 RelWithDebInfo. Have seen this in CI as well as locally.
Test onnxruntime_shared_lib_dlopen_test was added in https://github.com/microsoft/onnxruntime/pull/24891
Test fails with segfault because version_string becomes invalid after ORT is unloaded. The root cause is The requested API version [23] is not available, only API versions [1, 17] are supported in this build. Current ORT Version is: 1.17.1 because ORT is being loaded from C:\WINDOWS\SYSTEM32\onnxruntime.dll
Urgency
Blocking ingestion of latest ORT main
Target platform
Windows x64
Build script
onnxruntime/tools/ci_build/build.py --config RelWithDebInfo --cmake_path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --ctest_path "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\ctest.exe" --cmake_generator "Visual Studio 17 2022" --build_shared_lib --parallel 32 --build_dir C:\work\onnxruntime\build_x64-cpu --cmake_extra_defines "onnxruntime_USE_NEURAL_SPEED=OFF" --enable_msvc_static_runtime --use_binskim_compliant_compile_flags
Error / output
The requested API version [23] is not available, only API versions [1, 17] are supported in this build. Current ORT Version is: 1.17.1
Visual Studio Version
17.14.3
GCC / Compiler Version
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.