by eatonphil · 4y ago · 0 comments
https://github.com/marcboeker/go-duckdb produces a non-static binary by default.
https://stackoverflow.com/questions/33228809/why-is-my-go-ap...
CGO_LDFLAGS="-L$(pwd)/duckdb/src/include" CGO_CFLAGS="-I$(pwd)/duckdb/src/include" go build -ldflags '-extldflags " -lstdc++ -lm -lduckdb -static"'
# github.com/marcboeker/go-duckdb
../../go/pkg/mod/github.com/marcboeker/go-duckdb@v0.0.0-20220427142532-cd9f33e64d9a/connection.go:4:10: fatal error: duckdb.h: No such file or directory
4 | #include <duckdb.h>
| ^~~~~~~~~~
compilation terminated.
Edit, nevermind about not being in a good state! Here's my code: https://github.com/multiprocessio/duckdb-tests.DuckDB needs Python3 to build as well, so not sure how easy it might be to get it cross-compile with Zig CC.
Personally, a duckdb golang binary interests me. But: I haven't yet mustered enough patience to sit through a time-consuming duckdb build.