Blake3.NET icon indicating copy to clipboard operation
Blake3.NET copied to clipboard

Unable to run a program with Blake3.NET on CentOS 7

Open SofiaXu opened this issue 2 years ago • 2 comments

Unhandled exception. System.DllNotFoundException: Unable to load shared library 'blake3_dotnet' 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:
/app/bin/Debug/net7.0/runtimes/linux-x64/native/blake3_dotnet.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.13/blake3_dotnet.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net7.0/blake3_dotnet.so: cannot open shared object file: No such file or directory
/lib64/libc.so.6: version `GLIBC_2.28' not found (required by /app/bin/Debug/net7.0/runtimes/linux-x64/native/libblake3_dotnet.so)
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.13/libblake3_dotnet.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net7.0/libblake3_dotnet.so: cannot open shared object file: No such file or directory
/app/bin/Debug/net7.0/runtimes/linux-x64/native/blake3_dotnet: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.13/blake3_dotnet: cannot open shared object file: No such file or directory
/app/bin/Debug/net7.0/blake3_dotnet: cannot open shared object file: No such file or directory
/app/bin/Debug/net7.0/runtimes/linux-x64/native/libblake3_dotnet: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.13/libblake3_dotnet: cannot open shared object file: No such file or directory
/app/bin/Debug/net7.0/libblake3_dotnet: cannot open shared object file: No such file or directory

   at Blake3.Hasher.Hash(ReadOnlySpan`1 input)
   at Program.<Main>$(String[] args) in /app/Program.cs:line 3

I have built an asp.net core program with your Blake3.NET already and it work well on Ubuntu 22. But our costumers' machines are use CentOS 7. I noted that glibc used in Blake3.NET is higher than CentOS 7 and I also find issue #21. Some of my colleagues are Rust developers. They said that you could fix it by changing the compile target to x86_64-unknown-linux-musl. Is there any plan to change target to x86_64-unknown-linux-musl?

SofiaXu avatar Nov 13 '23 16:11 SofiaXu

Some of my colleagues are Rust developers. They said that you could fix it by changing the compile target to x86_64-unknown-linux-musl. Is there any plan to change target to x86_64-unknown-linux-musl?

When I tried to use it, I got

info: component 'rust-std' for target 'x86_64-unknown-linux-musl' is up to date
    Updating crates.io index
error: cannot produce cdylib for `blake3_dotnet v0.3.0 (/home/xoofx/code/Blake3.NET/lib/blake3_dotnet)` as the target `x86_64-unknown-linux-musl` does not support these crate types

Don't have time to investigate this myself but the help from someone more familiar with Rust/musl setup would be welcome.

xoofx avatar Mar 02 '24 16:03 xoofx