Replies: 1 comment 6 replies
-
Short answer: I won't rule it out, but I am not inclined to add another bundle. Longer answer: My bundle packages are one of the leakiest abstractions ever. They have the effect of telling developers they do not need to think about the various issues involved of having multiple choices of native SQLite library, but those developers often DO need to think about such things. The green package, in particular, is something I consider a bug. I wish I had never done it. Or maybe it wouldn't be so bad if I had given it a scarier name. But lots of people seem to think it's the best bundle to choose as a default, and I would like to have avoided that. So as you can imagine, I am not eager to add another package that plays a similar role to bundle_green. :-) That said, I said I won't "rule it out" because I need to consider the possibility that a bundle specifically for libspatialite use cases might be helpful. Like maybe if it had "spatialite" in the name, people would only use it for those use cases. @bricelam -- Ignoring the issue of bundle packages, in terms of the lower level technical details, what is the right solution here? I think we've encountered this issue (or similar) before. Is the core problem here that libspatialite on Linux ends up using the system sqlite so we just need a way to deal with that? |
Beta Was this translation helpful? Give feedback.
-
@ericsink you've done a really good job maintaining various SQLitePCLRaw bundles for the community. Thanks!
Would it be possible and not too much trouble for you to add another SQLitePCLRaw.bundle_ package which uses e_sqlite provider for all platforms except for Linux where it would use the native system sqlite provider instead. So, very similar to how you did the SQLitePCLRaw.bundle_green where it uses the native system sqlite provider on iOS.
Reason for my request is that I've recently been plagued with the incompatibility between the default sqlite provider used by Microsoft.EntityFramework.Core.Sqlite package and the libspatialite native library on Linux which is depended upon by Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite. The libspatialite apparently links in PROJ library which links in the native system sqlite library on linux. This results in a segmentation fault in the client app that is pulling both of these dependencies in. The issue is detailed here: dotnet/efcore#16667
My app is targeting Windows, Linux and Android and the current workaround suggested by Microsoft of explicitly using SQLitePCLRaw.bundle_sqlite3 breaks on Android as you detailed in your post: https://ericsink.com/entries/sqlite_android_n.html
I think if we had a new SQLitePCLRaw.bundle package such as the one i am proposing, it would help the community get around the spatialite segmentation fault issue in a fairly elegant way and still target all popular platforms in an easy way.
Or perhaps you could suggest a simpler way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions