문제 설명
armv7‑linux‑androideabi 대상에서 Rust 라이브러리 충돌 (Rust library crashing on target armv7‑linux‑androideabi)
내 Dart/Flutter 애플리케이션용 코드는 성능 집약적인 기본 동적 .so 라이브러리와 통신합니다. 라이브러리는 Rust로 작성되었습니다. aarch64‑linux‑android
및 x86_64‑linux‑android
대상과 잘 작동합니다. 대상 armv7‑linux‑androideabi
로 실행하면 다음 줄(Dart Code)이 충돌합니다.
final dylib = DynamicLibrary.open("libmyimportantlib.so");
다음은 오류 메시지입니다. 라이브러리의 코드가 실행되지 않습니다. 충돌은 로드되자마자(또는 로드를 시도) 발생합니다.
F/libc ( 7651): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 7742 (DartWorker)
다른 모든 대상에서는 작동하지만 armv7‑linux‑androideabi
에서는 작동하지 않는 이유를 알려줄 수 있는 사람이 있습니까?
참조 솔루션
방법 1:
I fixed the problem by downgrading the NDK version from 21 to 19. Apparently there is a problem with libc
in the armv7‑linux‑androideabi
target for version 20 and up.
(by stevenkucera、stevenkucera)