Hello, android-building! I'm trying to build AOSP 13 for x86_64 Cuttlefish with ASan enabled. I downloaded the source code of android13-gsi branch and selected aosp_cf_x86_64_phone-userdebug target.
However, the following linking error occurred during the building: (Some logs were omitted to reduce the length, and here is the entire error message: https://www.dropbox.com/s/9qeeld4ouqjhu9s/full-log.txt) ``` [ 44% 6992/15631] //packages/modules/Bluetooth/android/app:libbluetooth_jni link libbluetooth_jni.so [apex33] FAILED: out/soong/.intermediates/packages/modules/Bluetooth/android/app/libbluetooth_jni/android_x86_64_silvermont_shared_asan_apex33/unstripped/libbluetooth_jni.so (long command was omitted) ld.lld: error: undefined symbol: grpc_call_unref >>> referenced by mod.rs:492 (external/rust/crates/grpcio/src/call/mod.rs:492) >>> libbt_shim_ffi.libbluetooth_rs.bluetooth_rs.be682fec-cgu.0.rcgu.o.rcgu.o:(core::ptr::drop_in_place::<grpcio::call::ShareCall>) in archive out/soong/.intermediates/packages/modules/Bluetooth/sys tem/gd/rust/shim/libbt_shim_ffi/android_x86_64_silvermont_static_asan_apex33/libbt_shim_ffi.a >>> referenced by mod.rs:492 (external/rust/crates/grpcio/src/call/mod.rs:492) >>> libbt_shim_ffi.libbluetooth_rs.bluetooth_rs.be682fec-cgu.0.rcgu.o.rcgu.o:(<alloc::sync::Arc<grpcio::task::executor::SpawnTask>>::drop_slow) in archive out/soong/.intermediates/packages/modules/ Bluetooth/system/gd/rust/shim/libbt_shim_ffi/android_x86_64_silvermont_static_asan_apex33/libbt_shim_ffi.a >>> referenced by mod.rs:492 (external/rust/crates/grpcio/src/call/mod.rs:492) >>> libbt_shim_ffi.libgrpcio.grpcio.86240d56-cgu.0.rcgu.o.rcgu.o:(core::ptr::drop_in_place::<grpcio::task::CallTag>) in archive out/soong/.intermediates/packages/modules/Bluetooth/system/gd/rust/sh im/libbt_shim_ffi/android_x86_64_silvermont_static_asan_apex33/libbt_shim_ffi.a >>> referenced 3 more times (several other similar errors were omitted (ld.lld: error: undefined symbol)) ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) clang-14: error: linker command failed with exit code 1 (use -v to see invocation) 22:07:17 ninja failed with: exit status 1 #### failed to build some targets (13:02 (mm:ss)) #### ``` To reproduce the build failure: ``` # Download the source code $ mkdir workspace $ cd workspace $ repo init -u https://android.googlesource.com/platform/manifest -b android13-gsi $ repo sync # Build without ASan - successful $ . build/envsetup.sh $ lunch aosp_cf_x86_64_phone-userdebug $ m # Build with ASan - the error occurs $ export SANITIZE_TARGET=address m ``` Instead of Cuttlefish, I also tried the traditional emulator with android-13.0.0_r7 branch and aosp_x86_64-eng target. However, the same ld.lld linking error occurred. Can I get suggestions for using ASan in Cuttlefish? Thanks! -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/6ec91c42-c344-44f4-81a9-a2aacc63115bn%40googlegroups.com.
