Thanks, Dan! Using a Makefile like yours, and your edits, I've been able to build sqlite3 with built-in lsm and lz4. I've inserted several blocks of lines into my 8-million line .lsm file, with no errors. Now on to sort out how to load such a build in our app...