-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
actually link to <sqlite3.h> when -tags libsqlite3 #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@mattn ping. We'd really like to see this issue resolved. Would be great if you could take a look whether this pr is enough. :) |
please update tool/upgrade.go too |
@mattn, done. |
1 similar comment
Building with -tags libsqlite3 used the sqlite3.h from the system but the go compiler will compile all *.{c,h} files in the same direcory: "When the Go tool sees that one or more Go files use the special import "C", it will look for other non-Go files in the directory and compile them as part of the Go package. Any .c, .s, or .S files will be compiled with the C compiler." (https://golang.org/cmd/cgo/) So if users actually want to link against the system sqlite3 we should make sqlite3-binding.* a noop. Signed-off-by: Christian Brauner <[email protected]>
This makes it possible to correctly link against the system sqlite. Also, don't use defers with log.Fatal() since they won't be run on exit. Signed-off-by: Christian Brauner <[email protected]>
0554f97
to
420dc66
Compare
LGTM! |
Thanks! |
See also #318. This was previously handled using a |
Building with -tags libsqlite3 used the sqlite3.h from the system but the go
compiler will compile all *.{c,h} files in the same direcory:
So if users actually want to link against the system sqlite3 we should make
sqlite3-binding.* a noop.
Signed-off-by: Christian Brauner [email protected]
Closes #330.
After the patch:
sqlite3
:sqlite3
: