Can't cross-compile to linux amd64 due to go-sqlite3 dependency.
Perhaps there is no intent to use this tool for linux, but there seems to be some issue with the current go-sqlite3 implementation that prevents compilation to the linux platform, on amd64 architecture at least.
The issue has been raised here: https://github.com/mattn/go-sqlite3/issues/217#issuecomment-140767508
From OSX:
$ GOOS=linux GOARCH=amd64 go build -o goose cmd/goose/main.go
lib/goose/dialect.go:5:2: C source files not allowed when not using cgo or SWIG: sqlite3-binding.c
From within linux amd64 (ubuntu, ec2):
$ go get bitbucket.org/liamstask/goose
package bitbucket.org/liamstask/goose: no buildable Go source files in /home/ubuntu/gopath/src/bitbucket.org/liamstask/goose
Comments (5)
-
-
- changed status to resolved
-
@parkr, I'm having that same issue. I have tried
go get -tags nosqlite bitbucket.org/liamstask/goose/cmd/goose
but the error continues. @kevin-cantwell did it work for you? -
go get -tags nosqlite bitbucket.org/liamstask/goose/cmd/goose
works just fine for me still – it builds thegoose
command into$GOPATH/bin/goose
. Do not dogo get bitbucket.org/liamstask/goose
, or try to build justcmd/goose/main.go
.From OS X:
$ GOOS=linux GOARCH=amd64 go build -tags nosqlite -o goose ./cmd/goose
From within linux amd64:
$ go get -tags nosqlite bitbucket.org/liamtask/goose/cmd/goose
-
Thanks
- Log in to comment
Per the documentation, run
go get -tags nosqlite bitbucket.org/liamstask/goose/cmd/goose
and this should work as expected.