microsoft / microsoft/onnxruntime

[Build] Test onnxruntime_shared_lib_dlopen_test failing

Open
#25,030 3 comments 0 reactions 1 assignee View on GitHub

@snnn is already working on this.

Since Jun 11, 2025.

build
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.