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

Can't build the aarch64 apk on amd64 #54

Closed
hellodword opened this issue May 15, 2024 · 6 comments
Closed

Can't build the aarch64 apk on amd64 #54

hellodword opened this issue May 15, 2024 · 6 comments

Comments

@hellodword
Copy link
Contributor

With the latest commit 95f8623 :

RUST_LOG=debug cargo apk build --target x86_64-linux-android works

RUST_LOG=debug cargo apk build --target aarch64-linux-android fails:

  = note: ld: error: /nix/store/8f10pxi30lvkdjrkzfw5gzz4rzia8163-openssl-3.0.13/lib/libssl.so is incompatible with aarch64linux
          ld: error: /nix/store/8f10pxi30lvkdjrkzfw5gzz4rzia8163-openssl-3.0.13/lib/libcrypto.so is incompatible with aarch64linux
          clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
@jb55
Copy link
Contributor

jb55 commented May 15, 2024

crap, I'm guessing this is because of our switch to reqwest @kernelkind , maybe we need to revert this

@jb55
Copy link
Contributor

jb55 commented May 15, 2024

we're also gonna need to add android to our CI to catch stuff like this.

maybe we can switch to rusttls or something

@jb55 jb55 closed this as completed in e1f6107 May 15, 2024
@jb55
Copy link
Contributor

jb55 commented May 15, 2024

Should be fixed!

@hellodword
Copy link
Contributor Author

Cool, will try it tomorrow

@hellodword
Copy link
Contributor Author

I can build both x86_64 and aarch64 with 0d240c1

But crash on system-images;android-34;google_apis;x86_64 emulator:

Install command complete in 3516 ms
Starting: Intent { act=android.intent.action.MAIN cmp=com.damus.app/android.app.NativeActivity }
Status: ok
LaunchState: UNKNOWN (0)
Activity: com.damus.app/android.app.NativeActivity
WaitTime: 1233
Complete
Error: String `` is not a PID

Caused by:
    cannot parse integer from empty string

Also crash on the aarch64 phone (Android 13, LineageOS 20):

logcat
05-16 11:08:38.913  9477  9477 F DEBUG   : pid: 9453, tid: 9453, name: com.damus.app  >>> com.damus.app <<<
05-16 11:08:38.913  9477  9477 F DEBUG   : uid: 10196
05-16 11:08:38.913  9477  9477 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
05-16 11:08:38.913  9477  9477 F DEBUG   :     x0  0000000000000000  x1  00000000000024ed  x2  0000000000000006  x3  0000007fdcbf0850
05-16 11:08:38.913  9477  9477 F DEBUG   :     x4  0000007561d2acb0  x5  0000007561d2acb0  x6  0000007561d2acb0  x7  00000000acd979ce
05-16 11:08:38.913  9477  9477 F DEBUG   :     x8  00000000000000f0  x9  000000787c2caa00  x10 0000000000000001  x11 000000787c308dd4
05-16 11:08:38.913  9477  9477 F DEBUG   :     x12 0000007fdcbf05a9  x13 000000761c2f45de  x14 00000000fffffff2  x15 0000007fdcbf0688
05-16 11:08:38.913  9477  9477 F DEBUG   :     x16 000000787c36dd58  x17 000000787c34ac40  x18 00000078a1444000  x19 00000000000024ed
05-16 11:08:38.913  9477  9477 F DEBUG   :     x20 00000000000024ed  x21 00000000ffffffff  x22 0000000000000000  x23 00000075651f7940
05-16 11:08:38.913  9477  9477 F DEBUG   :     x24 0000007fdcbf0ad0  x25 0000007fdcbf192c  x26 00000078a04a4000  x27 0000007fdcbf1930
05-16 11:08:38.913  9477  9477 F DEBUG   :     x28 0000000000000021  x29 0000007fdcbf08d0
05-16 11:08:38.913  9477  9477 F DEBUG   :     lr  000000787c2fa958  sp  0000007fdcbf0830  pc  000000787c2fa984  pst 0000000000000000
05-16 11:08:38.913  9477  9477 F DEBUG   : backtrace:
05-16 11:08:38.913  9477  9477 F DEBUG   :       #00 pc 0000000000051984  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: f73b4091a9c819a21763f5bf11b53c2b)
05-16 11:08:38.913  9477  9477 F DEBUG   :       #01 pc 00000000033ba694  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::sys::pal::unix::abort_internal::h620684cc5bcd2810+8)
05-16 11:08:38.913  9477  9477 F DEBUG   :       #02 pc 00000000033b6738  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::panicking::rust_panic_with_hook::h20801d2428109702+848)
05-16 11:08:38.913  9477  9477 F DEBUG   :       #03 pc 00000000033b6384  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::hed7d101443a534c9+100)
05-16 11:08:38.913  9477  9477 F DEBUG   :       #04 pc 00000000033b5268  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::sys_common::backtrace::__rust_end_short_backtrace::hb60fcecf32d798a6+8)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #05 pc 00000000033b6124  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (rust_begin_unwind+48)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #06 pc 00000000033cebf0  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (core::panicking::panic_nounwind_fmt::h0d67e24e15263edd+64)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #07 pc 00000000033cec68  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (core::panicking::panic_nounwind::hbcf1844d6d471664+56)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #08 pc 0000000002b3d128  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (core::slice::raw::from_raw_parts::precondition_check::h2580f83db5ab9ab3+244)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #09 pc 0000000002b3d018  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (core::slice::raw::from_raw_parts::hf231433c1ac6d79a+48)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #10 pc 00000000020ecbac  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (android_activity::activity_impl::glue::WaitableNativeActivityState::new::hadba6ba3a8442d08+112)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #11 pc 00000000020eb4ac  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (android_activity::activity_impl::glue::NativeActivityGlue::new::h7ff2b13c9d62a74d+40)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #12 pc 00000000020f4d60  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (android_activity::activity_impl::glue::ANativeActivity_onCreate::_$u7b$$u7b$closure$u7d$$u7d$::h006a3e5467ee8dde+132)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #13 pc 00000000020ff850  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (_$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h1061b502adee8999+32)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #14 pc 00000000020f921c  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::panicking::try::do_call::hd961fc047fa43819+64)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #15 pc 00000000020fa680  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (__rust_try+24)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #16 pc 00000000020f879c  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::panicking::try::hefb4e2d8cfca80d1+68)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #17 pc 00000000020fb228  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (std::panic::catch_unwind::h14229a86eac6119f+4)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #18 pc 00000000020ff234  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (android_activity::util::abort_on_panic::hfdab7bdf4fc84b4a+32)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #19 pc 00000000020f4ccc  /data/app/~~kfmG1l2O2FXR4uKhVo4cEA==/com.damus.app-TwUXMw0BfzDGJwf84kHHKw==/lib/arm64/libnotedeck.so (ANativeActivity_onCreate+48)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #20 pc 00000000000dc92c  /system/lib64/libandroid_runtime.so (android::loadNativeCode_native(_JNIEnv*, _jobject*, _jstring*, _jstring*, _jobject*, _jstring*, _jstring*, _jstring*, int, _jobject*, _jbyteArray*, _jobject*, _jstring*)+1924) (BuildId: e107ae8386843b3ff7c3a843928f899b)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #21 pc 00000000001baf24  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+292) (BuildId: bbab0794125b3ac115a30e969e4f22de3a3b2a32)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #22 pc 000000000020a9d8  /apex/com.android.art/lib64/libart.so (nterp_helper+5848) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #23 pc 0000000000227b9a  /system/framework/framework.jar (android.app.NativeActivity.onCreate+394)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #24 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #25 pc 00000000001bbb3e  /system/framework/framework.jar (android.app.Activity.performCreate+186)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #26 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #27 pc 00000000001bba6a  /system/framework/framework.jar (android.app.Activity.performCreate+2)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #28 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #29 pc 000000000021dade  /system/framework/framework.jar (android.app.Instrumentation.callActivityOnCreate+6)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #30 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #31 pc 00000000001ab114  /system/framework/framework.jar (android.app.ActivityThread.performLaunchActivity+792)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #32 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #33 pc 00000000001aad82  /system/framework/framework.jar (android.app.ActivityThread.handleLaunchActivity+98)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #34 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #35 pc 00000000002a76d8  /system/framework/framework.jar (android.app.servertransaction.LaunchActivityItem.execute+168)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #36 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #37 pc 00000000002a9f98  /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.executeCallbacks+168)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #38 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #39 pc 00000000002a9ec8  /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.execute+152)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #40 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #41 pc 00000000001aa02e  /system/framework/framework.jar (android.app.ActivityThread$H.handleMessage+278)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #42 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #43 pc 0000000000467b1e  /system/framework/framework.jar (android.os.Handler.dispatchMessage+38)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #44 pc 000000000020a254  /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #45 pc 0000000000489a44  /system/framework/framework.jar (android.os.Looper.loopOnce+324)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #46 pc 0000000000209334  /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #47 pc 000000000048a03a  /system/framework/framework.jar (android.os.Looper.loop+162)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #48 pc 0000000000209334  /apex/com.android.art/lib64/libart.so (nterp_helper+52) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #49 pc 00000000001b4338  /system/framework/framework.jar (android.app.ActivityThread.main+200)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #50 pc 0000000000210c00  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+576) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #51 pc 0000000000279790  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+236) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #52 pc 0000000000602780  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1396) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #53 pc 0000000000584158  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #54 pc 0000000000098148  /system/framework/arm64/boot.oat (art_jni_trampoline+120) (BuildId: 92c3edca9b2db78441b99fc40084dcac0121a9dd)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #55 pc 000000000020a2b0  /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #56 pc 00000000003ef656  /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #57 pc 00000000007cc5dc  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3148) (BuildId: bbab0794125b3ac115a30e969e4f22de3a3b2a32)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #58 pc 0000000000210c00  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+576) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #59 pc 0000000000279790  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+236) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #60 pc 0000000000602ed8  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #61 pc 0000000000603394  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #62 pc 00000000004f0f6c  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+596) (BuildId: 0c537e5efe426a30e9fde84241db9e3e)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #63 pc 00000000000bcad0  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: e107ae8386843b3ff7c3a843928f899b)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #64 pc 00000000000c85c4  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+840) (BuildId: e107ae8386843b3ff7c3a843928f899b)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #65 pc 0000000000002554  /system/bin/app_process64 (main+1280) (BuildId: 094580f53da62691fcd1d29c5f6dde69)
05-16 11:08:38.914  9477  9477 F DEBUG   :       #66 pc 000000000004a1f4  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: f73b4091a9c819a21763f5bf11b53c2b)

@jb55
Copy link
Contributor

jb55 commented May 16, 2024

I'm surprised by the sheer number of issues you are running into. this builds on my macbook, nixos desktop with gpu, nixos laptop with intel, and 2 different android phones. I only have run into issues with 32-bit android systems:

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