SQLite Forum

SQLite on Windows for ARM
Login

SQLite on Windows for ARM

(1) By LFXTech (LFXSupport) on 2021-12-06 16:58:28 [link] [source]

Wondering if anyone has compiled SQLite for the Windows for ARM release that's required to run a Windows VM on M1 macs. I haven't turned anything up in my searching just yet and am beginning to wonder if it's a platform limitation due to the architecture.

(2) By Larry Brasfield (larrybr) on 2021-12-06 17:17:02 in reply to 1 [source]

beginning to wonder if it's a platform limitation due to the architecture

The project Downloads page has an Android binary, and the Fossil project (which uses SQLite) publishes a binary for the Raspberry Pi. Since those are both ARM platforms, I would say the evidence goes against the "platform limitation" idea.

(3) By LFXTech (LFXSupport) on 2021-12-06 18:39:54 in reply to 2 [link] [source]

That's a fair point. So not a limitation but maybe just hasn't been compiled just yet.

(4) By Simon Slavin (slavin) on 2021-12-06 22:31:47 in reply to 1 [link] [source]

Do you actually have a Windows VM that running on an M1 Mac ? If so, which one ?

There's nothing to prevent SQLite to run on such a thing. The SQLite amalgamation code runs on M1 Macs under macOS. SQLite runs on Windows VMs. In both cases you just have to add it to an appropriate project and use a compile that understands its C code, not C++ code.

(5) By LFXTech (LFXSupport) on 2021-12-09 18:34:34 in reply to 4 [link] [source]

Yes I have a VM running Windows 11 Pro Insider Preview OSBuild 22483.1011

I just stumbled across DockCross and it looks like they have a windows-arm64 distro so I'm currently seeing if that's going to get me the single dll we need for the ODBC connector like we're currently using.

(6) By anonymous on 2022-08-24 18:53:02 in reply to 5 [link] [source]

Did you find the dll for arm64 windows in the end?

(7.1) By Simon Slavin (slavin) on 2022-08-24 19:50:00 edited from 7.0 in reply to 1 [link] [source]

SQLite is published as C code. It has no dependencies. If you can compile C code for a platform, you can compile SQLite for that platform.

Do you have a specific problem you encountered trying to compile SQLite ?

Later:

I see you aren't actually trying to compile SQLite into your project. You're looking for a pre-compiled DLL for your specific platform. As far as I can tell, there's nothing stopping someone from making one for the platform you described. I can confirm that SQLite works fine on both Apple M1 and Apple M2 computers.

(8) By anonymous on 2022-08-25 17:47:52 in reply to 7.1 [link] [source]

I tried to compile the dll for windows on arm (64) to use but unfortunately I was not successful. is it possible that the precompiled dll for windows on arm is posted on github or sqlite-site for the community to use?

(9) By anonymous on 2022-08-29 16:16:03 in reply to 8 [link] [source]

I was able to compile it by updating the target framework in <repo>\System.Data.SQLite.Linq\System.Data.SQLite.Core.2017.csproj to 4.8.1, and then opening the sln and letting VS 2022 update everything else to 4.8.1, or in the case of the C/C++ VS updated the platform toolset to v141, but that'd probably depend on whether you're compiling from windows 10 or 11.

And then in the sln properties, I added an ARM64 cpu architecture. And it built

Then I was able to build the release natives. I've had issues with building normal release mode though.

But the problem I ran into with building it myself was that the version I built couldn't be used with SEE encryption. But if you're not using that, I didn't personally run into any problems using my version of SQLite.Interop with the nuget version of system.data.sqlite

It would be much easier if it would be supplied/maintained as part of the nuget package though. now that net framework 4.8.1 is released, which supports windows on ARM

(10) By anonymous on 2023-06-29 00:20:57 in reply to 9 [link] [source]

The only piece missing is SQLite.Interop.dll for ARM64 in the nuget package. But I have no idea how to build that Interop dll.

(11) By Rav Panchalingam (ravz85) on 2023-07-04 08:54:43 in reply to 10 [link] [source]

hi, any update on this? I've got the same issue (missing SQLite.Interop.dll)

(12) By SailorJ on 2023-08-27 17:13:32 in reply to 10 [link] [source]

Same issue here. Running VS C# code in Win 11 Ent ARM on Apple M2 with VMWare Fusion 13. Getting the SQLite.Interop.dll or dependency could not load error. Any assistance getting this into the NuGet package would be greatly appreciated!

(13) By anonymous on 2023-09-04 14:22:08 in reply to 12 [link] [source]

Hi,

Recently I required an ARM64 build of System.Data.SQLite so I could run some of my toy C# projects on my home Raspberry Pis. I fumbled my way through until I ended up with System.Data.SQLite .dlls that worked on the Pis. I've made the dockerfile, etc available on GitHub; you may find these helpful in building System.Data.SQLite for your own use, however note the warning - I've not tested this approach beyond my own basic testing. Use at your own risk.

https://github.com/tkf144/System.Data.SQLite-ARM64

Regards, Tom

(14) By baramuse on 2023-11-03 09:52:21 in reply to 9 [link] [source]

Any way to share you build ?

Cheers