RSKtools relies on mksqlite for SQLite support in MATLAB.
mksqlite ships MEX files for Windows (32- and 64-bit) and Linux (64-bit), but macOS users are left high and dry. To make things more turnkey for users, RSKtools ships with binaries for all three platforms; that means macOS binaries for mksqlite need to be compiled additionally.
- Download the newest source release.
You can get it from the mksqlite SourceForge project page: https://sourceforge.net/projects/mksqlite/ Click the “Files” tab, then pick the newest
- Unpack the source release, and apply modifications to the source as necessary. See the section below.
- Launch MATLAB.
mex -setupreports an error, replace the files in
/Applications/MATLAB_R2015b.app/bin/maci64/mexoptswith the contents of macOS mexopts.tar.gz
- This is basically the same fix as described at https://www.mathworks.com/matlabcentral/answers/246507, but updated to be nonspecific with regards to the macOS SDK.
- Change the current folder to wherever you unpacked the source release.
buildit. It should run successfully and generate
mksqlite.mexmaci64in the current folder.
As macOS isn't terribly well-supported by the mksqlite maintainer, sometimes modifications to the source are necessary before they will work or even compile.