SQLite Forum

Plan for an 64 bit binary for macosx catalina?
Login

Plan for an 64 bit binary for macosx catalina?

(1) By anonymous on 2020-03-24 17:46:40 [link] [source]

I am trying to use sqlite on a Mac. With macosx catalina Mac has dropped support for 32bit binaries. After installing the sqlite binary distribution I found that it contained a PPC and a i386 (which I take to mean 32bit) library. Trying to use the i386 the system complained that it couldn't a library suitable for the architecture.

I also tried compiling the library from source but then the loader complained that the sqlite_init symbol is not available. I am not sure why that happens.

Hence, I would really appreciate if there was a binary distribution for macos that offers a 64 bit version.

Best wishes,

Huub (hvandam@bnl.gov)

(2) By Tim Streater (Clothears) on 2020-03-24 19:19:09 in reply to 1 [link] [source]

As Catalina is 64-bit only, the libsqlite.dylib that is supplied with the OS should b 64-bit only. The supplied sqlite3.app will use that library, or at least it used to.

What about /usr/lib/libsqlite3.dylib ? Isn't that what you need?

(3) By Peter Martin (pmartin) on 2021-04-30 23:19:53 in reply to 2 [source]

Same problem here - Catalina/64-bit/x86, and just today resolved for the current sqlite3 version, 3.35.5. The key advice appears at https://sqlite.org/howtocompile.html, under item 3:

"Building shared libraries for Mac OS X and Windows is not nearly so simple, unfortunately. For those platforms it is best to use the configure script and makefile that is included with the TEA tarball."

As a Tcl fan, I understood "TEA tarball."

What worked for me: 1. Download the source code archive file, specifically having the .tar.gz file extension.

  1. Extract from the archive, and build (configure + make), following instructions for sqlite3 in the README.txt file.

  2. Change directories to ./tea, and follow instructions in the TEA-specific README file. One output of this second build action in my case was a "libsqlite3.35.5.dylib" file. Depending on your target directory, you may need to use "sudo make install."

FYI, Mac OSX now generates errors when loading imported .dylib files that are not certified. It's a new security feature.