onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

Release version of onnxruntime.dll has a dependency on dbghelp.dll

Open ivanst0 opened this issue 1 year ago • 6 comments

Describe the issue

Release version of onnxruntime.dll has a dependency on dbghelp.dll (using functions SymInitialize, SymFromAddr, SymSetOptions) while this functionality is not needed in a release build. This is a regression, likely caused by #21300 (2024-07-10).

To reproduce

.\build.bat --config RelWithDebInfo --build_shared_lib

dumpbin /imports onnxruntime.dll

Urgency

No response

Platform

Windows

OS Version

Any

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.19

ONNX Runtime API

C++

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

ivanst0 avatar Aug 22 '24 09:08 ivanst0

Thanks for flagging & spotting this -- is the unnecessary dependency causing any performance issues for you or larger package sizes?

carzh avatar Aug 22 '24 17:08 carzh

One of our customers complains that they are not able to load our DLL while using LoadLibraryEx(..., LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR) (our DLL has a dependency on onnxruntime.dll).

ivanst0 avatar Aug 23 '24 08:08 ivanst0

We are waiting on more task but this should be resolved early next week

carzh avatar Aug 23 '24 20:08 carzh

I can confirm 1.18.1 release does not have the issue but the latest one(1.19.0) has it.

snnn avatar Aug 27 '24 21:08 snnn

The commit id 8749fa381eddbbb97a776280fd55e7959a1fc21b seems to be fine.

snnn avatar Aug 29 '24 00:08 snnn

It is because PR #21410.

snnn avatar Aug 29 '24 00:08 snnn

The dep is pulled by abseil's symbolize library.

snnn avatar Aug 29 '24 22:08 snnn

Unfortunately, there is no formal way to disable it: https://github.com/abseil/abseil-cpp/pull/1363

snnn avatar Aug 29 '24 23:08 snnn