-
Notifications
You must be signed in to change notification settings - Fork 2
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
/usr/lib64/libdl.so.2, but no libdl.so #1
Comments
Thanks for trying my library and testing it out. As a quick fix, I will separate Linux code and macOS. The issue turns out quite complicated due to the fragmentation of linux userspace library location and naming. Originally I have used Solutions(Fastest) Separate Linux/macOS from shared POSIX codeCopy and paste Pros: Fastest way to solve. Use .Net Core's NativeLibrary class.Net Core 3.0 offers the new class, NativeLibrary, which solves this problem entirely. I have considered using it but was unable to. The API does not exist in .Net Standard, and shipping .Net Core assembly directly and keeping its forward-compatibility is hard. Zstandard.Net have similar pull request. I will review their code. Pros: Now the .Net Core runtime is responsible for exposing native library loading functionality. We can expect that Microsoft will take care of such fragmentation things. Study how .Net Core runtime solved it.Net Core team must have faced similar problems while implementing |
Some Linux distributions do not have libdl.so, only having libdl.so.2. In the contrast, macOS only has libdl.dylib, as described in #1. To solve the issue, split Linux and macOS libdl DllImport.
I patched the If you would, please clone the develop branch and run the test ( |
The updated package was uploaded to NuGet. It should work on CentOS, please try it. |
Thanks for the update! Compression.XZ is still referencing DynLoader 1.2.0, so I had to force to use the latest 1.2.1. After adding the PackageReference DybLoader 1.2.1 to the Compression.XZ.Test the test passed on CentOS 7. |
Yes, I also am working on other libraries which depends on Joveler.DynLoader. |
Joveler.Compression.XZ and its siblings were updated to reference |
This should fix builds on ubuntu-22.04. - see https://stackoverflow.com/a/75855054 - see ied206/Joveler.DynLoader#1 for other dotnet library with the same issue
This should fix builds on ubuntu-22.04. - see https://stackoverflow.com/a/75855054 - see ied206/Joveler.DynLoader#1 for other dotnet library with the same issue
This should fix builds on ubuntu-22.04. - see https://stackoverflow.com/a/75855054 - see ied206/Joveler.DynLoader#1 for other dotnet library with the same issue
In CentOS 7 /usr/lib64/libdl.so.2 exists, but not libdl.so. To resolve the issue, I created a symlink to /usr/lib64/libdl.so.2 as /usr/lib64/libdl.so.
Is there a better way to solve this, maybe addig libdl.so.2 to the Posix NativeMethods module?
Thanks!
The text was updated successfully, but these errors were encountered: