ericsink / cb Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
The .NET tooling for web assembly is coming together, and soon the masses will demand SQLite in their browsers!
I know @jeromelaban did a bunch of work in unoplatform/Uno.sqlite-wasm to produce an e_sqlite3.bc
file. What would it take to make this an official part of the main SQLitePCLRaw.provider.e_sqlite3
package?
IIRC, we're also waiting on the .NET team (mono-wasm team?) to define how *.bc files should be packaged so they flow through the toolchain into Emscripten. (I vaguly remember Immo mentioning something like a browser-wasm
RID at one point.) Once this happens, I presume the same package could then work for both Blazor and Uno projects.
Currently, the minimum requirement of the dynamic libraries on macOS x86_64 is
cb/bld> otool -l ./bin/e_sqlite3/mac/x86_64/libe_sqlite3.dylib | grep LC_BUILD_VERSION -A4
cmd LC_BUILD_VERSION
cmdsize 32
platform macos
sdk 13.1
minos 12.0
and It causes crash after successful compilation of dotnet apps built with https://github.com/ericsink/SQLitePCL.raw
such as https://github.com/jellyfin/jellyfin, Kareadita/Kavita#2026 on macOS 10.14
System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.DllNotFoundException: Unable to load shared library 'e_sqlite3' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable:
dlopen(/Volumes/MACFOO/ConsoleApp/jellyfin-10.9.0/e_sqlite3.dylib, 1): image not found
dlopen(e_sqlite3.dylib, 1): image not found
dlopen(/Volumes/MACFOO/ConsoleApp/jellyfin-10.9.0/libe_sqlite3.dylib, 1): no suitable image found. Did find:
/Volumes/MACFOO/ConsoleApp/jellyfin-10.9.0/libe_sqlite3.dylib: cannot load 'libe_sqlite3.dylib' (load command 0x80000034 is unknown)
/Volumes/MACFOO/ConsoleApp/jellyfin-10.9.0/libe_sqlite3.dylib: cannot load 'libe_sqlite3.dylib' (load command 0x80000034 is unknown)
dlopen(libe_sqlite3.dylib, 1): image not found
dlopen(/Volumes/MACFOO/ConsoleApp/jellyfin-10.9.0/e_sqlite3, 1): image not found
dlopen(e_sqlite3, 1): image not found
dlopen(/Volumes/MACFOO/ConsoleApp/jellyfin-10.9.0/libe_sqlite3, 1): image not found
dlopen(libe_sqlite3, 1): image not found
After compiling the libraries with additional option -mmacosx-version-min=10.14
, There's no problem in my usage of the app.
Just ran into this after upgrading SQLitePCL and wanted to point this out for posterity.
The change last May that updated the GitHub build image to use Ubuntu 20.04 breaks binary compatibility with older distros that don't have GLIBC >= 2.28. Those include Amazon2, CentOS/RedHat/Oracle 7.X, Ubuntu 18.04, SuSE 12SP5, etc.
When trying to use SQLitePCL, one runs into errors like this:
System.TypeInitializationException: The type initializer for 'SQLite.SQLiteConnection' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'e_sqlite3' 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:
/opt/vendor/product/e_sqlite3.so: cannot open shared object file: No such file or directory
/lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/vendor/product/libe_sqlite3.so)
libe_sqlite3.so: cannot open shared object file: No such file or directory
/opt/vendor/product/e_sqlite3: cannot open shared object file: No such file or directory
/opt/vendor/product/libe_sqlite3: cannot open shared object file: No such file or directory
at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at SQLite.SQLiteConnection..cctor()
--- End of inner exception stack trace ---
at SQLite.SQLiteConnection..ctor(String databasePath, Boolean storeDateTimeAsTicks)
The Ubuntu 18.04 runner is no longer available on GitHub, so there isn't really a good fix for this unless there's an easy way to target an older GLIBC when compiling on Ubuntu 20.04.
It would be appreciated if you could add a simple specification about how to build this repo.
I adjusted bld/cb.cs
in branch sqlite3mc
of my fork of your cb
repo, so that the mac builds no longer produce rather large numbers of warnings. This allows to detect "real" compile issues more easily.
Because I removed also almost all code that is not necessary for building the sqlite3mc
libraries (to reduce usage of computing resources), you can't take the cb.cs
file as is, but I can prepare a PR, if you want me to.
Our legal is asking what license this code is released under and we don't see anything to inform us on that. Is it possible to associate a license with this project via the README, a CONTIRBUTING file or even a github license label?
While working on a Python3 wrapper for SQLite3 Multiple Ciphers several bugs/glitches were detected and fixed. Therefore the SQLite3 Multiple Ciphers version used in cb (and SQLitePCL.raw) should be updated to the latest version 1.8.6 (based on SQLite 3.46.0).
I tried to test this update in my cb fork, but the GitHub workflow fails for macOS with an obscure error message (see workflow log).
Unfortunately I don't have much experience with macOS. Could you please have a look to find out how to fix this problem? TIA.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.