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/cmd/gomobile: init gives me linux binaries instead of windows #16823

Closed
jegor377 opened this issue Aug 21, 2016 · 2 comments
Closed

Comments

@jegor377
Copy link

jegor377 commented Aug 21, 2016

Please answer these questions before submitting your issue. Thanks!

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

go version go1.6.2 windows/386

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

set GOARCH=386
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=386
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=
set GORACE=
set GOROOT=c:\go
set GOTOOLDIR=c:\go\pkg\tool\windows_386
set GO15VENDOREXPERIMENT=1
set CC=gcc
set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

3. What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

I created new project folder, set GOPATH to my project path and then created src folder where I've created main.go file with "Hello World" code. Then I typed in console "go get golang.org/x/mobile/cmd/gomobile" and pressed enter. After few minutes I typed in console "gomobile init" ("....\bin\gomobile" init) and pressed enter.

4. What did you expect to see?

Nothing.

5. What did you see instead?

....\bin\gomobile: go install -gcflags=-shared -ldflags=-shared -pkgdir=D:\Dane\Projekty\Git\Go\SGFGameCode\pkg\gomobile/pkg_android_arm std failed: exit status 2

runtime/cgo

fork/exec D:\Dane\Projekty\Git\Go\SGFGameCode\pkg\gomobile\android-ndk-r12b\arm\bin\arm-linux-androideabi-clang.exe: Wersja %1 nie jest zgodna z wersją uruchomionego systemu Windows. Sprawdź informacje dotyczące systemu operacyjnego na tym komputerze, a następnie skontaktuj się z wydawcą oprogramowania.

which in english means that the file %1 is not supported by my operating system (win10 32bit pro). So I opened pkg folder and went the cmd error info path and I there was only linux binaries which my OS doesn't support.

edit:

I deleted everything from pkg and builded project once again using "....\bin\gomobile" init and cmd told me something that:

....\bin\gomobile: rename D:\Dane\Projekty\Git\Go\SGFGameCode\pkg\gomobile\work-022948439\android-ndk-r12b\toolchains\llvm\prebuilt\windows\bin D:\Dane\Projekty\Git\Go\SGFGameCode\pkg\gomobile\android-ndk-r12b\llvm\bin: Odmowa dostępu.

Where "Odmowa dostępu" means "Access denied".

PS: SGFGameCode is my GOPATH.

@quentinmit quentinmit changed the title gomobile init gives me linux binaries instead of windows x/mobile/cmd/gomobile: init gives me linux binaries instead of windows Aug 22, 2016
@quentinmit quentinmit added this to the Unreleased milestone Aug 22, 2016
@gopherbot
Copy link

CL https://golang.org/cl/31110 mentions this issue.

@alexbrainman
Copy link
Member

@jegor377 does https://go-review.googlesource.com/#/c/31110/ fixes your crash? Thank you.

Alex

@golang golang locked and limited conversation to collaborators Oct 17, 2017
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Fixes golang/go#16823
Fixes golang/go#17376

Change-Id: Ia9c15242cce66eca1d36a5e1dc6106b3549c251d
Reviewed-on: https://go-review.googlesource.com/31110
Reviewed-by: Elias Naur <elias.naur@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Fixes golang/go#16823
Fixes golang/go#17376

Change-Id: Ia9c15242cce66eca1d36a5e1dc6106b3549c251d
Reviewed-on: https://go-review.googlesource.com/31110
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.
Projects
None yet
Development

No branches or pull requests

4 participants