microsoft / onnxruntime-extensions

onnxruntime-extensions: A specialized pre- and post- processing library for ONNX Runtime
MIT License
314 stars 81 forks source link

ONNX Runtime Extensions fails to load on Linux due to missing libssl.so.1.1 #761

Open arthurvb opened 1 month ago

arthurvb commented 1 month ago

When using the NuGet package for ONNX Runtime Extensions on Linux, the application fails to run with the following error:

Microsoft.ML.OnnxRuntime.OnnxRuntimeException: [ErrorCode:NoSuchFile] The ONNX Runtime extensions library was not found. The Microsoft.ML.OnnxRuntime.Extensions NuGet package must be referenced by the project to use 'OrtExtensions.RegisterCustomOps.

Further investigation using export LD_DEBUG=all revealed that the actual error is due to a dependency on libssl.so.1.1:

file=libssl.so.1.1 [0];  needed by  (...) net6.0/any/runtimes/linux-x64/native/libortextensions.so [0]

The target machine has the latest libssl (libssl3.so) installed, but not the specific version required by the ONNX Runtime Extensions library.

Questions:

  1. Is this dependency on libssl.so.1.1 (or libssl in general) necessary?
  2. If so, is it possible to include the required ssl and libcrypto .so files within the NuGet package?

Impact: This issue makes it difficult to install and use onnxruntime-extensions through a NuGet package on Linux machines that don't have the specific libssl.so.1.1 version installed.

Any guidance or solutions would be greatly appreciated.

david-sitsky commented 1 month ago

I did the following as a workaround: https://stackoverflow.com/questions/72133316/libssl-so-1-1-cannot-open-shared-object-file-no-such-file-or-directory/72633324#72633324.