marcboeker / go-duckdb

go-duckdb provides a database/sql driver for the DuckDB database engine.
MIT License
648 stars 97 forks source link

Fails to build when attempting cross-compilation (GOOS/GOARCH) #82

Closed comunidadio closed 1 year ago

comunidadio commented 1 year ago
GOOS=linux GOARCH=arm64 go build
# github.com/marcboeker/go-duckdb
../../../../../pkg/mod/github.com/marcboeker/go-duckdb@v1.2.1/transaction.go:6:5: undefined: conn

or even just just changing GOARCH and leaving GOOS as-is (system is MacOS on arm64) :

GOARCH=amd64 go build
# github.com/marcboeker/go-duckdb
../../../../../pkg/mod/github.com/marcboeker/go-duckdb@v1.2.1/transaction.go:6:5: undefined: conn
comunidadio commented 1 year ago

Nevermind, just missed to add CGO_ENABLED=1. Oops.