late-librarian-54499
10/10/2024, 5:42 AM22:25:26.08 [ERROR] Completed: Compile with Go - (environment:docker-golang-linux-amd64, <http://github.com/tmthrgd/go-hex|github.com/tmthrgd/go-hex>) - <http://github.com/tmthrgd/go-hex|github.com/tmthrgd/go-hex> failed (exit code 1).
gopath/pkg/mod/github.com/tmthrgd/go-hex@v0.0.0-20190904060850-447a3041c3bc/hex_amd64.go:10:8: could not import <http://golang.org/x/sys/cpu|golang.org/x/sys/cpu> (open : no such file or directory)
22:26:01.41 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
Exception: Failed to compile main:
gopath/pkg/mod/github.com/tmthrgd/go-hex@v0.0.0-20190904060850-447a3041c3bc/hex_amd64.go:10:8: could not import <http://golang.org/x/sys/cpu|golang.org/x/sys/cpu> (open : no such file or directory)
previously i had setup environments so i could build a linux binary on OSX. here is my environment configuration
local_environment(
name="golang-linux-amd64",
compatible_platforms=["linux_x86_64"],
fallback_environment="docker-golang-linux-amd64",
)
docker_environment(
name="docker-golang-linux-amd64",
image="golang:1.23.0-bookworm",
golang_go_search_paths=["/usr/local/go/bin"],
platform="linux_x86_64",
)
this worked fine before on the intel mac. the binary would build inside the container and produce a valid linux x86_64 image. i can also build the package fine using go build .
inside the docker container. i validated it produced an x86-64 binary by running file <binaryname>
.
right now i'm unsure how to resolve this issue. any suggestions/hints would be appreciated.late-librarian-54499
10/10/2024, 6:12 AM