Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
339 stars 61 forks source link

Add Apple Silicon support #103

Closed rubiktubik closed 1 year ago

rubiktubik commented 1 year ago

I'am trying to use the awesome library on my M1 Pro Mac with arm64 but i'am getting System.DllNotFoundException: Unable to load shared library 'duckdb' or one of its dependencies. errors.

It seems that just the osx-arm64 runtime is missing. This is my attempt to fix this problem and i hope this change is enought and the osx-universal also work on arm64.

Please feel free to correct my small attempt :-)

Giorgi commented 1 year ago

@rubiktubik The build failed because the delimiter for RuntimeIdentifiers should be ; not , but I think instead of adding a new rid, just replacing osx-x64 with osx should work according to runtime.json

rubiktubik commented 1 year ago

Hmm, still failing on macos 🤔

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4762162201


Totals Coverage Status
Change from base Build 4588693126: 0.0%
Covered Lines: 673
Relevant Lines: 784

💛 - Coveralls
coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4762162201


Totals Coverage Status
Change from base Build 4588693126: 0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls
Giorgi commented 1 year ago

@rubiktubik Do the tests run successfully locally?

rubiktubik commented 1 year ago

I'll test this on my Mac when I get home tonight and let you know.

Giorgi commented 1 year ago

I think you'll need to update ModuleInit so that it returns osx-arm64 if it's running on Arm

Giorgi commented 1 year ago

@rubiktubik Can you try installing DuckDB.NET.Data.Full 0.7.2-alpha.21 to see if it works for you?

rubiktubik commented 1 year ago

The System.DllNotFoundException error ist gone! Thanks for your fast responses and effort!

Giorgi commented 1 year ago

Nice! Are you able to run tests locally?

rubiktubik commented 1 year ago

I can use your alpha nuget in my own project without a problem.

But when i check out your develop branch and run your tests locally i still get the System.DllNotFoundException error