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

Unable to find library -lgcc building for android #51

Closed
RCasatta opened this issue Jun 16, 2022 · 2 comments
Closed

Unable to find library -lgcc building for android #51

RCasatta opened this issue Jun 16, 2022 · 2 comments

Comments

@RCasatta
Copy link
Contributor

RCasatta commented Jun 16, 2022

  = note: ld: error: unable to find library -lgcc
          clang-12: error: linker command failed with exit code 1 (use -v to see invocation)

to reproduce

download and unzip android ndk 23c https://developer.android.com/ndk/downloads#lts-downloads

rustup target add i686-linux-android

export NDK=/path/to/android-ndk-r23c/
export HOST=linux-x86_64

export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST
export PATH=$PATH:$TOOLCHAIN/bin

export CC=i686-linux-android21-clang
export AR=llvm-ar
export CARGO_TARGET_I686_LINUX_ANDROID_LINKER=$CC

cargo build --target i686-linux-android

Note, this build works for https://github.com/rust-bitcoin/rust-secp256k1 and also version 0.4.0 of this lib doesn't have this error

(to successfully build on 0.4.0, secp256k1-sys must be pinned -> secp256k1-sys = "=0.4.1"

rust-mobile/ndk#149

rust-mobile/ndk#189

@RCasatta RCasatta changed the title Unable to find library -lgcc building for android Unable to find library -llog building for android Jul 21, 2022
@apoelstra
Copy link
Contributor

I don't know what to make of this. This library does not depend on log anywhere and I don't know where that -llog line would come from.

@RCasatta
Copy link
Contributor Author

Thanks for having a look, I'll close for now since maybe it's not an issue of this repo but something else

@RCasatta RCasatta closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
@RCasatta RCasatta changed the title Unable to find library -llog building for android Unable to find library -lgcc building for android Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants