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

Closed
i9 opened this issue Apr 25, 2018 · 1 comment
Closed
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@i9
Copy link

i9 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?

Yes

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/libgojni.so gobind failed: exit status 1

Running gomobile without -i works without issue.
Also in 1.10 release note https://golang.org/doc/go1.10:
"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

https://go-review.googlesource.com/c/mobile/+/109144 to remove the -i flag.

@gopherbot gopherbot added this to the Unreleased milestone Apr 25, 2018
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Apr 25, 2018
@gopherbot
Copy link

Change https://golang.org/cl/109144 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
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
…nly $GOROOT

Gradle plugin failed on Mac due to -i flag trying to update /usr/local/go
Since go 1.10, 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.

Fixes golang/go#25076

Change-Id: Ibddab3ff5961e06c8558f2a83af8a6964d622f40
Reviewed-on: https://go-review.googlesource.com/109144
Reviewed-by: Elias Naur <elias.naur@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
…nly $GOROOT

Gradle plugin failed on Mac due to -i flag trying to update /usr/local/go
Since go 1.10, 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.

Fixes golang/go#25076

Change-Id: Ibddab3ff5961e06c8558f2a83af8a6964d622f40
Reviewed-on: https://go-review.googlesource.com/109144
Reviewed-by: Elias Naur <elias.naur@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

2 participants