$> env GOOS=linux GOARCH=arm GOARM=7 go build main.go
# github.com/mattn/go-sqlite3
../github.com/mattn/go-sqlite3/tracecallback_noimpl.go:8: undefined: SQLiteConn
go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/apertureless/.go"
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sh/zh7wtckx5tvgy8xwyqr8y8p80000gn/T/go-build395604859=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
Do you have cross C compiler for linux?
Oh now I see. You have C bindings in there. I was using jinzhu/gorm package, which uses your package for sqlite.
Yeah the missing c cross compiler, will be the problem. Thanks.
FWIW, this 'used' to work with this package, building on Windows host and building for Windows, Linux and Darwin.
I can now only build natively on every platform.
@mattn can you give more details on what's the recommended approach for a C cross compiler for Linux?
Also, what about the other way .. building on Linux, but creating binaries for OSX?
Most helpful comment
FWIW, this 'used' to work with this package, building on Windows host and building for Windows, Linux and Darwin.
I can now only build natively on every platform.