bitbucket-pipelines.yml:
image: golang:1.9
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- PACKAGE_PATH="${GOPATH}/src/bitbucket.org/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}"
- mkdir -pv "${PACKAGE_PATH}"
- tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
- cd "${PACKAGE_PATH}"
- go version
- uname -a
- make build_linux
- go test -v ./...`enter code here`
I try to build Golang app on Bitbucket CI but got the error with golang.org/x/sys/unix:
make build_linux
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build --tags "json1" -ldflags "-s -X main.version=0.63" -a -installsuffix cgo -o dbcore_linux ./cmd/dbcore/dbcore.go
# bitbucket.org/xxx/dbcore/vendor/golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/syscall_linux.go:20:6: missing function body
vendor/golang.org/x/sys/unix/syscall_linux.go:24:6: missing function body
vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:13:6: missing function body
vendor/golang.org/x/sys/unix/syscall_unix_gc.go:12:6: missing function body
vendor/golang.org/x/sys/unix/syscall_unix_gc.go:13:6: missing function body
vendor/golang.org/x/sys/unix/syscall_unix_gc.go:14:6: missing function body
vendor/golang.org/x/sys/unix/syscall_unix_gc.go:15:6: missing function body
make: *** [build_linux] Error 2
Makefile:7: recipe for target 'build_linux' failed
I haven't issue on the local machine with MacOS. Only CI. How could I resolve that issue?
Thanks!