Hello.

The demonstration script for a loadable extension I’m working on uses the
sqlite3 command-line shell, and works as expected on Ubuntu.  I’m at the
stage of checking portability by building and demonstrating it on OSX.

The shell bundled with OSX 10.9.1 (Mavericks) seems to be a custom build,
as both the ‘.load’ command and the corresponding 'load_extension()’ 
function appear to be unavailable.

The pre-compiled shell available at
http://www.sqlite.org/2013/sqlite-shell-osx-x86-3080200.zip is built for
the i386 architecture (see below), and so is incompatible with an extension
built for x86_64, which is the default architecture for code built on my 
OSX platform.

I wonder whether i386 is the intended architecture for the pre-compiled 
downloadable shell?

Details follow below.

dhcp-182(niall)15: ls sqlite*
sqlite-shell-osx-x86-3080200.zip
dhcp-182(niall)16: openssl sha1 ./sqlite-shell-osx-x86-3080200.zip 
SHA1(./sqlite-shell-osx-x86-3080200.zip)= 
32aea883a5f6ad88a16e26f130d2d178e48ef2a9

        Matches fingerprint shown on download page.

dhcp-182(niall)17: unzip ./sqlite-shell-osx-x86-3080200.zip 
Archive:  ./sqlite-shell-osx-x86-3080200.zip
  inflating: sqlite3                 
dhcp-182(niall)18: ls sqlite*
sqlite-shell-osx-x86-3080200.zip        sqlite3
dhcp-182(niall)19: file ./sqlite3 
./sqlite3: Mach-O executable i386

        Oh?

dhcp-182(niall)20: which sqlite3
/usr/bin/sqlite3
dhcp-182(niall)21: file `!!`
file `which sqlite3`
/usr/bin/sqlite3: Mach-O 64-bit executable x86_64

        Apple provide a version with the expected architecture, 
        but support for loading extensions is disabled.

Best regards, and Happy Christmas!
Niall O’Reilly

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to