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

Consider lower the minimum macOS version of libe_sqlite3.dylib, libe_sqlcipher.dylib on mac/x86_64 #18

Closed
templateK opened this issue Oct 13, 2023 · 4 comments

Comments

@templateK
Copy link

templateK commented Oct 13, 2023

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

  • jellyfin crash log
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.

@templateK
Copy link
Author

@ericsink Any comment on this will be appreciated

@ericsink
Copy link
Owner

Oops! Sorry. I saw this back when it came in and then forgot about it.

I'll need to check on tooling issues before changing this.

@templateK
Copy link
Author

Thank you for looking into this issue. I hope the tooling issues are resolved soon.

@ericsink
Copy link
Owner

ericsink commented Nov 7, 2023

I added the proposed flag to the build and as you said, it seems fine. Thanks.

@ericsink ericsink closed this as completed Nov 7, 2023
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

No branches or pull requests

2 participants