SQLite Forum

libsqlite3.dylib is not supporting arm64
Login

libsqlite3.dylib is not supporting arm64

(1) By iosmacdev on 2020-12-11 09:44:57 [link] [source]

Since new Mac with M1 chip are announced, I have been trying to create a Universal binary for my Mac application which should run in architecture both seamlessly. In build settings (Xcode 12.2 ), standard architectures are (Intel, pole Silicon). we have been using libsqlite3.dylib since long back, now If I compile the code it failed with error -

The linked library 'libsqlite3.dylib' is missing one or more architectures required by this target: arm64 In order to create universal binary, we can't give any custom architecture (in valid architecture).

I download new new library as well, its supporting only "x86_64 i386 ppc7400".

Please let me know how to resolve this issue.

(2) By ddevienne on 2020-12-11 10:55:54 in reply to 1 [source]

I guess you were using a system-provided SQLite?
In that case, ask Apple, the system provider, to provide one, no?

The typical answer on this forum is to build SQLite yourself.
I.e. download the amalgamation, and build it however you want.

I'm pretty sure SQLite works fine on ARM64, it's very portable code,
as long as you can build C code, and have a VFS to interact with the
system for files, locks, memory, etc... And there's one for OSX already.

You then also do not depend on the SQLite version from the system.
And you can also build SQLite statically within your own app, to
avoid using a possibly older system-provided SQLite.