Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux/arm64 docker golang install error #533

Open
newro opened this issue Aug 19, 2024 · 3 comments
Open

linux/arm64 docker golang install error #533

newro opened this issue Aug 19, 2024 · 3 comments

Comments

@newro
Copy link

newro commented Aug 19, 2024

The host PC is a linux/amd64 environment,
docker run -it --platform linux/arm64 golang and run it with
If you run go version immediately after entering the container, you will get an invalid argument error.
However, if you repeat it several times, version is output normally.
If you run go install afterward, this error occurs.

root@c471d0f3c89f:/go# go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument
go: error obtaining buildID for go tool compile: fork/exec /usr/local/go/pkg/tool/linux_arm64/compile: invalid argument

@tianon
Copy link
Member

tianon commented Aug 19, 2024

Yep, I've seen this also (#531 (comment)) -- there's some new incompatibility between Go 1.23 and QEMU's user-mode emulation, and I'm not sure exactly what's the cause of it. I get it even with just something simple like go version (because it tries to fork/exec for the new telemetry support).

@tianon
Copy link
Member

tianon commented Aug 19, 2024

It's probably worth reporting to Go upstream, but keep in mind that QEMU's user-mode emulation is something that they historically haven't ever (that I've seen) intentionally supported, so interest in fixing it might be lukewarm (see golang/go#1508, for example).

@tianon
Copy link
Member

tianon commented Aug 26, 2024

There's an explicit upstream report for this now: golang/go#68976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants