avs-device-sdk
avs-device-sdk copied to clipboard
Alexa SDK Install Using Script Won't Compile Successfully
I have attempted to install the latest version of the Alexa AVS SDK from the script recommended in the AVS web page. The build fails when linking the InMemoryCommunicationInvokeHandlerTest because of undefined references to __atomic_fetch_add_8, __atomic_store_8 and __atomic_load_8.
I do not know where the missing modules are located or how to modify the make file to access them. It is obviously a bug given that the install script (setup.sh) comes from Amazon.
I would have expected the setup script to have been successful in installing the SDK.
The following is a screen shot showing the error:
pi@raspberrypi:~ $ cd /home/pi pi@raspberrypi:~ $ sudo bash setup.sh config.json [-s 1234] PKCS11 parameters are not specified. Hardware security module integration is disabled. ################################################################################ ################################################################################
AVS Device SDK Raspberry pi Script - Terms and Agreements
The AVS Device SDK is dependent on several third-party libraries, environments, and/or other software packages that are installed using this script from third-party sources ("External Dependencies"). These are terms and conditions associated with the External Dependencies (available at https://github.com/alexa/avs-device-sdk/wiki/Dependencies) that you need to agree to abide by if you choose to install the External Dependencies .
If you do not agree with every term and condition associated with the External Dependencies, enter "QUIT" in the command line when prompted by the installer. Else enter "AGREE".
################################################################################
################################################################################
AGREE
################################################################################
Proceeding with installation
################################################################################
[ 0%] Built target acsdkCryptoInterfaces
[ 0%] Built target acsdkCodecUtils
[ 27%] Built target AVSCommon
[ 27%] Built target SynchronizeStateSender
[ 27%] Built target SQLiteStorage
[ 31%] Built target AudioResources
[ 31%] Built target acsdkManufactory
[ 31%] Built target acsdkDeviceSetup
[ 31%] Built target Captions
[ 31%] Built target acsdkExternalMediaPlayerInterfaces
[ 34%] Built target acsdkEqualizerImplementations
[ 34%] Built target acsdkAudioInputStream
[ 36%] Built target ACL
[ 36%] Built target ADSL
[ 36%] Built target InterruptModel
[ 38%] Built target SystemSoundPlayer
[ 38%] Built target SpeechEncoder
[ 38%] Built target acsdkNullMetricRecorder
[ 43%] Built target acsdkProperties
[ 43%] Built target acsdkStartupManager
[ 43%] Built target acsdkSystemClockMonitor
[ 43%] Built target ContextManager
[ 45%] Built target acsdkShutdownManager
[ 45%] Built target acsdkNullSpeechEncoder
[ 45%] Built target CaptionsComponent
[ 47%] Built target acsdkCrypto
[ 50%] Built target acsdkPkcs11
[ 52%] Built target PlaylistParser
[ 52%] Built target ApiGateway
[ 52%] Built target acsdkInteractionModel
[ 54%] Built target PlaybackController
[ 54%] Built target SoftwareComponentReporter
[ 54%] Built target SpeechSynthesizer
[ 54%] Built target TemplateRuntime
[ 56%] Built target SDKComponent
[ 59%] Built target MediaPlayer
[ 59%] Built target acsdkKWDImplementations
[ 61%] Built target Alexa
[ 61%] Built target RegistrationManager
[ 63%] Built target acsdkAudioPlayer
[ 65%] Built target acsdkBluetooth
[ 65%] Built target acsdkEqualizer
[ 68%] Built target acsdkNotifications
[ 70%] Built target AFML
[ 70%] Built target acsdkAuthorization
[ 70%] Built target acsdkPostConnectOperationProviderRegistrar
[ 72%] Built target AVSGatewayManager
[ 72%] Built target acsdkShared
[ 72%] Built target CertifiedSender
[ 75%] Built target Endpoints
[ 77%] Built target CBLAuthDelegate
[ 79%] Built target DeviceSettings
[ 81%] Built target SpeakerManager
[ 81%] Built target acsdkExternalMediaPlayer
[ 81%] Built target AIP
[ 81%] Built target acsdkSampleApplicationCBLAuthRequester
[ 84%] Built target AVSSystem
[ 84%] Built target CapabilitiesDelegate
[ 86%] Built target acsdkAlerts
[ 88%] Built target acsdkDoNotDisturb
[ 90%] Built target acsdkCore
[ 90%] Built target acsdkDefaultDeviceSettingsManager
[ 93%] Built target acsdkDefaultSampleApplicationOptions
[ 93%] Built target DefaultClient
[ 97%] Built target LibSampleApp
[100%] Built target SampleApp
[ 0%] Built target acsdkCryptoInterfaces
[ 0%] Built target acsdkCodecUtils
[ 27%] Built target AVSCommon
[ 27%] Built target SynchronizeStateSender
[ 27%] Built target SQLiteStorage
[ 31%] Built target AudioResources
[ 31%] Built target acsdkManufactory
[ 31%] Built target Captions
[ 31%] Built target acsdkDeviceSetup
[ 31%] Built target acsdkExternalMediaPlayerInterfaces
[ 34%] Built target acsdkEqualizerImplementations
[ 34%] Built target acsdkAudioInputStream
[ 38%] Built target acsdkProperties
[ 38%] Built target ADSL
[ 40%] Built target ACL
[ 40%] Built target InterruptModel
[ 43%] Built target SystemSoundPlayer
[ 43%] Built target SpeechEncoder
[ 43%] Built target acsdkStartupManager
[ 43%] Built target acsdkSystemClockMonitor
[ 45%] Built target acsdkShutdownManager
[ 45%] Built target acsdkNullMetricRecorder
[ 45%] Built target acsdkPostConnectOperationProviderRegistrar
[ 45%] Built target ContextManager
[ 45%] Built target acsdkLibcurlHTTPContentFetcher
[ 45%] Built target acsdkNullSystemTimeZone
[ 45%] Built target acsdkNullBluetoothImplementation
[ 47%] Built target PlaylistParser
[ 47%] Built target acsdkNullSpeechEncoder
[ 47%] Built target CaptionsComponent
[ 50%] Built target acsdkCrypto
[ 52%] Built target acsdkPkcs11
[ 52%] Built target ApiGateway
[ 52%] Built target acsdkInteractionModel
[ 54%] Built target PlaybackController
[ 54%] Built target SoftwareComponentReporter
[ 54%] Built target SpeechSynthesizer
[ 54%] Built target TemplateRuntime
[ 56%] Built target SDKComponent
[ 59%] Built target acsdkKWDImplementations
[ 61%] Built target RegistrationManager
[ 61%] Built target Alexa
[ 63%] Built target acsdkAudioPlayer
[ 63%] Built target acsdkEqualizer
[ 65%] Built target acsdkBluetooth
[ 68%] Built target acsdkAuthorization
[ 68%] Built target acsdkNotifications
[ 68%] Built target acsdkShared
[ 70%] Built target AFML
[ 72%] Built target AVSGatewayManager
[ 72%] Built target MediaPlayer
[ 72%] Built target acsdkKWD
[ 72%] Built target CertifiedSender
[ 75%] Built target Endpoints
[ 77%] Built target CBLAuthDelegate
[ 77%] Built target acsdkDefaultInternetConnectionMonitor
[ 77%] Built target CapabilitiesDelegate
[ 79%] Built target acsdkGstreamerApplicationAudioPipelineFactory
[ 81%] Built target DeviceSettings
[ 84%] Built target SpeakerManager
[ 84%] Built target acsdkExternalMediaPlayer
[ 84%] Built target acsdkCBLAuthorizationDelegate
[ 84%] Built target AIP
[ 86%] Built target AVSSystem
[ 86%] Built target acsdkSampleApplicationCBLAuthRequester
[ 88%] Built target acsdkCore
[ 90%] Built target acsdkAlerts
[ 93%] Built target acsdkDoNotDisturb
[ 95%] Built target acsdkDefaultSampleApplicationOptions
[ 95%] Built target acsdkLibcurlAlexaCommunications
[ 95%] Built target acsdkDefaultDeviceSettingsManager
[ 95%] Built target DefaultClient
[100%] Built target LibSampleApp
[100%] Built target LibPreviewAlexaClient
[100%] Built target PreviewAlexaClient
[ 0%] Built target gmock_main
[ 0%] Built target acsdkCryptoInterfaces
[ 12%] Built target AVSCommon
[ 12%] Built target acsdkCodecUtils
[ 13%] Built target gmock
[ 13%] Built target gtest
[ 13%] Linking CXX executable InMemoryCommunicationPropertiesHandlerTest
[ 13%] Linking CXX executable InMemoryCommunicationInvokeHandlerTest
/usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_fetch_add_8' /usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to
__atomic_store_8'
/usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_load_8' collect2: error: ld returned 1 exit status make[2]: *** [shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationInvokeHandlerTest.dir/build.make:106: shared/acsdkCommunication/test/InMemoryCommun icationInvokeHandlerTest] Error 1 make[1]: *** [CMakeFiles/Makefile2:17016: shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationInvokeHandlerTest.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... /usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to
__atomic_fetch_add_8'
/usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_store_8' /usr/bin/ld: ../../../AVSCommon/libAVSCommon.so: undefined reference to
__atomic_load_8'
collect2: error: ld returned 1 exit status
make[2]: *** [shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationPropertiesHandlerTest.dir/build.make:106: shared/acsdkCommunication/test/InMemoryCo mmunicationPropertiesHandlerTest] Error 1
make[1]: *** [CMakeFiles/Makefile2:16988: shared/acsdkCommunication/test/CMakeFiles/InMemoryCommunicationPropertiesHandlerTest.dir/all] Error 2
make: *** [Makefile:160: all] Error 2
pi@raspberrypi:~ $
SDK: Alexa AVS SDK Version 1.26 (November 2021)
Hardware: Raspberry Pi 4B
OS: Raspbian GNU/Linux 11 (bullseye)
Any help would be appreciated as this is driving me crazy!!
Hello @STEVEN-STARK
There was a similar issue before and you can find a workaround described here: https://github.com/alexa/avs-device-sdk/issues/1404
Is anyone getting the Alexa SDK to install and work on a Raspberry Pi using the install script? I have tried numerous times with no success. So before I try again I would like to know if it works. Tired of wasting time trying to install with no success. None of the work arounds have worked for me. OS = Buster running on a Raspberry Pi 4 with 2GB memory. I would think if you release a install script it should work otherwise what is the point? Signed, Frustrated!
Hi, I'm having the same problem, using the script and the manual build. In the manual build the SampleApp builds, but the full SDK build throws up these errors. The work arounds (editing the CMakeLists.txt) don't appear to change anything.
Thanks for sharing your experience. I was beginning to think it was me. lol On Sunday, January 23, 2022, 09:04:51 AM CST, nickmcgill @.***> wrote:
Hi, I'm having the same problem, using the script and the manual build. In the manual build the SampleApp builds, but the full SDK build throws up these errors. The work arounds (editing the CMakeLists.txt) don't appear to change anything.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
Hey, same problem for me with Raspberry Pi 3B+ and Raspbian Buster. Proposed workarounds didn't change anything.
Thank you for your response.Appreciated.I hope a fix is implemented in the near future. On Sunday, January 23, 2022, 11:31:19 AM CST, Nui @.***> wrote:
Hey, same problem for me with Raspberry Pi 3B+ and Raspbian Buster. Proposed workarounds didn't change anything.
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
For me, Pi4, Pi OS lite (bullseye). Each test, I've started from scratch, always the same result ....
Same problem here. By using a new cmake installation by hand the problem still occours. 'make SampleApp' is working, 'make' is not:
...
Consolidate compiler generated dependencies of target AlarmAlertTest
[ 21%] Linking CXX executable AlarmAlertTest
/usr/bin/ld: ../../../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_fetch_add_8' /usr/bin/ld: ../../../../AVSCommon/libAVSCommon.so: undefined reference to
__atomic_store_8'
/usr/bin/ld: ../../../../AVSCommon/libAVSCommon.so: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[2]: *** [EXTENSION/Alerts/acsdkAlerts/test/CMakeFiles/AlarmAlertTest.dir/build.make:108: EXTENSION/Alerts/acsdkAlerts/test/AlarmAlertTest] Error 1
make[1]: *** [CMakeFiles/Makefile2:6596: EXTENSION/Alerts/acsdkAlerts/test/CMakeFiles/AlarmAlertTest.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
root@raspberrypi:/home/pi/sdk-folder/sdk-build# cmake --version
cmake version 3.22.2
CMake suite maintained and supported by Kitware (kitware.com/cmake). root@raspberrypi:/home/pi/sdk-folder/sdk-build# make --version GNU Make 4.3
Here's a workaround: I compiled an older cmake by hand.
Can you give instructions on your work around? I'm not a Debian expert so I need step by step instructions. TIA
Of course.
I just downloaded an old tarball:
wget https://cmake.org/files/v3.16/cmake-3.16.3.tar.gz
wget https://cmake.org/files/v3.16/cmake-3.16.3-SHA-256.txt
sha256sum -c --ignore-missing cmake-3.16.3-SHA-256.txt && tar xfv cmake-3.16.3.tar.gz
cd cmake-3.16.3
cmake .
make
make install
Okay, thanks I'll give it a try.
Hi! Has anyone been able to get this sorted? I manually complied an older version of CMake and even added the line to the bottom of CMakeList.txt, but am still unable to get it running and am getting the exact same errors.
Thank you very much
I haven't been able to get it to work.Maybe some day? On Thursday, March 3, 2022, 08:11:41 PM CST, Mohammad Gaffori @.***> wrote:
Hi! Has anyone been able to get this sorted? I manually complied an older version of CMake and even added the line to the bottom of CMakeList.txt, but am still unable to get it running and am getting the exact same errors.
Thank you very much
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
Hello! I FINALLY got it sorted. I had the most current Raspberry Pi Os (Bulldog). I downgraded to the most recent version of the prior OS, Buster, and got it to work great. Hope this helps
thx for sharing.Wish me luck
still no joy
That's a shame. Maybe one day it will work again. Maybe? On Monday, March 7, 2022, 02:09:50 AM CST, cwchawt2000 @.***> wrote:
still no joy
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
i also have the same error, have tried to change CMakeList.txt but still stuck at the same error
Hi @kader0100 have you tried the previous fix from issue #2006
Done that, still not working
On Tue, Mar 22, 2022, 6:18 AM womw @.***> wrote:
Hi @kader0100 https://github.com/kader0100 have you tried the previous fix from issue #2006 https://github.com/alexa/avs-device-sdk/issues/2006
— Reply to this email directly, view it on GitHub https://github.com/alexa/avs-device-sdk/issues/2007#issuecomment-1074476638, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHBJGIQAD7Y2NXH454MGUDVBDYS5ANCNFSM5LPLICBQ . You are receiving this because you were mentioned.Message ID: @.***>
Per my testing with the latest rpi Bullseye release (04/2022), the following tweak is needed to add atomic library to AVSCommon, otherwise multiple targets like AlertsTest fail:
— ./AVSCommon/CMakeLists.txt.ORIG 2022-04-19 10:18:23.652967676 -0700
+++ ./AVSCommon/CMakeLists.txt 2022-04-19 10:18:58.232472325 -0700
@@ -138,7 +138,7 @@
target_include_directories(AVSCommon PUBLIC
${CUSTOMSDSTRAITS_LIB_DIR}/include)
-target_link_libraries(AVSCommon ${CUSTOMSDSTRAITS_LIB_NAME})
+target_link_libraries(AVSCommon ${CUSTOMSDSTRAITS_LIB_NAME} atomic)
endif ()
target_link_libraries(AVSCommon
@@ -146,6 +146,7 @@
acsdkApplicationAudioPipelineFactoryInterfaces
acsdkEqualizerInterfaces
acsdkInteractionModelInterfaces
+ atomic
)
# install target
Hi Philippe,That you got it working is great news.I'm a newbie to Debian/bash command line so can you tell me howsomeone should use your fix?Where and how do I add your commands/code?I would love to try your fix and get Alexa on my MagicMirror working again. Again good news that you found a solution and thanks for sharing.I'm sure a lot of people have been frustrated by this problem.Can't wait to try it. 01ZerosOnes01
On Wednesday, April 20, 2022, 11:55:22 AM CDT, Philippe Lantin ***@***.***> wrote:
Per my testing with the latest rpi Bullseye release (04/2022), the following tweak is needed to add atomic library to AVSCommon, otherwise multiple targets like AlertsTest fail:
— ./AVSCommon/CMakeLists.txt.ORIG 2022-04-19 10:18:23.652967676 -0700
+++ ./AVSCommon/CMakeLists.txt 2022-04-19 10:18:58.232472325 -0700
@@ -138,7 +138,7 @@
target_include_directories(AVSCommon PUBLIC ${CUSTOMSDSTRAITS_LIB_DIR}/include)
-target_link_libraries(AVSCommon ${CUSTOMSDSTRAITS_LIB_NAME})
+target_link_libraries(AVSCommon ${CUSTOMSDSTRAITS_LIB_NAME} atomic)
endif ()
target_link_libraries(AVSCommon
@@ -146,6 +146,7 @@ acsdkApplicationAudioPipelineFactoryInterfaces
acsdkEqualizerInterfaces
acsdkInteractionModelInterfaces
atomic
)
install target
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
@01ZerosOnes01
He is saying to edit the file named CMakeLists.txt (avs-device-sdk/AVSCommon/CMakeLists.txt) at line 141 and change it from:
target_link_libraries(AVSCommon ${CUSTOMSDSTRAITS_LIB_NAME})
to
target_link_libraries(AVSCommon ${CUSTOMSDSTRAITS_LIB_NAME} atomic)
and to also add the word atomic on line 149 within the parentheses from this:
target_link_libraries(AVSCommon
${CURL_LIBRARIES}
acsdkApplicationAudioPipelineFactoryInterfaces
acsdkEqualizerInterfaces
acsdkInteractionModelInterfaces
)
to this:
target_link_libraries(AVSCommon
${CURL_LIBRARIES}
acsdkApplicationAudioPipelineFactoryInterfaces
acsdkEqualizerInterfaces
acsdkInteractionModelInterfaces
atomic
)
Mine is still compiling so I can't confirm if it is working yet or not.
Thank you @penguinrunner, feedback on if this worked for others having this issue would be useful.
This was done with a fresh install of the latest Pi OS 32 bit version running on a 3b 2GB.
Now getting this error
2193 | _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 19%] Linking CXX executable ContextManagerTest
/usr/bin/ld: ../../AVSCommon/libAVSCommon.so: undefined reference to __atomic_fetch_add_8' /usr/bin/ld: ../../AVSCommon/libAVSCommon.so: undefined reference to
__atomic_store_8'
/usr/bin/ld: ../../AVSCommon/libAVSCommon.so: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[2]: *** [ContextManager/test/CMakeFiles/ContextManagerTest.dir/build.make:107: ContextManager/test/ContextManagerTest] Error 1
make[1]: *** [CMakeFiles/Makefile2:14305: ContextManager/test/CMakeFiles/ContextManagerTest.dir/all] Error 2
make: *** [Makefile:160: all] Error 2
pi@raspberrypi:~ $
Also I can't edit CMakeLists.txt (avs-device-sdk/AVSCommon/CMakeLists.txt) Says read only. How do I edit that file?
I used this to solve the Cloning into 'avs-device-sdk'.. fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Edit setup.sh file From CLONE_URL=${CLONE_URL:- 'git://github.com/alexa/avs-device-sdk.git'} to CLONE_URL=${CLONE_URL:- 'https://github.com/alexa/avs-device-sdk.git'}
Any help appreciated.
@01ZerosOnes01
- You will also need to change line 21 in the initial setup.sh file you downloaded (which you already did, I am just putting this hear for the next person)
From
CLONE_URL=${CLONE_URL:- 'git://github.com/alexa/avs-device-sdk.git'}
to
CLONE_URL=${CLONE_URL:- 'https://github.com/alexa/avs-device-sdk.git'}
This is due to the security changes on github on how files are allowed to be pulled.
To edit the CMakeLists.txt Use the command sudo nano CMakeLists.txt
to run as administrator
@phlantin It did in fact finish compiling and I was able to authorize with the code provided in the terminal.
It does work now with the push to talk "t+enter". Now I need to go search for a wake word engine since it is no longer included.
Okay here is an update. I was able to successfully compile and authorize the AVS SDK using the script method using the edits discussed on this thread. At this time though there is no wake word engine. So you have to use t enter to ask a question of Alexa. Not useful in a MagicMIrror environment. You have to close the MagicMirror app to issue the t command. So we are making progress but just not there yet. @penguinrunner please if you find a wake word engine that works please post how to install. Thanks to @phlantin and @penguinrunner for your help.
You can use a slightly older version of the SDK (v.1.24) which has support for the Kitt.AI WW.
For me solved with the following steps.
- Navigate to the 'avs-device-sdk/cmakeBuild/cmake' directory.
- Open Platforms.cmake file.
- At the end of the file, add the following code.
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
link_libraries(atomic)
endif()
- Save, and then close the file.
-
sudo bash setup.sh config.json