Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libonnxruntime.so: version `VERS_1.17.1' not found #1771

Open
ZhenyaPav opened this issue Jan 27, 2025 · 6 comments
Open

libonnxruntime.so: version `VERS_1.17.1' not found #1771

ZhenyaPav opened this issue Jan 27, 2025 · 6 comments

Comments

@ZhenyaPav
Copy link

System.DllNotFoundException: Unable to load shared library '/home/zhenyapav/Projects/test/data_AI_Desktop_Companion_linuxbsd_x86_64/libsherpa-onnx-c-api.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/home/zhenyapav/Projects/test/data_AI_Desktop_Companion_linuxbsd_x86_64/libonnxruntime.so: version `VERS_1.17.1' not found (required by /home/zhenyapav/Projects/test/data_AI_Desktop_Companion_linuxbsd_x86_64/libsherpa-onnx-c-api.so)

   at System.Runtime.InteropServices.NativeLibrary.<LoadFromPath>g____PInvoke|1_0(UInt16* __libraryName_native, Int32 __throwOnError_native)
   at System.Runtime.InteropServices.NativeLibrary.<LoadFromPath>g____PInvoke|1_0(UInt16* __libraryName_native, Int32 __throwOnError_native)
   at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath)
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext)
   at SherpaOnnx.OfflineTts.SherpaOnnxDestroyOfflineTts(IntPtr handle)
   at SherpaOnnx.OfflineTts.SherpaOnnxDestroyOfflineTts(IntPtr handle)
   at SherpaOnnx.OfflineTts.Cleanup()
   at SherpaOnnx.OfflineTts.Finalize()
   at System.GC.RunFinalizers()

I get this error when trying to use MeloTTS in C#. Possibly related to #1081

@ZhenyaPav
Copy link
Author

I should also point out that the same project works on Windows, seems to be a Linux-only issue.
csproj:

<Project Sdk="Godot.NET.Sdk/4.3.0">
  <PropertyGroup>
    <TargetFramework>net9.0</TargetFramework>
    <EnableDynamicLoading>true</EnableDynamicLoading>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="FFMpegCore" Version="5.1.0" />
    <PackageReference Include="OpenAI" Version="2.0.0" />
    <PackageReference Include="SharpCompress" Version="0.38.0" />
    <PackageReference Include="Tiktoken" Version="2.2.0" />
    <PackageReference Include="Whisper.net.Runtime.Vulkan" Version="1.7.4" />
    <PackageReference Include="Whisper.net.Runtime" Version="1.7.4" />
    <PackageReference Include="Whisper.net.Runtime.NoAvx" Version="1.7.4" />
    <PackageReference Include="Whisper.net" Version="1.7.4" />
    <PackageReference Include="EchoSharp" Version="0.1.0" />
    <PackageReference Include="EchoSharp.Onnx.Sherpa" Version="0.1.0" />
    <PackageReference Include="EchoSharp.Onnx.SileroVad" Version="0.1.0" />
    <PackageReference Include="EchoSharp.Whisper.net" Version="0.1.0" />
    <PackageReference Include="NAudio.Core" Version="2.2.1" />
    <PackageReference Include="org.k2fsa.sherpa.onnx" Version="*" />
  </ItemGroup>
</Project>

@csukuangfj
Copy link
Collaborator

Are you able to run our dotnet example projects?

@ZhenyaPav
Copy link
Author

Hello @csukuangfj. Yes, I was able to run kokoro-tts example. The issue seems to be caused by EchoSharp.Onnx.Sherpa package, which depends on Microsoft.ML.OnnxRuntime >= 1.20.0

@csukuangfj
Copy link
Collaborator

@ZhenyaPav

Please follow
#1719
to build sherpa-onnx using the same onnxruntime version as EchoSharp.Onnx.Sherpa.

@ZhenyaPav
Copy link
Author

Built the library for onnx runtime 1.20, this fixed the error.

@csukuangfj
Copy link
Collaborator

Note that not all.models from sherpa-onnx work for onnxruntime 1.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants