-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: build fails: clang80: error: argument unused during compilation: '-stdlib=libc++' [-Werror,-Wunused-command-line-argument] #29706
Comments
I got this same error on go1.11.4 windows/amd64 and NDK 19.0.5232133, and got around it by making this change to an NDK script: https://android-review.googlesource.com/c/platform/ndk/+/875216 --- a/build/tools/make_standalone_toolchain.py
+++ b/build/tools/make_standalone_toolchain.py
@@ -127,7 +127,7 @@
triple = get_triple(arch)
target = make_clang_target(triple, api)
- flags = '-target {} -stdlib=libc++'.format(target)
+ flags = '-target {}'.format(target) and then running Seems to be related to this issue in NDK: android/ndk#849 |
@unicameralontology Thanks! After remove |
Any way to fix this in CI build? |
When I run:
I got this:
go version:
go env:
NDK Version:
Does anyone know what's going on? |
I fixed mine some time ago by manually downloading a specific version of ndk where I know I won't encounter this error. wget -O $ANDROID_HOME/android-ndk-r19b-linux-x86_64.zip https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip
unzip -qq $ANDROID_HOME/android-ndk-r19b-linux-x86_64.zip -d $ANDROID_HOME/android-ndk-r19b-linux-x86_64
mv $ANDROID_HOME/android-ndk-r19b-linux-x86_64/android-ndk-r19b $ANDROID_HOME/ndk-bundle
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle Here's my complete CI script |
What version of Go are you using (
go version
)?go version go1.11.4 linux/amd64
Android NDK 19.0.5160253-beta2
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run gomobile build to build an Android APK.
What did you expect to see?
Build command will build an APK named basic.apk.
What did you see instead?
gomobile build -target=android -x golang.org/x/mobile/example/basic
OutputThe text was updated successfully, but these errors were encountered: