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
os/user: "GroupIds requires cgo" when building for linux/arm with tag osusergo #35770
Comments
The error message go/src/os/user/lookup_stubs.go Line 70 in a38a917
So the question is, why were you not getting that error on 1.12? (What are the exact commands that you ran, and the results using |
I am not able to reproduce the working example with go 1.12. Regarding the docs, shouldn't the build without CGO or with -tags="osusergo" be linked against: Line 172 in a38a917
https://golang.org/pkg/os/user/
|
|
Closing old issues that still have the WaitingForInfo label where enough details to investigate weren't provided. Feel free to leave a comment with more details and we can reopen. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Cross-compile a go application for linux/arm using windows/amd64 using -tags="osusergo"
Cross-compile a go application for linux/arm using linux/amd64 using -tags="osusergo"
What did you expect to see?
The application builds fine and uses go implementation of os/user.
os/user.GroupIds should work fine on an application not using CGO.
What did you see instead?
The application builds fine but uses CGO implementation of os/user.
os/user.GroupIds call returns "user: GroupIds requires cgo"
The same application is correctly compiled/linked with go 1.12 on linux/amd64 for linux/arm.
The text was updated successfully, but these errors were encountered: