For compiling sqlite-3.8.7.2, in the file: lib/codec.c replace sqlite3Error(...) function call with
sqlite3ErrorWithMsg(...).
Compilation goes successfully with the above changes.
However, when I do "go test" it fails, for TestTail and TestParam, with this version 3.8.7.2 also.