undefined symbols when building and linking "fluoride system/bt" in master branch

82 views
Skip to first unread message

minjun

unread,
Apr 8, 2017, 11:57:31 AM4/8/17
to Android Building, fen....@sonymobile.com

Hi all and Wang Feng,

Sorry to bother you.

These days, following the instructions in https://android.googlesource.com/platform/system/bt/, I am trying to build the new android bluetooth stack "fluoride" for Linux.

Near the end, some strange error message shows up:


FAILED: stack_unittests
clang++ -Wl,--gc-sections -stdlib=libc++ -o stack_unittests -Wl,--start-group @stack_unittests.rsp  -Wl,--end-group -ldl -lpthread -lresolv -lrt -lz -latomic -levent -levent_core
obj/stack/libstack.a(libstack.a2dp_vendor_ldac_encoder.o): In function `A2DP_VendorLoadEncoderLdac()':
/home/minjun/Code/fluoride/bt/out/Default/../../stack/a2dp/a2dp_vendor_ldac_encoder.cc:243: undefined reference to `A2DP_VendorLoadLdacAbr()'
obj/stack/libstack.a(libstack.a2dp_vendor_ldac_encoder.o): In function `a2dp_vendor_ldac_encoder_update(unsigned short, A2dpCodecConfig*, bool*, bool*, bool*)':
/home/minjun/Code/fluoride/bt/out/Default/../../stack/a2dp/a2dp_vendor_ldac_encoder.cc:431: undefined reference to `a2dp_ldac_abr_get_handle()'
/home/minjun/Code/fluoride/bt/out/Default/../../stack/a2dp/a2dp_vendor_ldac_encoder.cc:434: undefined reference to `a2dp_ldac_abr_init(_ldacbt_abr_param*, unsigned int)'
/home/minjun/Code/fluoride/bt/out/Default/../../stack/a2dp/a2dp_vendor_ldac_encoder.cc:452: undefined reference to `a2dp_ldac_abr_free_handle(_ldacbt_abr_param*)'
libldacBT_abr.so: undefined reference to `ldacBT_get_eqmid'
libldacBT_abr.so: undefined reference to `ldacBT_alter_eqmid_priority'
obj/stack/libstack.a(libstack.a2dp_vendor_ldac_encoder.o): undefined reference to `a2dp_ldac_abr_proc(_st_ldacbt_handle*, _ldacbt_abr_param*, unsigned long, unsigned int)'
/usr/bin/ld generated: undefined reference to `a2dp_ldac_abr_init(_ldacbt_abr_param*, unsigned int)'
/usr/bin/ld generated: undefined reference to `a2dp_ldac_abr_free_handle(_ldacbt_abr_param*)'
/usr/bin/ld generated: undefined reference to `A2DP_VendorLoadLdacAbr()'
/usr/bin/ld generated: undefined reference to `a2dp_ldac_abr_get_handle()'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.


From the error message, we can see  clang++ cannot find these symbols: "ldacBT_get_eqmid", "ldacBT_alter_eqmid_priority" when trying to generate libldacBT_abr.so, I tried to find the definitions/declarations in the source code files; however, they are missing; what I can find are strings, which are located in

stack/a2dp/a2dp_vendor_ldac_encoder.cc:82:static const char* LDAC_GET_EQMID_NAME = "ldacBT_get_eqmid";

and

stack/a2dp/a2dp_vendor_ldac_encoder.cc:78:    "ldacBT_alter_eqmid_priority";

I cannot find any traces of them in any object files, either. 

Can you help me to see where is wrong from my instructions?  Or, can you tell me how to disable the libldac module for the bluetooth stack? What I want is the BLE part,  actually.

Thank you very much!

Best regards,
Minjun XI
Reply all
Reply to author
Forward
0 new messages