0

Undefined Reference in Building Alljoyn Audio for Android

asked 2014-04-09 04:02:37 -0700

AAudio gravatar image

updated 2014-04-09 04:04:23 -0700

Hi

I am having trouble building Alljoyn audio service for Android from source, I've followed the steps and have successfully compiled the Android source (ver 4.4.2 build_ID KOT49H) all according to the documents and I am stuck where it cannot define the reference to some c code as shown below during my build of Alljoyn Audio for Android. My goal is to get all the library to run the audio sample for Android. The .so file you will use in the armeabi folder of the eclipse project.

 # Summary Version
    /lib/libcrypto.so: error: undefined reference to '__strlen_chk'
    /lib/libcrypto.so: error: undefined reference to '__strrchr_chk'
    /lib/libcrypto.so: error: undefined reference to '__strchr_chk'
    /lib/libcrypto.so: error: undefined reference to '__sprintf_chk'
    /lib/libcrypto.so: error: undefined reference to '__strcat_chk'

I've pulled the libcrypto.so and libssl.so from an android phone that's running the same android version as the one i am trying to build Alljoyn for. I've ran the following and was unsure where exactly to place the pulled file. Is there an exact path of where I would be putting them or how I can properly link them.

cd <alljoyn_dir>/lib
adb pull /system/lib/libcrypto.so libcrypto.so

I am building the Alljoyn Audio for Android using the following command, using the latest r9d NDK , and SDK with adt.

scons OS=android CPU=arm BINDINGS=core,cpp,java ANDROID_NDK=/home/george/Downloads/adt-bundle-linux-x86/sdk/android-ndk-r9d ANDROID_SRC=/home/george/android WS=off ANDROID_SDK=/home/george/Downloads/adt-bundle-linux-x86/sdk

The full error message

#Full Message
    [LINK]    alljoyn_core/build/android/arm/debug/obj/router/posix/alljoyn-daemon
    /home/george/Downloads/adt-bundle-linux-x86/sdk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/george/android/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strlen_chk'
    /home/george/Downloads/adt-bundle-linux-x86/sdk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/george/android/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strrchr_chk'
    /home/george/Downloads/adt-bundle-linux-x86/sdk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/george/android/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strchr_chk'
    /home/george/Downloads/adt-bundle-linux-x86/sdk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/george/android/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__sprintf_chk'
    /home/george/Downloads/adt-bundle-linux-x86/sdk/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: /home/george/android/out/target/product/generic/system/lib/libcrypto.so: error: undefined reference to '__strcat_chk'

I've done what bspener had suggested in his post https://allseenalliance.org/developer-resources/forum/developers/how-can-i-download-alljoyn-audio-sdk-10-android already.

Greatly Appreciate any help

Thanks, George

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-09 09:55:07 -0700

stevek gravatar image

updated 2014-07-25 09:19:59 -0700

This is a known issue ( https://jira.allseenalliance.org/browse/ASACORE-370 ). The AllJoyn build process for Android links against libc.so from the Android NDK. Starting with KitKat, there seems to be a difference between libc in the NDK and libc in the Android source. The SConscript files for Android need to be modified so that it links against the libc in the source rather than the NDK.

If you can, we suggest using the Gingerbread sources for building AllJoyn. Your code should still work on KitKat.

EDIT - 2014-07-25: Added link to Jira ticket

edit flag offensive delete publish link more

Comments

Thanks, tried 2.3.3 and got into other trouble. Thanks again for the reply

AAudio ( 2014-04-13 12:00:10 -0700 )edit

Anyone has solved this problem

chunyeow ( 2014-07-24 23:19:47 -0700 )edit

@chunyeow - The problem is not fixed yet. I've added the Jira ticket to my answer for tracking.

stevek ( 2014-07-25 09:21:09 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-04-09 04:02:37 -0700

Seen: 1,056 times

Last updated: Jul 25 '14