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

LibraryLoader: Try p/invoking to libdl.so.2 before libdl.so on Linux #2010

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Apr 22, 2022

Newer Linux distributions (like Ubuntu 21.04) no longer ship with libdl.so, instead they have libdl.so.2
Try loading the newer lib first to fix issues like dotnet/maui#6385

Ideally we'd be using the NativeLibrary.Load API but we target netstandard2.0 here so we can't do that.

Newer Linux distributions (like Ubuntu 21.04) no longer ship with libdl.so, instead they have libdl.so.2
Try loading the newer lib first to fix issues like dotnet/maui#6385
@akoeplinger akoeplinger requested a review from mattleibow April 22, 2022 18:19
@mattleibow mattleibow merged commit 97b9110 into main Apr 26, 2022
@mattleibow mattleibow deleted the fix-libdl branch April 26, 2022 12:37
Methuselah96 added a commit to Methuselah96/tesseract that referenced this pull request Apr 9, 2024
Newer versions of Linux (e.g., >= Ubuntu 22.04) have replaced libdl.so with libdl.so.2, which causes exceptions when trying to use this library on Linux. This fixes the situation by trying to use libdl.so.2 first, and then falling back to libdl.so if necessary. The approach was inspired by mono/SkiaSharp#2010.
Methuselah96 added a commit to Methuselah96/tesseract that referenced this pull request Apr 15, 2024
Newer versions of Linux (e.g., >= Ubuntu 22.04) have replaced libdl.so with libdl.so.2, which causes exceptions when trying to use this library on Linux. This fixes the situation by trying to use libdl.so.2 first, and then falling back to libdl.so if necessary. The approach was inspired by mono/SkiaSharp#2010.
rkm pushed a commit to SMI/tesseract that referenced this pull request Jul 17, 2024
Newer versions of Linux (e.g., >= Ubuntu 22.04) have replaced libdl.so with libdl.so.2, which causes exceptions when trying to use this library on Linux. This fixes the situation by trying to use libdl.so.2 first, and then falling back to libdl.so if necessary. The approach was inspired by mono/SkiaSharp#2010.
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

Successfully merging this pull request may close these issues.

2 participants