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: gomobile init failed #32514

Closed
guotie opened this issue Jun 10, 2019 · 3 comments
Closed

x/mobile: gomobile init failed #32514

guotie opened this issue Jun 10, 2019 · 3 comments

Comments

@guotie
Copy link

@guotie guotie commented Jun 10, 2019

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

$ go version
1.11.5

Does this issue reproduce with the latest release?

yes.

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

go env Output
$ go env

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=E:\gopath
set GOPROXY=
set GORACE=
set GOROOT=E:\bin\Go
set GOTMPDIR=
set GOTOOLDIR=E:\bin\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build144258234=/tmp/go-build -gno-record-gcc-switches

What did you do?

Use gomobile init -ndk my-ndk-path, it failed:

# gomobile init -ndk=C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle
gomobile: C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle\prebuilt\windows-x86_64\bin\python2.7 build/tools/make_standalone_toolchain.py --arch=arm --api=15 --install-dir=E:\gopath\pkg\gomobile\ndk-toolchains\arm failed: exit status 1
WARNING:__main__:make_standalone_toolchain.py is no longer necessary. The
%NDK%\toolchains\llvm\prebuilt\windows-x86_64\bin directory contains target-specific scripts that perform
the same task. For example, instead of:

    C:\>python %NDK%\build\tools\make_standalone_toolchain.py \
        --arch arm --api 15 --install-dir toolchain
    C:\>toolchain\bin\clang++ src.cpp

Instead use:

    C:\>%NDK%\toolchains\llvm\prebuilt\windows-x86_64\bin\armv7a-linux-androideabi15-clang++ src.cpp

15 is less than minimum platform for arm (16)


@odeke-em odeke-em changed the title gomobile init failed x/mobile: gomobile init failed Jun 10, 2019
@gopherbot gopherbot added this to the Unreleased milestone Jun 10, 2019
@gopherbot gopherbot added the mobile label Jun 10, 2019
@odeke-em

This comment has been minimized.

Copy link
Member

@odeke-em odeke-em commented Jun 10, 2019

Thank you for reporting this issue @guotie!

Unfortunately I still don't get what the issue is. Is it that your version of the Android API (of 15) isn't supported yet we claim to support at least 15?

Kindly paging @eliasnaur @hyangah

@eliasnaur

This comment has been minimized.

Copy link
Contributor

@eliasnaur eliasnaur commented Jun 10, 2019

Please update your gomobile tools:

go get -u golang.org/x/mobile/cmd/...

Gomobile init hasn't been necessary for a while now.

@guotie

This comment has been minimized.

Copy link
Author

@guotie guotie commented Jun 11, 2019

yes, gomobile init does not ecessary.

@guotie guotie closed this Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.