Installation Issue in OCR for C++ on linux

I’m encountering a linking error when compiling my project with g++ , involving ONNX Runtime and Aspose OCR. Despite having libonnxruntime.so.1.12.0 in my lib/x64 directory, libasposeocr.so requires libonnxruntime.so.1.12.1 , leading to undefined references (OrtGetApiBase@VERS_1.12.1 , OrtSessionOptionsAppendExecutionProvider_CUDA@VERS_1.12.1 ). My symbolic link libonnxruntime.so correctly points to libonnxruntime.so.1.12.0 , but it seems I need libonnxruntime.so.1.12.1 for compatibility. How can I resolve this version mismatch and ensure successful linking?

Also please guide me for what would be the right way to install onnruntime for C++ for linux? Currently due to issues, I am directly using the uncompiled .tar from the official repo but they dont have a specific version for 1.12.1.

Any and help would be appreciated, Thanks!

@Gautam1

Please allow us to investigate the scenario accordingly and we will be sharing our feedback with you soon.

@asad.ali

Sure thanks a lot, please let me know anything and everything I need to provide in order to help. Thanks again.

@Gautam1

With an initial investigation, looks like there is a mistake in linking liboonnxruntime.

Versions mismatch is not being resolved, because
OrtSessionOptionsAppendExecutionProvider_CUDA@VERS_1.12.1 is not equivalent to
OrtSessionOptionsAppendExecutionProvider_CUDA@VERS_1.12.0

We will further let you know after more investigation.

I couldnt find the appropriate version of liboonnxruntime (1.12.1), could you guide from where are we expected to setup the libonnxruntime in the context of linux systems and C++?

@Gautam1

  1. Build 1.12.1 from source by tag: This means you can compile version 1.12.1 of ONNX Runtime directly from its source code repository using a specific tag (likely version 1.12.1). It’s suggested that this method is relatively fast, and there’s likely a guide available to help you through the process.
  2. Download from NuGet package: Alternatively, you can download version 1.12.1 of ONNX Runtime from the NuGet package manager. The provided link directs you to the NuGet package page for Microsoft.ML.OnnxRuntime version 1.12.1. If you encounter an error related to NuGet, the message suggests creating a symbolic link named libonnxruntime.so that points to libonnxruntime.so.1.12.1.

Creating this symbolic link can help resolve any dependency issues related to the version of libonnxruntime.so required by your application. This approach ensures that the correct version is referenced when your application attempts to load libonnxruntime.so.