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

x/mobile: gradle plugin fails on Mac due to -i flag trying to change /usr/local #25076

i9 opened this issue Apr 25, 2018 · 1 comment


None yet
2 participants
Copy link

commented Apr 25, 2018

What version of Go are you using (go version)?

go version go1.10.1 darwin/amd64

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?

darwin amd64

What did you do?

add gradle plugin to Android studio project and try to build

What did you expect to see?

.aar built by gomobile

What did you see instead?

build failed.
go build runtime/cgo: mkdir /usr/local/go/pkg/android_arm_shared: permission denied
/Users/junda/go/bin/gomobile: go build -v -i -buildmode=c-shared -o=/var/folders/.../android/src/main/jniLibs/armeabi-v7a/ gobind failed: exit status 1

Running gomobile without -i works without issue.
Also in 1.10 release note
"The old advice to add the -i flag for speed, as in go build -i or go test -i, is no longer necessary: builds run just as fast without -i. For more details, see gohelp cache."

Proposal to remove the -i flag.

@gopherbot gopherbot added this to the Unreleased milestone Apr 25, 2018

@gopherbot gopherbot added the mobile label Apr 25, 2018


This comment has been minimized.

Copy link

commented Apr 25, 2018

Change mentions this issue: misc/androidstudio/src: drop the -i flag to avoid writing to a read-only $GOROOT

@golang golang locked and limited conversation to collaborators Apr 25, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.