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 binding failed due to lack of some header file in Android NDK #39549
Comments
/cc @hyangah |
Are you building under $GOPATH? Building with go modules outside of $GOPATH might be the issue here. |
I'm building the AAR file under |
Any updates? |
Have you set |
@hajimehoshi Yes, I've set all necessary environment variables. |
I've never tried to develop Android application on Linux so I don't have a good insight. Does regular Android application development work in your environment? |
Yep, regular Android app is building correctly. |
By the way, I know the location of go/src/runtime/cgo/gcc_android.c Line 6 in 751c37f
|
The similar error appears in #14398. |
I don't think we really need it but how about setting |
I was able to fix this by setting the |
I'm also seeing this issue using the most recent
I'm using NDK version |
What's interesting is when I
Except in the case of the latter, it continues and eventually builds it using
But I can't tell what's the difference. Both have |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputAndroid NDK version:
21.3.6528147
Gomobile version:
gomobile version +4c31acb Sun Mar 29 12:56:38 2020 +0000 (android); androidSDK=
(I'm tried to use Go from Ubuntu repos, not only from Snap)
What did you do?
I'm trying to build some library which written in Go for Android (build AAR file).
The file
android/log.h
exists in Android NDK.What did you expect to see?
Library will compile successfully (it was compiled fine before).
What did you see instead?
I got the error:
The text was updated successfully, but these errors were encountered: