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

ch04 todo-list not running on Mac M1 #73

Open
piojosnos opened this issue Nov 7, 2024 · 0 comments
Open

ch04 todo-list not running on Mac M1 #73

piojosnos opened this issue Nov 7, 2024 · 0 comments

Comments

@piojosnos
Copy link

I'm getting this on the logs:

fail:` Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HN7UONQRGOH1", Request id "0HN7UONQRGOH1:00000002": An unhandled exception was thrown by the application.
      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 LD_DEBUG environment variable: Error loading shared library libe_sqlite3: 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()
         --- End of inner exception stack trace ---

Problem seems obvious (not finding a shared library).
However library seems to be there ( ./runtimes/osx-arm64/native/libe_sqlite3.dylib ) :

/app # find . | grep libe_sqlite3
./runtimes/linux-x64/native/libe_sqlite3.so
./runtimes/osx-x64/native/libe_sqlite3.dylib
./runtimes/linux-musl-x64/native/libe_sqlite3.so
./runtimes/alpine-x64/native/libe_sqlite3.so
./runtimes/linux-armel/native/libe_sqlite3.so
./runtimes/linux-arm/native/libe_sqlite3.so
./runtimes/osx-arm64/native/libe_sqlite3.dylib
./runtimes/linux-s390x/native/libe_sqlite3.so
./runtimes/linux-arm64/native/libe_sqlite3.so
./runtimes/linux-mips64/native/libe_sqlite3.so
./runtimes/linux-x86/native/libe_sqlite3.so
/app # 

Not sure if it is in the right place.
I tried rebuilding the image from scratch on my laptop ( docker compose -f docker-compose.yml -f arm64.yml build --pull ), and I'm getting the same result (Yes, I'm sure it is using the image I built myself).

I'm not a C# expert, even less building C# stuff for MacOS. Any help would be appreciated.

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

1 participant