I am facing compilation issue "undefined symbol error issue" on gsi10 when calling HIDL getService method from system/bt modules of gsi-10. I have included my hsc_bt .so file i.e "vendor.hsc.hardware.hsc_bt@1.0" in Android.bp and my HAL is part of vendor. Below are the changes I have done in system/bt/btif/src/btif_config.cc to get HIDL service instance.
#include "vendor/fih/hardware/logi_bt/1.0/Ilogi_bt.h" using vendor::hsc::hardware::hsc_bt::V1_0::Ihsc_bt; android::sp<Ihsc_bt> btrestore; //Now calling in a method *btrestore = Ihsc_bt::getService(); ===>This line throwing the error* But this not the case with my own(hsc_bt) vendor HIDL , even its the same issue with AOSP existing HAL's I also tried to access existing HIDL* interface service = IStorage::getService(); *in *system/bt/btif/src/btif_config.cc* file and found same issue. Could you please help me with the issue, why I am facing compilation issues in this system/bt modules but it's working at other modules for ex. framework/base. Your help will be appreciated. I have been struggling to fix this for the last 3-4 days. *ERROR LOGS* out/soong/.intermediates/hardware/interfaces/keymaster/3.0/android.hardware.keymaster@3.0 /android_arm_armv8-a_core_shared/android.hardware.keymas...@3.0.so out/soong/.intermediates/hardware/interfaces/keymaster/4.0/support/libkeymaster4support/android_arm_armv8-a_core_shared/libkeymaster4support.so out/soong/.intermediates/system/security/keystore/libkeystore_aidl/android_arm_armv8-a_core_shared/libkeystore_aidl.so out/soong/.intermediates/system/security/keystore/libkeystore_binder/android_arm_armv8-a_core_shared/libkeystore_binder.so out/soong/.intermediates/system/security/keystore/libkeystore_parcelables/android_arm_armv8-a_core_shared/libkeystore_parcelables.so out/soong/.intermediates/external/libcxx/libc++/android_arm_armv8-a_core_shared/libc++.so out/soong/.intermediates/bionic/libc/libc/android_arm_armv8-a_core_shared_10000/libc.so out/soong/.intermediates/bionic/libm/libm/android_arm_armv8-a_core_shared_10000/libm.so out/soong/.intermediates/bionic/libdl/libdl/android_arm_armv8-a_core_shared_10000/libdl.so out/soong/.intermediates/bionic/libc/crtend_so/android_arm_armv8-a_core/obj/bionic/libc/arch-common/bionic/crtend_so.o -o out/soong/.intermediates/system/bt/main/libbluetooth/android_arm_armv8-a_core_shared/unstripped/libbluetooth.so -nostdlib -Wl,--gc-sections -shared -Wl,-soname,libbluetooth.so -target armv7a-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined-version -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_stripped.a -fuse-ld=lld -Wl,--pack-dyn-relocs=android+relr -Wl,--use-android-relr-tags -Wl,--no-undefined -Wl,--icf=safe -Wl,--hash-style=gnu -Wl,-m,armelf -Wl,-Bsymbolic,-Bsymbolic-functions -Wl,--exclude-libs,libunwind_llvm.a prebuilts/clang/host/linux-x86/clang-r353983c1/lib64/clang/9.0.3/lib/linux/libclang_rt.ubsan_minimal-arm-android.a -Wl,--exclude-libs,libclang_rt.ubsan_minimal-arm-android.a -Wl,--exclude-libs,libclang_rt.ubsan_minimal-arm-android.a ld.lld: error: undefined symbol: vendor::hsc::hardware::hsc_bt::V1_0::Ihsc_bt::getService(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) >>> referenced by btif_config.cc:218 (system/bt/btif/src/btif_config.cc:218) >>> btif_config.o:(init()) in archive out/soong/.intermediates/system/bt/btif/libbtif/android_arm_armv8-a_core_static/libbtif.a clang-9: error: linker command failed with exit code 1 (use -v to see invocation) 21:29:07 Got signal: interrupt 21:29:07 ninja failed with: exit status 130 Thanks, Sachin -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to android-building@googlegroups.com To unsubscribe from this group, send email to android-building+unsubscr...@googlegroups.com 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 android-building+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CA%2BYOsKJ9yTP98pAKQMni0wxkWaC%3DDJksXXGp5%3D2%2BbzvCETRRhg%40mail.gmail.com.