Open bprosnitz opened 1 year ago
Some SQLITEOMIT options might work, or appear to work, when used with the amalgamation. But this is not guaranteed. In general, always compile from canonical sources in order to take advantage of SQLITEOMIT options.
You likely need to build your own version of SQLite from scratch if you want such customization.
Is there a better way to build a custom SQLite for use with go-sqlite3?
Since the c code is in the go-sqlite3 repo and appears to be built with cgo, I assumed that directly changing the code in the repo or setting CGO_CFLAGS would be the way to do it. I also tried adding this flag to sqlite3.go in the repo with the same result.
The C code in this repo is the aforementioned amalgamation. Therefore, as per the SQLite docs, just setting CFLAGS alone is insufficient.
Either you will have to fork this repo to replace it with your own custom build amalgamation, or you may be able to get it to work with the libsqlite3 build tag by directing it to link against your custom library. I've never done it, so I cannot offer any further detail.
When I run
go build
with sqlite compile time flags such asCGO_CFLAGS="-DSQLITE_OMIT_AUTOINIT"
, go panics withunexpected signal during runtime execution
.Is it possible to set sqlite compile time flags? Is there another way that this should be done?
Partial stack trace: