0

Error Sink

asked 2014-07-01 18:53:10 -0700

Yossi Setiawan gravatar image

updated 2014-07-04 00:37:14 -0700

Hi.. i'll ask about alljoyn audio sink i use windows 7 and i build my library. I get the following error:

**** Build of configuration Default for project AllJoynAudioSink ****

C:\cygwin\home\android-ndk\ndk-build.cmd all 
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml    
Android NDK: WARNING:jni/Android.mk:AllJoynAudioSink: non-system libraries in linker flags: C:/cygwin/home/android-ndk/alljoyn/audio/cpp/lib/liballjoyn_audio.a C:/cygwin/home/android-ndk/alljoyn/about/lib/liballjoyn_about.a -lajrouter -lalljoyn -lssl -lcrypto -lgcc -lgnustl_static    
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES    
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the    
Android NDK:     current module    
[armeabi] Compile++ arm  : AllJoynAudioSink <= AndroidJNIBridge.cc
[armeabi] Compile++ arm  : AllJoynAudioSink <= MyAllJoynListeners.cc
[armeabi] Compile++ arm  : AllJoynAudioSink <= MyAllJoynCode.cc
[armeabi] StaticLibrary  : libstdc++.a
[armeabi] SharedLibrary  : libAllJoynAudioSink.so
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lssl
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: error: cannot find -lcrypto
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/cygwin/home/android-ndk/alljoyn/audio/cpp/lib/liballjoyn_audio.a(StreamObject.o): in function vtable for ajn::services::StreamObject:StreamObject.cc(.data.rel.ro+0x1c): error: undefined reference to 'ajn::BusObject::GenerateIntrospection(char const*, bool, unsigned int) const'
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/cygwin/home/android-ndk/alljoyn/audio/cpp/lib/liballjoyn_audio.a(StreamObject.o): in function vtable for ajn::services::StreamObject:StreamObject.cc(.data.rel.ro+0x38): error: undefined reference to 'ajn::BusObject::IntrospectWithDescription(ajn::InterfaceDescription::Member const*, qcc::ManagedObj<ajn::_Message>&)'
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/cygwin/home/android-ndk/alljoyn/audio/cpp/lib/liballjoyn_audio.a(StreamObject.o): in function vtable for ajn::services::StreamObject:StreamObject.cc(.data.rel.ro+0x3c): error: undefined reference to 'ajn::BusObject::GetDescriptionLanguages(ajn::InterfaceDescription::Member const*, qcc::ManagedObj<ajn::_Message>&)'
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/cygwin/home/android-ndk/alljoyn/audio/cpp/lib/liballjoyn_audio.a(AudioSinkObject.o): in function vtable for ajn::services::AudioSinkObject:AudioSinkObject.cc(.data.rel.ro+0x1c): error: undefined reference to 'ajn::BusObject::GenerateIntrospection(char const*, bool, unsigned int) const'
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/cygwin/home/android-ndk/alljoyn/audio/cpp/lib/liballjoyn_audio.a(AudioSinkObject.o): in function vtable for ajn::services::AudioSinkObject:AudioSinkObject.cc(.data.rel.ro+0x38): error: undefined reference to 'ajn::BusObject::IntrospectWithDescription(ajn::InterfaceDescription::Member const*, qcc::ManagedObj<ajn::_Message>&)'
C:/cygwin/home/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/cygwin ...
(more)
edit retag flag offensive close merge delete

Comments

You are getting a linker error. The linker is unable to find libcrypto.so and libssl.so (AllJoyn depends on these). For Android, you would need to provide them separately (i.e. OpenSSL related libraries are not part of AllJoyn Android SDK).

praveenb ( 2014-07-04 08:19:00 -0700 )edit

where can i download OpenSSL libraries and how to setting to android_project? Thanks praveenb :)

Yossi Setiawan ( 2014-07-06 21:37:24 -0700 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-07-07 05:08:22 -0700

amit.nishry gravatar image

updated 2014-07-07 05:11:35 -0700

Hi Yossi,

You need the get libssl.so and libcrypto.so from your Android phone.

See 2.3 Pull libraries from an Android device at the doc: Getting Started with the AllJoyn Audio Service Framework 1.0 (Android)

Complete the following steps to compile against the libraries in Android when using the NDK with Android. This enables the ability to compile an AllJoyn application using the NDK.

  1. Connect the Android device to your computer.
  2. Open a terminal window and navigate to the AllJoyn SDK's cpp/lib folder.
  3. Execute the following commands:

$ adb pull /system/lib/libssl.so .

$ adb pull /system/lib/libcrypto.so .

edit flag offensive delete publish link more
0

answered 2014-07-08 02:00:34 -0700

Yossi Setiawan gravatar image

updated 2014-07-16 18:50:45 -0700

Hi Amit Nishry, Thanks for tutorial. i'm can build this sink.

Regards, -Yossi Setiawan-

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-07-01 18:53:10 -0700

Seen: 380 times

Last updated: Jul 16 '14