Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

v1.2 build errors with Android NDK #305

Closed
ghost opened this issue Nov 3, 2017 · 39 comments
Closed

v1.2 build errors with Android NDK #305

ghost opened this issue Nov 3, 2017 · 39 comments

Comments

@ghost
Copy link

ghost commented Nov 3, 2017

Target: Android
EABI=All
PLATFORM_VERSION=15 (32 bit) & 21 (64 bit)
NDK_VERSION=15b

Files affected:
CapabilityAgents/AudioPlayer/src/AudioPlayer.cpp
CapabilityAgents/System/src/UserInactivityMonitor.cpp

I see the following error pattern in cases which are calling AddMember with type of std::chrono::duration_caststd::chrono::milliseconds. If you cast this type to (uint64_t) in all cases, it's happy. If there is a better solution on it's way - great, otherwise I can submit a PR.

/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/document.h:794:22: error: call to constructor of
  'rapidjson::GenericValue<rapidjson::UTF8<char>, 
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' is ambiguous
    GenericValue v(value);
                 ^ ~~~~~
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/pointer.h:674:37: note: in instantiation of function template specialization
  'rapidjson::GenericValue<rapidjson::UTF8<char>, 
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::operator=<long long>' requested here
        return Create(document) = value;
                                ^
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/CapabilityAgents/System/src/UserInactivityMonitor.cpp:126:28: note: in instantiation of function template specialization
  'rapidjson::GenericPointer<rapidjson::GenericValue<rapidjson::UTF8<char>, 
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >, rapidjson::CrtAllocator>::Set<long long,
  rapidjson::CrtAllocator>' requested here
Pointer(payloadKey, 1).Set(inactivityPayload, inactiveTime.count());
                       ^
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/document.h:634:14: note: candidate constructor
explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_() {
         ^
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/document.h:640:14: note: candidate constructor
explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_() {
         ^
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/document.h:646:14: note: candidate constructor
explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_() {
         ^
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/document.h:661:14: note: candidate constructor
explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_() {
         ^
/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/document.h:673:14: note: candidate constructor
explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = d; data_.f.flags = kNumberDoubleFlag; }
         ^
1 error generated.
@frozenberg
Copy link
Contributor

Hi @INRIX-joel-winarske,

Thanks for the feedback, we will investigate this issue!

@mradulan
Copy link
Contributor

mradulan commented Nov 3, 2017

what is the cmake command that you are using?

@ghost
Copy link
Author

ghost commented Nov 6, 2017

@mradulan

[ 19%] Building CXX object CapabilityAgents/AudioPlayer/src/CMakeFiles/AudioPlayer.dir/AudioPlayer.cpp.o
cd /home/joel/git/AVSD/build/CapabilityAgents/AudioPlayer/src && /opt/android-ndk-r15b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi --gcc-toolchain=/opt/android-ndk-r15b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/opt/android-ndk-r15b/sysroot -DACSDK_LOG_MODULE=audioplayer -DAudioPlayer_EXPORTS -DGSTREAMER_MEDIA_PLAYER -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/googletest-release-1.8.0/include -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/CapabilityAgents/AudioPlayer/include -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/CapabilityAgents/AudioPlayer/src -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/AVSCommon/AVS/include -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/AVSCommon/SDKInterfaces/include -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/AVSCommon/Utils/include -I/home/joel/git/AVSD/ThirdParty/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include -I/home/joel/git/AVSD/out/armv7/include -isystem /opt/android-ndk-r15b/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk-r15b/sources/android/support/include -isystem /opt/android-ndk-r15b/sources/cxx-stl/llvm-libc++abi/include -isystem /opt/android-ndk-r15b/sources/cxx-stl/llvm-libc++/include -isystem /opt/android-ndk-r15b/sources/android/support/include -isystem /opt/android-ndk-r15b/sources/cxx-stl/llvm-libc++abi/include -isystem /opt/android-ndk-r15b/sysroot/usr/include -isystem /opt/android-ndk-r15b/sysroot/usr/include/arm-linux-androideabi -isystem /opt/android-ndk-r15b/sysroot/usr/include/arm-linux-androideabi

The entire Alexa device stack (sqlite3, gtest, nghttp2, zlib, mbedtls or openssl, curl, portaudio, gstreamer, avs-device-sdk) builds fine and generates SampleApp if I apply the cast workarounds for the two files I mention.

@mradulan
Copy link
Contributor

mradulan commented Nov 6, 2017

We have tried cross compiling successfully with NDK 14b. The environment variables are:

export ANDROID_HOME=~/Library/Android/sdk
export AR=$ANDROID_HOME/toolchain/bin/arm-linux-androideabi-ar
export CC=$ANDROID_HOME/toolchain/bin/arm-linux-androideabi-clang
export CROSS_SYSROOT=$NDK_HOME/platforms/android-21/arch-arm
export CXX=$ANDROID_HOME/toolchain/bin/arm-linux-androideabi-clang++
export LD=$ANDROID_HOME/toolchain/bin/arm-linux-androideabi-ld
export LINK=$CXX
export NDK_HOME=$ANDROID_HOME/ndk-bundle
export PATH=$ANDROID_HOME/toolchain/bin:$PATH
export RANLIB=$ANDROID_HOME/toolchain/bin/arm-linux-androideabi-ranlib
export STRIP=$ANDROID_HOME/toolchain/bin/arm-linux-androideabi-strip
export SYSROOT=$NDK_HOME/platforms/android-21/arch-arm

And the cmake command is:
$ANDROID_HOME/cmake/3.x.x/bin/cmake
-DANDROID_ABI=armeabi-v7a
-DANDROID_NDK=$NDK_HOME
-DCMAKE_BUILD_TYPE=Debug
-DANDROID_NATIVE_API_LEVEL=21
-DANDROID_TOOLCHAIN=clang
-DANDROID_STL=c++_static
-DCURL_LIBRARY=Shared_libs/libcurl.so
-DCURL_INCLUDE_DIR=supporting_libraries
-DCMAKE_TOOLCHAIN_FILE=$NDK_HOME/build/cmake/android.toolchain.cmake
../alexa-client-sdk

You might have to add gstreamer and portaudio dependencies as well to this.

@ghost
Copy link
Author

ghost commented Nov 6, 2017

That's building with the Android Studio bundled NDK. What's the verbose build output? Perhaps it's as simple as a compiler flag.

@mradulan
Copy link
Contributor

mradulan commented Nov 6, 2017

yes with Android Studio bundled NDK. We do not have the build output currently as it was compiled few months back. Can you cross check your cmake options with the ones that I have listed?

@ghost
Copy link
Author

ghost commented Nov 6, 2017

It's a newer version of NDK than what I'm using. I generally only use the Studio NDK for simple libraries. I'll take a closer look at what you provided and get back to you. Thanks.

@mradulan
Copy link
Contributor

mradulan commented Nov 6, 2017

there were some problems on other versions of NDK, so if can you try with NDK 14b

@jwinarske
Copy link

jwinarske commented Nov 7, 2017

For now I'm sticking with 15b and patching the cast in my build script. This makes lots of things easier for me, and I can still single step the C/C++ libraries via Studio. I have portaudio working on target via OpenSLES, I just need to sort out the gstreamer issues I'm seeing. Were the >14b issues related to build or runtime?

@mradulan
Copy link
Contributor

mradulan commented Nov 7, 2017

issues were build time

@jwinarske
Copy link

Cool thanks

@mradulan
Copy link
Contributor

mradulan commented Nov 8, 2017

Hi @jwinarske , can you share the cmake command or CMakefile that you used for cross compiling? It will help us improve our build for android.

@ghost
Copy link
Author

ghost commented Nov 9, 2017

Hi Mradula you can have your PM contact me.

@scotthea-amazon
Copy link
Contributor

Hello INRIX-joel-winarske,

Did our PM get in contact with you? If not, and you still want to get in touch, please fill out this Contact Form and we will get in touch with you.

If this is no longer an issue, please feel free to close this issue.

Thank you,
-SWH

@jie714
Copy link

jie714 commented Mar 2, 2018

Hi INRIX-joel-winarske,

We have problems when using NDKr14b build AVS SDK 1.4 for Android 6.0
Can our PM contact you for more detail information?

Jack

@madhuravulapalli
Copy link

Hello INRIX-joel-winarske,
Are successfully able to build the AVS SDK with Android NDK ? I am new Android NDK build process, how to build the AVS sdk with Android NDK. can you please provide the instructions how to do it?

@ghost
Copy link
Author

ghost commented Mar 9, 2018 via email

@jie714
Copy link

jie714 commented Mar 10, 2018

Hi Joel,

What type of c++ library you use, gnustl or llvm-libc++?
Do you build sdk also include WakeWordEngine(Kitt.ai or Sensory)?

Jack

@ghost
Copy link
Author

ghost commented Mar 12, 2018 via email

@jie714
Copy link

jie714 commented Mar 13, 2018

Hi Joel,

I changed ndk to r16 with libc++_shared library, I also build without WakeWordEngine,
When I run SampleApp, it will appear below error,

WARNING: linker: SampleApp: unused DT entry: type 0x1d arg 0x2707e
WARNING: linker: /system/lib/libDefaultClient.so: unused DT entry: type 0x1d arg 0x165d0
WARNING: linker: /system/lib/libAuthDelegate.so: unused DT entry: type 0x1d arg 0xcd1f
WARNING: linker: /system/lib/libMediaPlayer.so: unused DT entry: type 0x1d arg 0x24638
WARNING: linker: /system/lib/libAIP.so: unused DT entry: type 0x1d arg 0x19fa3
WARNING: linker: /system/lib/libADSL.so: unused DT entry: type 0x1d arg 0x11e68
WARNING: linker: /system/lib/libAFML.so: unused DT entry: type 0x1d arg 0x990a
WARNING: linker: /system/lib/libAlerts.so: unused DT entry: type 0x1d arg 0x34652
WARNING: linker: /system/lib/libCertifiedSender.so: unused DT entry: type 0x1d arg 0xb92a
WARNING: linker: /system/lib/libNotifications.so: unused DT entry: type 0x1d arg 0x1b132
WARNING: linker: /system/lib/libAudioResources.so: unused DT entry: type 0x1d arg 0x3f9a
WARNING: linker: /system/lib/libPlaybackController.so: unused DT entry: type 0x1d arg 0xa117
WARNING: linker: /system/lib/libSpeakerManager.so: unused DT entry: type 0x1d arg 0x16ded
WARNING: linker: /system/lib/libSpeechSynthesizer.so: unused DT entry: type 0x1d arg 0x1b69c
WARNING: linker: /system/lib/libSettings.so: unused DT entry: type 0x1d arg 0x15d55
WARNING: linker: /system/lib/libSQLiteStorage.so: unused DT entry: type 0x1d arg 0x433f
WARNING: linker: /system/lib/libTemplateRuntime.so: unused DT entry: type 0x1d arg 0x1179c
WARNING: linker: /system/lib/libAudioPlayer.so: unused DT entry: type 0x1d arg 0x1c9ca
WARNING: linker: /system/lib/libExternalMediaPlayer.so: unused DT entry: type 0x1d arg 0x206cc
WARNING: linker: /system/lib/libAVSSystem.so: unused DT entry: type 0x1d arg 0x193f4
WARNING: linker: /system/lib/libACL.so: unused DT entry: type 0x1d arg 0x34cf2
WARNING: linker: /system/lib/libContextManager.so: unused DT entry: type 0x1d arg 0xf700
WARNING: linker: /system/lib/libPlaylistParser.so: unused DT entry: type 0x1d arg 0xe533
Segmentation fault

I use tombstone to check log as below:
DEBUG : pid: 31281, tid: 31281, name: SampleApp >>> SampleApp <<<
03-13 11:17:55.214 2547 2547 E DEBUG : AM write failed: Broken pipe
03-13 11:17:55.214 2547 2547 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x111100
03-13 11:17:55.217 2547 2547 F DEBUG : r0 ffde31b0 r1 ffde31b0 r2 00111120 r3 0011110c
03-13 11:17:55.217 2547 2547 F DEBUG : r4 ffde36cc r5 f75274bc r6 f6f289c4 r7 00000001
03-13 11:17:55.217 2547 2547 F DEBUG : r8 f752e6ec r9 00000023 sl f6f289c4 fp ffde33c0
03-13 11:17:55.217 2547 2547 F DEBUG : ip f65c6c2c sp ffde30a0 lr f6484520 pc f64845f8 cpsr 60010010
03-13 11:17:55.229 2547 2547 F DEBUG :
03-13 11:17:55.229 2547 2547 F DEBUG : backtrace:
03-13 11:17:55.229 2547 2547 F DEBUG : #00 pc 0014e5f8 /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger13ThreadMonikerC1Ev+324)
03-13 11:17:55.229 2547 2547 F DEBUG : #1 pc 000ae57c /system/lib/libAVSCommon.so (__cxx_global_var_init+24)
03-13 11:17:55.229 2547 2547 F DEBUG : #2 pc 0014eec0 /system/lib/libAVSCommon.so (_ZTHN14alexaClientSDK9avsCommon5utils6logger13ThreadMoniker15m_threadMonikerE+72)
03-13 11:17:55.229 2547 2547 F DEBUG : #3 pc 0013ee20 /system/lib/libAVSCommon.so (_ZTWN14alexaClientSDK9avsCommon5utils6logger13ThreadMoniker15m_threadMonikerE+28)
03-13 11:17:55.229 2547 2547 F DEBUG : #4 pc 0013f40c /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger13ThreadMoniker20getThisThreadMonikerEv+8)
03-13 11:17:55.229 2547 2547 F DEBUG : #5 pc 0013eb44 /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger13ConsoleLoggerC1Ev+424)
03-13 11:17:55.229 2547 2547 F DEBUG : #6 pc 0013e688 /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger13ConsoleLogger8instanceEv+100)
03-13 11:17:55.229 2547 2547 F DEBUG : #7 pc 0013edfc /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger16getConsoleLoggerEv+8)
03-13 11:17:55.229 2547 2547 F DEBUG : #8 pc 0014a6d0 /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger17LoggerSinkManagerC1Ev+152)
03-13 11:17:55.230 2547 2547 F DEBUG : #9 pc 00149d40 /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger17LoggerSinkManager8instanceEv+72)
03-13 11:17:55.230 2547 2547 F DEBUG : #10 pc 0014e38c /system/lib/libAVSCommon.so (_ZN14alexaClientSDK9avsCommon5utils6logger12ModuleLoggerC1ERKNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEE+144)

It seems the problem happened in AVSCommon/Utils/src/Logger/ConsoleLogger.cpp:59
ThreadMoniker::getThisThreadMoniker().c_str(),
Do you have the same problem before?

Thanks.
Jack Ho

@ghost
Copy link
Author

ghost commented Mar 13, 2018 via email

@jie714
Copy link

jie714 commented Mar 14, 2018

Hi Joel,
Thank you for your reply, yes, I also put libc++_shared.so my lib folder,

Do you build avs sdk also use NDK generate standalone toolchain?
Do you also build alsa-lib for SampleApp?

Several Steps want confirm with you.

We use NDK16 generate standalone toolchain by below command:
make_standalone_toolchain.py --arch arm --api 21 --stl libc++ --install-dir /tmp/my-android-toolchain

And below is our build script:

CROSS_COMPILE=/home/jackho/arm_ndk_r16_libc/bin/arm-linux-androideabi-
export NDK_HOME=/home/jackho/android-ndk-r16b
export AR="$CROSS_COMPILE"ar
export CC="$CROSS_COMPILE"clang
export CROSS_SYSROOT=$NDK_HOME/platforms/android-23/arch-arm
export CXX="$CROSS_COMPILE"clang++
export LD="$CROSS_COMPILE"ld
export LINK=$CXX
export RANLIB="$CROSS_COMPILE"ranlib
export STRIP="$CROSS_COMPILE"strip
export SYSROOT=$NDK_HOME/platforms/android-21/arch-arm
export PKG_CONFIG_PATH=/home/jackho/AVS/armv7/lib/pkgconfig

#And the cmake command is:
cmake ../avs-device-sdk-1.5/
-DCMAKE_CXX_COMPILER=$CXX
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_PREFIX_PATH=/home/jackho/AVS/armv7/
-DKITTAI_KEY_WORD_DETECTOR=OFF
-DAMAZON_KEY_WORD_DETECTOR=OFF
-DSENSORY_KEY_WORD_DETECTOR=OFF
-DGSTREAMER_MEDIA_PLAYER=ON
-DPORTAUDIO=ON
-DPORTAUDIO_LIB_PATH=/home/jackho/AVS/avs-client-sdk/ext/lib/libportaudio.a
-DPORTAUDIO_INCLUDE_DIR=/home/jackho/AVS/avs-client-sdk/ext/include/
-DCURL_LIBRARY=/home/jackho/AVS/avs-client-sdk/ext/lib/libcurl.a
-DCURL_INCLUDE_DIR=/home/jackho/AVS/avs-client-sdk/ext/include/
-DSQLITE_INCLUDE_DIRS=/home/jackho/AVS/avs-client-sdk/ext/include/

Is there anything we miss to do?

Thank you.

Jack

@ghost
Copy link
Author

ghost commented Mar 14, 2018 via email

@jie714
Copy link

jie714 commented Mar 15, 2018

Hi joel,

Thanks, I follow your steps to build sdk, when I run SampleApp,
the WARNING message already disappear, but still Segmentation fault again,
I will trying to debug, maybe try to run on android Emulator first.
Anyway thank you reply so detail.

Jack

@hkayhere123
Copy link

Hi @mradulan @INRIX-joel-winarske @jwinarske ,

We had brought up AVS SDK for LInux using the setup guide.
We are currently trying to cross-compile the AVS-SDK for android.( Android Emulator x86_64) .
We create the toolchain (in case of x86_64) with this command:

./make-standalone-toolchain.sh --arch=x86_64 --platform=android-21 --stl=libc++ --install-dir=/home/Amazon_Alexa_SDK/sdk-folder/toolchain/x86_toolchain

We set the following environment variables -

cd /home/Amazon_Alexa_SDK/sdk-folder/sdk_croscompile/

export PATH=/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin:/home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib:$PATH
export TOOLCHAIN_PATH=/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin
export NDK_HOME=/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b
export TOOL=x86_64-linux-android
export TOOLCHAIN_BASENAME=${TOOLCHAIN_PATH}/${TOOL}
export CC="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target x86_64-none-linux-android -gcc-toolchain $TOOLCHAIN_PATH"
export CXX="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target x86_64-none-linux-android -gcc-toolchain $TOOLCHAIN_PATH"
export LINK=${CXX}
export LD=$TOOLCHAIN_BASENAME-ld
export AR=$TOOLCHAIN_BASENAME-ar
export RANLIB=$TOOLCHAIN_BASENAME-ranlib
export STRIP=$TOOLCHAIN_BASENAME-strip
export SYSROOT=$NDK_HOME/platforms/android-21/arch-x86_64
export PKG_CONFIG_PATH=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/lib/pkgconfig

And our cmake command is:

cmake -DANDROID_ABI=x86_64 -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++static -D__ANDROID_API_=21 -DCMAKE_INSTALL_PREFIX:PATH=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64 -DCMAKE_CXX_COMPILER=$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -DCMAKE_TOOLCHAIN_FILE=/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DGTEST_LIBRARY=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/lib/libgtest.a -DGTEST_MAIN_LIBRARY=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/lib/libgtest_main.a -DGTEST_INCLUDE_DIR=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/include -DGSTREAMER_MEDIA_PLAYER=ON -DAMAZON_KEY_WORD_DETECTOR=OFF -DKITTAI_KEY_WORD_DETECTOR=OFF -DSENSORY_KEY_WORD_DETECTOR=OFF -DCURL_LIBRARY=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/lib/libcurl.so -DCURL_INCLUDE_DIR=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/include -DPORTAUDIO=ON -DPORTAUDIO_INCLUDE_DIR=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/include -DPORTAUDIO_LIB_PATH=/home/Amazon_Alexa_SDK/sdk-folder/out/x86_64/lib/libportaudio.a /home/Amazon_Alexa_SDK/sdk-folder/sdk-source/avs-device-sdk

For Gstreamer, we used the GStreamer Android Universal Package binaries, we used https://gstreamer.freedesktop.org/data/pkg/android/1.14.1/ and put the corresponding x86_64 files into CMAKE_INSTALL_PREFIX path.

When trying to build SampleApp,
we have pasted a part of the error we are facing :
android@Android:~Amazon_Alexa_SDK/sdk-folder/sdk_croscompile$ make SampleApp
[ 0%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/AVSDirective.cpp.o
[ 0%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/AVSMessage.cpp.o
[ 0%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/AVSMessageHeader.cpp.o
[ 2%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/AbstractAVSConnectionManager.cpp.o
[ 2%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/ExternalMediaPlayer/AdapterUtils.cpp.o
[ 2%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/AlexaClientSDKInit.cpp.o
[ 2%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/Attachment/Attachment.cpp.o
[ 4%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/Attachment/AttachmentManager.cpp.o
[ 4%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/Attachment/AttachmentUtils.cpp.o
[ 4%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/Attachment/InProcessAttachment.cpp.o
[ 4%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/Attachment/InProcessAttachmentReader.cpp.o
[ 6%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/Attachment/InProcessAttachmentWriter.cpp.o
[ 6%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/CapabilityConfiguration.cpp.o
[ 6%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/CapabilityAgent.cpp.o
[ 6%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/DialogUXStateAggregator.cpp.o
[ 8%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/EventBuilder.cpp.o
[ 8%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/ExceptionEncounteredSender.cpp.o
[ 8%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/HandlerAndPolicy.cpp.o
[ 8%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/MessageRequest.cpp.o
[ 10%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/AVS/src/NamespaceAndName.cpp.o
[ 10%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Bluetooth/SDPRecords.cpp.o
[ 10%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/BluetoothEventBus.cpp.o
[ 10%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Configuration/ConfigurationNode.cpp.o
[ 12%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/DeviceInfo.cpp.o
[ 12%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Executor.cpp.o
[ 12%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/FileUtils.cpp.o
[ 12%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/FormattedAudioStreamAdapter.cpp.o
[ 14%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/JSONUtils.cpp.o
[ 14%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/CallbackData.cpp.o
[ 14%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/CurlEasyHandleWrapper.cpp.o
[ 14%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/CurlMultiHandleWrapper.cpp.o
[ 16%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/HTTPContentFetcherFactory.cpp.o
[ 16%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/HttpPost.cpp.o
[ 16%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/HttpPut.cpp.o
[ 18%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/HTTPResponse.cpp.o
[ 18%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/LibCurlHttpContentFetcher.cpp.o
[ 18%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/LibcurlUtils/LibcurlUtils.cpp.o
[ 18%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/ConsoleLogger.cpp.o
[ 20%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/Level.cpp.o
[ 20%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/LogEntry.cpp.o
[ 20%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/LogEntryBuffer.cpp.o
[ 20%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/LogEntryStream.cpp.o
[ 22%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/Logger.cpp.o
[ 22%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/LoggerSinkManager.cpp.o
[ 22%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/LoggerUtils.cpp.o
[ 22%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/LogStringFormatter.cpp.o
[ 24%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/ModuleLogger.cpp.o
[ 24%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Logger/ThreadMoniker.cpp.o
[ 24%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/MacAddressString.cpp.o
[ 24%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Metrics.cpp.o
[ 26%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Network/InternetConnectionMonitor.cpp.o
[ 26%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/RequiresShutdown.cpp.o
[ 26%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/RetryTimer.cpp.o
[ 26%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/SafeCTimeAccess.cpp.o
[ 28%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Stream/StreamFunctions.cpp.o
[ 28%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Stream/Streambuf.cpp.o
[ 28%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/StringUtils.cpp.o
[ 28%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/TaskQueue.cpp.o
[ 30%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/TaskThread.cpp.o
[ 30%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/TimePoint.cpp.o
[ 30%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/TimeUtils.cpp.o
[ 30%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/Timer.cpp.o
[ 32%] Building CXX object AVSCommon/CMakeFiles/AVSCommon.dir/Utils/src/UUIDGeneration.cpp.o
[ 32%] Linking CXX shared library libAVSCommon.so
[ 32%] Built target AVSCommon
[ 32%] Building CXX object Storage/SQLiteStorage/src/CMakeFiles/SQLiteStorage.dir/SQLiteDatabase.cpp.o
[ 34%] Building CXX object Storage/SQLiteStorage/src/CMakeFiles/SQLiteStorage.dir/SQLiteMiscStorage.cpp.o
[ 34%] Building CXX object Storage/SQLiteStorage/src/CMakeFiles/SQLiteStorage.dir/SQLiteStatement.cpp.o
[ 34%] Building CXX object Storage/SQLiteStorage/src/CMakeFiles/SQLiteStorage.dir/SQLiteUtils.cpp.o
[ 34%] Linking CXX shared library libSQLiteStorage.so
[ 34%] Built target SQLiteStorage
[ 34%] Building CXX object ThirdParty/googletest-release-1.8.0/googlemock/CMakeFiles/gmock.dir/__/googletest/src/gtest-all.cc.o
[ 34%] Building CXX object ThirdParty/googletest-release-1.8.0/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 34%] Linking CXX static library libgmock.a
[ 34%] Built target gmock
[ 36%] Building CXX object ThirdParty/googletest-release-1.8.0/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 36%] Linking CXX static library libgtest.a
[ 36%] Built target gtest
[ 36%] Building CXX object ACL/src/CMakeFiles/ACL.dir/AVSConnectionManager.cpp.o
[ 36%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/HTTP2Stream.cpp.o
[ 36%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/HTTP2StreamPool.cpp.o
[ 38%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/HTTP2Transport.cpp.o
[ 38%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/HTTP2TransportFactory.cpp.o
[ 38%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/MessageRouter.cpp.o
[ 38%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/MimeParser.cpp.o
[ 40%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/PostConnectSynchronizer.cpp.o
[ 40%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/PostConnectSynchronizerFactory.cpp.o
[ 40%] Building CXX object ACL/src/CMakeFiles/ACL.dir/Transport/TransportDefines.cpp.o
[ 40%] Linking CXX shared library libACL.so
[ 40%] Built target ACL
[ 40%] Building CXX object RegistrationManager/src/CMakeFiles/RegistrationManager.dir/RegistrationManager.cpp.o
[ 42%] Building CXX object RegistrationManager/src/CMakeFiles/RegistrationManager.dir/CustomerDataManager.cpp.o
[ 42%] Building CXX object RegistrationManager/src/CMakeFiles/RegistrationManager.dir/CustomerDataHandler.cpp.o
[ 42%] Linking CXX shared library libRegistrationManager.so
[ 42%] Built target RegistrationManager
[ 42%] Building CXX object Authorization/CBLAuthDelegate/src/CMakeFiles/CBLAuthDelegate.dir/CBLAuthDelegate.cpp.o
[ 44%] Building CXX object Authorization/CBLAuthDelegate/src/CMakeFiles/CBLAuthDelegate.dir/CBLAuthDelegateConfiguration.cpp.o
[ 44%] Building CXX object Authorization/CBLAuthDelegate/src/CMakeFiles/CBLAuthDelegate.dir/SQLiteCBLAuthDelegateStorage.cpp.o
[ 44%] Linking CXX shared library libCBLAuthDelegate.so
[ 44%] Built target CBLAuthDelegate
[ 44%] Building CXX object ADSL/src/CMakeFiles/ADSL.dir/DirectiveProcessor.cpp.o
[ 44%] Building CXX object ADSL/src/CMakeFiles/ADSL.dir/DirectiveRouter.cpp.o
[ 46%] Building CXX object ADSL/src/CMakeFiles/ADSL.dir/DirectiveSequencer.cpp.o
[ 46%] Building CXX object ADSL/src/CMakeFiles/ADSL.dir/MessageInterpreter.cpp.o
[ 46%] Linking CXX shared library libADSL.so
[ 46%] Built target ADSL
[ 46%] Building CXX object AFML/src/CMakeFiles/AFML.dir/AudioActivityTracker.cpp.o
[ 46%] Building CXX object AFML/src/CMakeFiles/AFML.dir/Channel.cpp.o
[ 46%] Building CXX object AFML/src/CMakeFiles/AFML.dir/FocusManager.cpp.o
[ 48%] Building CXX object AFML/src/CMakeFiles/AFML.dir/VisualActivityTracker.cpp.o
[ 48%] Linking CXX shared library libAFML.so
[ 48%] Built target AFML
Scanning dependencies of target CertifiedSender
[ 48%] Building CXX object CertifiedSender/src/CMakeFiles/CertifiedSender.dir/CertifiedSender.cpp.o
[ 50%] Building CXX object CertifiedSender/src/CMakeFiles/CertifiedSender.dir/SQLiteMessageStorage.cpp.o
[ 50%] Linking CXX shared library libCertifiedSender.so
[ 50%] Built target CertifiedSender
[ 50%] Building CXX object ContextManager/src/CMakeFiles/ContextManager.dir/ContextManager.cpp.o
[ 50%] Linking CXX shared library libContextManager.so
[ 50%] Built target ContextManager
Scanning dependencies of target Integration
[ 50%] Building CXX object Integration/src/CMakeFiles/Integration.dir/ACLTestContext.cpp.o
[ 50%] Building CXX object Integration/src/CMakeFiles/Integration.dir/AipStateObserver.cpp.o
[ 50%] Building CXX object Integration/src/CMakeFiles/Integration.dir/AuthDelegateTestContext.cpp.o
[ 52%] Building CXX object Integration/src/CMakeFiles/Integration.dir/AuthObserver.cpp.o
[ 52%] Building CXX object Integration/src/CMakeFiles/Integration.dir/ClientMessageHandler.cpp.o
[ 52%] Building CXX object Integration/src/CMakeFiles/Integration.dir/ConnectionStatusObserver.cpp.o
[ 52%] Building CXX object Integration/src/CMakeFiles/Integration.dir/ObservableMessageRequest.cpp.o
[ 54%] Building CXX object Integration/src/CMakeFiles/Integration.dir/SDKTestContext.cpp.o
[ 54%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestAlertObserver.cpp.o
[ 54%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestAuthDelegate.cpp.o
[ 54%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestCapabilityProvider.cpp.o
[ 56%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestDirectiveHandler.cpp.o
[ 56%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestExceptionEncounteredSender.cpp.o
[ 56%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestHttpPut.cpp.o
[ 56%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestMediaPlayer.cpp.o
[ 58%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestMessageSender.cpp.o
[ 58%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestMiscStorage.cpp.o
[ 58%] Building CXX object Integration/src/CMakeFiles/Integration.dir/TestSpeechSynthesizerObserver.cpp.o
[ 58%] Linking CXX static library libIntegration.a
[ 58%] Built target Integration
Scanning dependencies of target CapabilitiesDelegate
[ 58%] Building CXX object CapabilitiesDelegate/src/CMakeFiles/CapabilitiesDelegate.dir/CapabilitiesDelegate.cpp.o
[ 60%] Linking CXX shared library libCapabilitiesDelegate.so
[ 60%] Built target CapabilitiesDelegate
[ 60%] Building CXX object PlaylistParser/src/CMakeFiles/PlaylistParser.dir/PlaylistParser.cpp.o
[ 60%] Building CXX object PlaylistParser/src/CMakeFiles/PlaylistParser.dir/UrlContentToAttachmentConverter.cpp.o
[ 62%] Linking CXX shared library libPlaylistParser.so
[ 62%] Built target PlaylistParser
Scanning dependencies of target MediaPlayer
[ 62%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/AttachmentReaderSource.cpp.o
[ 62%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/BaseStreamSource.cpp.o
[ 64%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/ErrorTypeConversion.cpp.o
[ 64%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/IStreamSource.cpp.o
[ 64%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/MediaPlayer.cpp.o
[ 64%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/Normalizer.cpp.o
[ 66%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/OffsetManager.cpp.o
[ 66%] Linking CXX shared library libMediaPlayer.so
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lgstapp-1.0
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lgstbase-1.0
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lgstreamer-1.0
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lgobject-2.0
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lglib-2.0
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: cannot find -lintl

........

/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstapp-1.0.a(libgstapp_1.0_la-gstappsrc.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstapp-1.0.a(libgstapp_1.0_la-app-enumtypes.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstbase-1.0.a(libgstbase_1.0_la-gstbasesrc.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstbase-1.0.a(libgstbase_1.0_la-gstqueuearray.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gst.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstobject.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: warning: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstallocator.o): last entry in mergeable string section '.debug_str' not null terminated
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux

.......

/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol _gst_caps_type
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol g_log_domain_gstreamer
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol _gst_caps_features_memory_system_memory
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol _gst_caps_type
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol g_log_domain_gstreamer
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol _gst_caps_type
/home/Amazon_Alexa_SDK/sdk-folder/toolchain/android-ndk-r14b/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /home/slomo/Projects/gstreamer/cerbero/build/dist/android_universal/x86_64/lib/libgstreamer-1.0.a(libgstreamer_1.0_la-gstcaps.o): unsupported reloc 42 against global symbol g_log_domain_gstreamer

Could you help with this issue ?

@JLu76
Copy link

JLu76 commented Jul 3, 2018

Hello. I've followed the the Amazon devs' guide on building the SDK for Android and I've built it successfully, so now I'm trying to get the Sample app running on Android.

My main problem right now is getting CMake to find GStreamer. I've downloaded the Android Universal Package bins and have tried setting -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_TARGET}:/path/to/gst_armv7 and -DCMAKE_PREFIX_PATH:PATH=${INSTALL_TARGET}:/path/to/gst_armv7. How do I get CMake to find the gstreamer files?

@INRIX-joel-winarske, you mentioned that you installed the GStreamer Android Universal Package from source, but I can't find the source files anywhere. Do you happen to know where they're available? Thanks.

@preth-2018
Copy link

preth-2018 commented Jul 17, 2018

Hi @INRIX-joel-winarske @mradulan @jwinarske @jie714 @jwinarske
I'm trying to cross-compile AVS SDK for Android platform.
By referring the above posts I successfully compiled the AVS SDK and build all the dependencies as well.

NDK Version used:16b
Android Platform -26

As joel mentioned above, I copied the libs,executable and cert files to test device(android emulator).

I'm facing run time issues related to libc++_shared.so(this library is copied from the lib64 folder in my standalone toolchain ).

Please suggest a solution.

Below pasting my tombstone output.


Build fingerprint: 'Android/sdk_gphone_x86_64/generic_x86_64:8.0.0/OSR1.180418.003/4741120:userdebug/dev-keys'
Revision: '0'
ABI: 'x86_64'
pid: 5378, tid: 5378, name: SampleApp >>> ./SampleApp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7ffec6025f08
rax 00007336099a60b0 rbx 0000000000000090 rcx d6797bc98cb39434 rdx 00007336099a9600
rsi 000073360996aea0 rdi 000073360993bee0
r8 0000733609c25048 r9 0000000000000000 r10 fffffffffffff386 r11 0000000000000000
r12 00007ffec60264c8 r13 000073360a306de8 r14 0000000000000000 r15 00007ffec60263e8
cs 0000000000000033 ss 000000000000002b
rip 000073360993beea rbp 0000000000000000 rsp 00007ffec6025f10 eflags 0000000000010202

backtrace:
#00 pc 00000000000a6eea /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#1 pc 00000000000d60f2 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#2 pc 00000000000d6174 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#3 pc 00000000000d57a2 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#4 pc 00000000000a6e1a /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#5 pc 0000000000000000

stack:
........ ........
........ ........
#1 00007ffec6026350 0000000000000090
00007ffec6026358 000073360996b175 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#2 00007ffec6026360 0000000000000000
00007ffec6026368 000073360996a7a3 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#3 00007ffec6026370 0000000000000000
00007ffec6026378 0000733608ca713c [anon:.bss]
00007ffec6026380 0000733609973a77 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
00007ffec6026388 000073360993be1b /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
#4 00007ffec6026390 0000733608ca713c [anon:.bss]
00007ffec6026398 0000000000000000
#5 00007ffec60263a0 0000000000000000
00007ffec60263a8 0000003000000008
00007ffec60263b0 00007ffec60264c8
00007ffec60263b8 00007ffec60263e8
00007ffec60263c0 0000000000000000
00007ffec60263c8 0000003000000008
00007ffec60263d0 00007ffec60264c8
00007ffec60263d8 00007ffec60263e8
00007ffec60263e0 0000000000000000
00007ffec60263e8 0000000000000000
00007ffec60263f0 000073360996aea0 /data/data/com.example.teltvm2548.myapplication/files/lib/libc++_shared.so
00007ffec60263f8 00007336099a9600 [anon:.bss]
00007ffec6026400 d6797bc98cb39434
00007ffec6026408 0000733609c25048 [anon:linker_alloc_vector]
00007ffec6026410 0000000000000000
00007ffec6026418 0000000000000000
.......

Preth

@preth-2018
Copy link

@JLu76

I am using the gstreamer 1.8.2 files available from https://gstreamer.freedesktop.org/data/pkg/android.

unzip and copy all the libs and pkgconfig files to the folder where you installed other libraries(which is specified by CMAKE_INSTALL_PREFIX).If you have already installed dependencies there will be a pkgconfig folder in your CMAKE_INSTALL_PREFIX path. So while copying please merge the pkgconfig files from the gstreamer folder. That's what I did.
Hope this helps.

@pkalebu
Copy link

pkalebu commented Jul 18, 2018

@JLu76 could you please send me the dev guide on building the SDK for Android?

@preth-2018
Copy link

preth-2018 commented Aug 2, 2018

Hi @INRIX-joel-winarske @mradulan

Did you face any issue related to createConverter?
I used the gstreamer android universal but facing issue in mediaplayer.

Compilation and build is successfull.But at run time it's failing with the following issue.Could you please check it out?

2018-07-31 06:52:49.847 [ 1] 9 MediaPlayer:createCalled 2018-07-31 06:52:50.186 [ 1] E MediaPlayer:setupPipelineFailed:reason=createConverterElementFailed 2018-07-31 06:52:50.192 [ 1] E MediaPlayer:initPlayerFailed:reason=setupPipelineFailed 2018-07-31 06:52:50.194 [ 1] 9 MediaPlayer:~MediaPlayerCalled (SampleApp:4613): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed 2018-07-31 06:52:50.211 [ 1] 9 MediaPlayer:resetPipeline (SampleApp:4613): GLib-CRITICAL **: g_source_remove: assertion 'tag > 0' failed 2018-07-31 06:52:50.216 [ 1] E RequiresShutdown:~RequiresShutdownFailed:reason=notShutdown,name=SpeakMediaPlayer 2018-07-31 06:52:50.223 [ 1] C SampleApplication:Failed to create media player for speech! 2018-07-31 06:52:50.229 [ 1] C SampleApplication:Failed to initialize SampleApplication Failed to create to SampleApplication!

Note: Gstreamer binary is taken from https://gstreamer.freedesktop.org/pkg/android/

I have tried the 1.10.2 as well as 1.8.0 gstreamer binary version and for both the error is same.

Regards,
Preth

@rjajra
Copy link

rjajra commented Aug 23, 2018

Hi All,
I am able to build successfully for android armv7 target,
are you able to solve this runtime issue while running sample application?

ARNING: linker: libcurl.so: unused DT entry: type 0x6fffffff arg 0x1
2018-08-07 04:23:52.601 [ 1] I sdkVersion: 1.8.1
configFile /data/AlexaClientSDKConfig.json
Running app with log level: DEBUG9
2018-08-07 04:23:52.613 [ 1] E AlexaClientSdkInit:initializeFailed:reason=curlDoesNotSupportHTTP2
**2018-08-07 04:23:52.613 [ 1] 9 MediaPlayer:createCalled
2018-08-07 04:23:52.620 [ 1] E MediaPlayer:setupPipelineFailed:reason=createConverterElementFailed
2018-08-07 04:23:52.621 [ 1] E MediaPlayer:initPlayerFailed:reason=setupPipelineFailed
2018-08-07 04:23:52.621 [ 1] 9 MediaPlayer:~MediaPlayerCalled

(SampleApp:19907): GStreamer-CRITICAL : gst_object_unref: assertion 'object != NULL' failed
2018-08-07 04:23:52.621 [ 1] 9 MediaPlayer:resetPipeline
2018-08-07 04:23:52.621 [ 1] E
RequiresShutdown:~RequiresShutdownFailed:reason=notShutdown,name=SpeakMediaPlayer
2018-08-07 04:23:52.621 [ 1] C SampleApplication:Failed to create media player for speech!
2018-08-07 04:23:52.622 [ 1] C SampleApplication:Failed to initialize SampleApplication
Failed to create to SampleApplication!

Thanks

@jwinarske
Copy link

@rjajra To start you are not building curl correctly. I need to have HTTP2 support...
AlexaClientSdkInit:initializeFailed:reason=curlDoesNotSupportHTTP2

@jwinarske
Copy link

@preth-2018 When you build GStreamer and AVS client, they both need to use the same NDK, as well as the same API setting. So that the libs are linking to the same libraries that are present on the target. If you don't do this you will have lots of strange problems.

@jwinarske
Copy link

Take a look at the Alexa Auto SDK. They have a working sample there. It's far from commercial ready, but gets you up an running on Android... One key issue with this sample, is that your Android Studio NDK may be newer than that of the bitbake build system. So you may need to regress your Android Studio NDK to match.

@preth-2018
Copy link

@jwinarske

Thanks for replying Joel.

I tried the Auto SDK Sample Application and its working.

Regards,
Preth

@rjajra
Copy link

rjajra commented Aug 28, 2018

@jwinarske

AlexaClientSdkInit:initializeFailed:reason=curlDoesNotSupportHTTP2
After building curl with HTTP2 the above issue was solved

But still I was getting the below runtime issue eventhough all gstreamer plugins are cross compiled and installed.

==
**2018-08-28 03:23:52.613 [ 1] 9 MediaPlayer:createCalled
2018-08-28 03:23:52.620 [ 1] E MediaPlayer:setupPipelineFailed:reason=createConverterElementFailed
2018-08-28 04:23:52.621 [ 1] E MediaPlayer:initPlayerFailed:reason=setupPipelineFailed
2018-08-28 04:23:52.621 [ 1] 9 MediaPlayer:~MediaPlayerCalled

(SampleApp:19907): GStreamer-CRITICAL : gst_object_unref: assertion 'object != NULL' failed
2018-08-28 04:23:52.621 [ 1] 9 MediaPlayer:resetPipeline
2018-08-28 04:23:52.621 [ 1] E RequiresShutdown:~RequiresShutdownFailed:reason=notShutdown,name=SpeakMediaPlayer
2018-08-28 04:23:52.621 [ 1] C SampleApplication:Failed to create media player for speech!
2018-08-28 04:23:52.622 [ 1] C SampleApplication:Failed to initialize SampleApplication
Failed to create to SampleApplication!

Thanks

@preth-2018
Copy link

@rjajra

I was also facing the same issue(arm-v7a) .
I set GST_PLUGIN_PATH variable to the path where I had the Gstreamer plugin libs and this error was gone but some other error came.So I stopped there and changed to the Amazon Auto SDK for automotive.

You can refer this thread also .It might help.
#833

regards
preth

@rjajra
Copy link

rjajra commented Aug 28, 2018

@preth-2018

After setting GST_PLUGIN_PATH, I was getting "Bus Error"

export GST_PLUGIN_PATH_1_0=/data/gstplugins/usr/lib/gstreamer-1.0
export GST_PLUGIN_SYSTEM_PATH_1_0=/data/gstplugins/usr/lib/gstreamer-1.0
export GST_REGISTRY_1_0=/data/.cache/gstreamer-1.0/
export GST_PLUGIN_SCANNER=/data/gstplugins/usr/libexec/gstreamer-1.0/gst-plugin-scanner

===
SampleApp /data/AlexaClientSDKConfig.json DEBUG9
WARNING: linker: SampleApp: unused DT entry: type 0x6ffffffe arg 0x1415c
WARNING: linker: SampleApp: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAVSCommon.so: unused DT entry: type 0x6ffffffe arg 0x4a3dc
WARNING: linker: libAVSCommon.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libDefaultClient.so: unused DT entry: type 0x6ffffffe arg 0x1492c
WARNING: linker: libDefaultClient.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libCapabilitiesDelegate.so: unused DT entry: type 0x6ffffffe arg 0x14f08
WARNING: linker: libCapabilitiesDelegate.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libCBLAuthDelegate.so: unused DT entry: type 0x6ffffffe arg 0x13500
WARNING: linker: libCBLAuthDelegate.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libMediaPlayer.so: unused DT entry: type 0x6ffffffe arg 0x11c0c
WARNING: linker: libMediaPlayer.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libSQLiteStorage.so: unused DT entry: type 0x6ffffffe arg 0x6cfc
WARNING: linker: libSQLiteStorage.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libESP.so: unused DT entry: type 0x6ffffffe arg 0x16d4
WARNING: linker: libESP.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libRegistrationManager.so: unused DT entry: type 0x6ffffffe arg 0x44c8
WARNING: linker: libRegistrationManager.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAIP.so: unused DT entry: type 0x6ffffffe arg 0x19ca4
WARNING: linker: libAIP.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libCertifiedSender.so: unused DT entry: type 0x6ffffffe arg 0xbdbc
WARNING: linker: libCertifiedSender.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libBluetooth.so: unused DT entry: type 0x6ffffffe arg 0x21814
WARNING: linker: libBluetooth.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libNotifications.so: unused DT entry: type 0x6ffffffe arg 0x1c0b0
WARNING: linker: libNotifications.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libSettings.so: unused DT entry: type 0x6ffffffe arg 0x123ec
WARNING: linker: libSettings.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAlerts.so: unused DT entry: type 0x6ffffffe arg 0x33f3c
WARNING: linker: libAlerts.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAudioResources.so: unused DT entry: type 0x6ffffffe arg 0x52f0
WARNING: linker: libAudioResources.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAudioPlayer.so: unused DT entry: type 0x6ffffffe arg 0x1d508
WARNING: linker: libAudioPlayer.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libc++_shared.so: unused DT entry: type 0x6ffffffe arg 0x2ab10
WARNING: linker: libc++_shared.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libcurl-d.so: unused DT entry: type 0x6ffffffe arg 0x7250
WARNING: linker: libcurl-d.so: unused DT entry: type 0x6fffffff arg 0x1
WARNING: linker: libPlaybackController.so: unused DT entry: type 0x6ffffffe arg 0xb5f8
WARNING: linker: libPlaybackController.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libSpeakerManager.so: unused DT entry: type 0x6ffffffe arg 0x17514
WARNING: linker: libSpeakerManager.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libSpeechSynthesizer.so: unused DT entry: type 0x6ffffffe arg 0x1accc
WARNING: linker: libSpeechSynthesizer.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libTemplateRuntime.so: unused DT entry: type 0x6ffffffe arg 0x139f0
WARNING: linker: libTemplateRuntime.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libExternalMediaPlayer.so: unused DT entry: type 0x6ffffffe arg 0x16a5c
WARNING: linker: libExternalMediaPlayer.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAVSSystem.so: unused DT entry: type 0x6ffffffe arg 0x1b898
WARNING: linker: libAVSSystem.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libContextManager.so: unused DT entry: type 0x6ffffffe arg 0xf444
WARNING: linker: libContextManager.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libADSL.so: unused DT entry: type 0x6ffffffe arg 0xd0bc
WARNING: linker: libADSL.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libAFML.so: unused DT entry: type 0x6ffffffe arg 0x13c8c
WARNING: linker: libAFML.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libACL.so: unused DT entry: type 0x6ffffffe arg 0x1d458
WARNING: linker: libACL.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: libPlaylistParser.so: unused DT entry: type 0x6ffffffe arg 0xe12c
WARNING: linker: libPlaylistParser.so: unused DT entry: type 0x6fffffff arg 0x3
2018-08-28 08:46:54.437 [ 1] I sdkVersion: 1.8.1
Bus error

any help on this error?.

Thanks

@kameshkancherla
Copy link

Hi,

I am try for the same procedure to deploy AVS SDK on android Ore 8.1, running on resepaker. I followed this guide but I am not able to setup AVS SDK on android.

https://github.com/alexa/avs-device-sdk/wiki/Android-Quick-Start-Guide.

I have ubuntu and installed all the packages as per the procedure, I am not able to run shell and bash to install setup.sh config.txt and It says bash not found. I complied the code bash -x setup.sh config.txt after adb connected devices, script ran but it didnt install on the device but I got an error

Regards
Vithal

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests