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

loading the native libraries from standard lib repository like/usr/lib in Linux #20462

Closed
IAmJustAQuestion opened this issue Mar 30, 2020 · 3 comments

Comments

@IAmJustAQuestion
Copy link

in Linux:
the efcore and Microsoft.Data.Sqlite use native library libe_sqlite.so.
it looks for it in a specific predefined path: "runtimes/linux-x64/native/libe_sqlite3.so" relative to its folder.
which results in multiple libe_sqlite.so files in a single application.
I want to put the native file in linux standard system lib repository like /usr/lib.
I also have PATH and LD_LIBRARY_PATH environmental variables configured.
but still the program looks for the native lib in each own relative path.

Is it possible for the Microsoft.Data.Sqlite and efcore to look in /usr/lib for the native file or at least search in the path defined in environmental variables for the libe_sqlite3.so ?

I couldn't find any specific dllimport in the code for this library.
I understand that the current way exist to support different operating system, but i only need linux64.

Thank you in advance.

@ajcvickers
Copy link
Member

@ericsink Is this something you have guidance on?
/cc @bricelam

@ericsink
Copy link

SQLitePCLRaw can use the "system SQLite" by using "provider.sqlite3". I believe this would do what @IAmJustAQuestion is looking for, referencing whatever SQLite library is provided by the Linux distro.

Using a special provider instead of a bundle package is a bit of extra work, but quite doable.

However, for this particular case, the bad news is that I am not currently publishing a package for provider.sqlite3. The provider is built but never published by itself. @bricelam has already pointed this out at ericsink/SQLitePCL.raw#325 , the priority of which just went up a notch.

@ajcvickers
Copy link
Member

Thanks @ericsink! Closing this as external as I don't think there is anything to do on the EF/ADO.NET side.

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

No branches or pull requests

3 participants