Closed oskarth closed 9 months ago
Also need to adjust target dir to root
I try to revert to the latest commit (7b2413f) that passes CI and it can still successfully build for android so I think we made some changes that cause the CI to fail
I didn't notice that the previous CI also don't pass but the error is not caught (so it passed)
I think it is because of the architecture
but when I tried x86_64
it shows
note: /usr/bin/ld: cannot find -llog: No such file or directory
collect2: error: ld returned 1 exit status
I am still figuring this out
Thanks @oskarth and @vivianjeng -- I managed to resolve the issue by adding a .cargo/config.toml file specifying the exact clang linker to be used, as follows
[target.x86_64-linux-android] linker = "{NDK_PATH}/toolchains/llvm/prebuilt/darwin-x86_64/bin/x86_64-linux-android21-clang"
I noticed that there was a mac popup window (either unpacking or authenticating the binaries) that appeared the first time I compiled successfully.
Separately, in line 97 of config-example-android.toml
I had to add ${PROJECT_DIR} in front of
cp ${PROJECT_DIR}/target/${ARCHITECTURE}/${LIB_DIR}/libmopro_ffi.so jniLibs/${FOLDER}/libuniffi_mopro.so
Thank you @ethzanity I also solved CI with this: https://github.com/rust-lang/rustup/issues/2872#issuecomment-1158238378 See: #82
I guess we can close this issue now
Problem
Currently Android CI build doesn't work. Some users have reported similar problems locally.
Details
User report
Failing CI
Latest working
Other notes
One difference between build_ios and build_android is:
in build_ios, perhaps this leads to different behavior when building for android in some circumstances? With the new toml config format.
Acceptance criteria
Android build works locally and on CI.