How to include prebuilt shared library using Android.bp in Android Pie

358 views
Skip to first unread message

dhinesh kumar

unread,
Dec 13, 2018, 2:47:52 PM12/13/18
to android-porting
Hi,

My intention is to add a prebuilt shared library as vendor module and these headers are reference in multiple modules. 

I am facing errors:
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-nm: out/target/product/symbols/system/lib64/libmymodule.so: no symbols
prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-objcopy:out/target/product/obj/SHARED_LIBRARIES/libmymodule    _intermediates/stvhR4nj: can't add section '.gnu_debugdata': File in wrong format


This is my Android.bp file

//64 bit shared lib
// ============================================================
cc_prebuilt_library_shared {
    name: "libmymodule",
    owner: "mycomp",

    srcs: ["obj/libmymodule.so"],
    compile_multilib: "both",
    vendor_available: true,

    header_libs: ["libmymodule_headers"],
    export_header_lib_headers: ["libmymodule_headers"],
}

Any solution is helpful!!


Dimitrije Petrovic

unread,
Dec 24, 2018, 2:14:41 PM12/24/18
to android-porting
I am not sure, but to me it doesn't make any sence to add: 

compile_multilib: "both",

since you are adding a prebuilt 64bit library. There is no way to prebuild it into a 32bit and 64bit.
Reply all
Reply to author
Forward
0 new messages