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 +6d0d39b incompatible with NDK 20.0.x #35030

Open
archanpaul opened this issue Oct 21, 2019 · 3 comments

Comments

@archanpaul
Copy link

@archanpaul archanpaul commented Oct 21, 2019

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

$ go version
gomobile version +6d0d39b Wed Oct 2 17:59:09 2019 +0000 (android); androidSDK=/opt/android-sdk/platforms/android-29

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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/arp/.cache/go-build"
GOENV="/home/arp/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/opt/go-packages"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build030033936=/tmp/go-build -gno-record-gcc-switches"

What did you do?

gomobile clean
gomobile init

What did you expect to see?

Should not show following error!!

What did you see instead?

gomobile: No compiler for 386 was found in the NDK (tried /opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android16-clang). Make sure your NDK version is >= r19c. Use `sdkmanager --update` to update it.

gomobile bind
gomobile: No compiler for amd64 was found in the NDK (tried /opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang). Make sure your NDK version is >= r19c. Use `sdkmanager --update` to update it.

Android NDK version

Android NDK r20.0.x

@gopherbot gopherbot added this to the Unreleased milestone Oct 21, 2019
@gopherbot gopherbot added the mobile label Oct 21, 2019
@archanpaul

This comment has been minimized.

Copy link
Author

@archanpaul archanpaul commented Oct 21, 2019

For those who are facing the incompatibility problem, here is a temporary hack to use NDK r19.2.x :

  1. Install NDK r19.2.x in the side of R20.0.x
  2. cd $SDK_FOLDER
  3. ln -s ndk/19.2.5345600 ndk-bundle

gomobile init should work with this hack!!

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Oct 21, 2019

@steeve

This comment has been minimized.

Copy link
Contributor

@steeve steeve commented Oct 21, 2019

Not sure about that one, sorry. We are running gobind inside bazel, and didn't get any particular issues with r20. I may have read that the layout changed quite a bit though...

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.