DapperLib / DapperLib/Dapper

Does't support SQLite at Linux ARM64

Open
#2,162 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

Environment:

OS: Ubuntu 22.04 (QEMU)
Arch: ARM64
.NET SDK version: 8.0

Build

I had build at x86_64 Windows Machine by below command line.

dotnet publish -c Release -r linux-arm64

Libraries

Example Code:

public T QuerySomething<T>(string sql, object param)
{
    return dbConnection.Query<T>(sql, param);
}
...
SqlMapper.AddTypeHandler(new CustomTypeHandler()); // Implemented all interface.
...
QuerySomething<Model>("SELECT * FROM Model WHERE CustomTypeValue=@CustomTypeValue", new { CustomTypeValue = customTypeValue }

System.Data.SQLite.Core

I already installed libsqlite3-dev package. but it requires SQLite.Interop.dll.

Exception:
Unable to load shared library 'SQLite.Interop.dll' 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:

System.Data.SQLite.Core with x64 Linux/Windows

No Exceptions.

Microsoft.Data.Sqlite.Core

Exception:
No mapping exists from object type CustomType to a known managed provider native type.

Doesn't work SqlMapper.AddTypeHandler().


Is there a way recommended usage in Linux ARM64?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported linux-arm64 publish on Ubuntu 22.04, using both System.Data.SQLite.Core and Microsoft.Data.Sqlite.Core with the shown CustomTypeHandler scenario. Compare the SQLite.Interop.dll loading failure with the custom-type mapping exception; done means identifying a supported ARM64 usage path or clearly documenting that the combination is unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, linux, sqlite
Domain
backend, databases, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.