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

Error when building with Snowboy #385

Closed
D3rpi opened this issue Dec 11, 2017 · 2 comments
Closed

Error when building with Snowboy #385

D3rpi opened this issue Dec 11, 2017 · 2 comments

Comments

@D3rpi
Copy link

D3rpi commented Dec 11, 2017

Overview -
I have the Alexa SDK 1.2 version working(with Snowboy) on a Pi 3 running Stretch.
Since there's now an updated 1.3 version, I repeated the same steps I used for 1.2 but I ran into this error when I tried to build it.
I compiled with the default cmake then when that didn't work also tried CC=gcc-4.9 CXX=g++-4.9 cmake but had the same issue.

OS and build - Raspbian Stretch - Alexa SDK 1.3
Logs - Happens at 72%

[ 71%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/MediaPlayer.cpp.o
In file included from /usr/include/c++/6/vector:64:0,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googletest/include/gtest/internal/gtest-port.h:279,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googletest/include/gtest/internal/gtest-linked_ptr.h:74,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googlemock/include/gmock/internal/gmock-port.h:53,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googlemock/include/gmock/internal/gmock-generated-internal-utils.h:44,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googlemock/include/gmock/internal/gmock-internal-utils.h:45,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googlemock/include/gmock/gmock-actions.h:46,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/googletest-release-1.8.0/googlemock/include/gmock/gmock.h:58,
                 from /home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/PlaylistParser/test/PlaylistParserTest.cpp:25:
/usr/include/c++/6/bits/stl_vector.h: In constructor ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = std::chrono::duration<long long int, std::ratio<1ll, 1000ll> >; _Alloc = std::allocator<std::chrono::duration<long long int, std::ratio<1ll, 1000ll> > >]’:
/usr/include/c++/6/bits/stl_vector.h:375:7: note: parameter passing for argument of type ‘std::initializer_list<std::chrono::duration<long long int, std::ratio<1ll, 1000ll> > >’ will change in GCC 7.1
       vector(initializer_list<value_type> __l,
       ^~~~~~
/home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/PlaylistParser/test/PlaylistParserTest.cpp: In function ‘void __static_initialization_and_destruction_0(int, int)’:
/home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/PlaylistParser/test/PlaylistParserTest.cpp:52:53: note: parameter passing for argument of type ‘std::initializer_list<std::chrono::duration<long long int, std::ratio<1ll, 1000ll> > >’ will change in GCC 7.1
 static const std::vector<std::chrono::milliseconds> TEST_M3U_DURATIONS = {std::chrono::milliseconds{-1},
                                                     ^~~~~~~~~~~~~~~~~~
/home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/PlaylistParser/test/PlaylistParserTest.cpp:129:53: note: parameter passing for argument of type ‘std::initializer_list<std::chrono::duration<long long int, std::ratio<1ll, 1000ll> > >’ will change in GCC 7.1
 static const std::vector<std::chrono::milliseconds> TEST_HLS_DURATIONS = {std::chrono::milliseconds{10000},
                                                     ^~~~~~~~~~~~~~~~~~
/home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/PlaylistParser/test/PlaylistParserTest.cpp:222:53: note: parameter passing for argument of type ‘std::initializer_list<std::chrono::duration<long long int, std::ratio<1ll, 1000ll> > >’ will change in GCC 7.1
 static const std::vector<std::chrono::milliseconds> TEST_HLS_LIVE_STREAM_DURATIONS = {std::chrono::milliseconds{10000},
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 71%] Linking CXX executable PlaylistParserTest
[ 71%] Built target PlaylistParserTest
Scanning dependencies of target KITTAI
[ 72%] Building CXX object KWD/KittAi/src/CMakeFiles/KITTAI.dir/KittAiKeyWordDetector.cpp.o
/home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/KWD/KittAi/src/KittAiKeyWordDetector.cpp: In constructor ‘alexaClientSDK::kwd::KittAiKeyWordDetector::KittAiKeyWordDetector(std::shared_ptr<alexaClientSDK::avsCommon::utils::sds::SharedDataStream<alexaClientSDK::avsCommon::utils::sds::InProcessSDSTraits> >, alexaClientSDK::avsCommon::utils::AudioFormat, std::unordered_set<std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::KeyWordObserverInterface> >, std::unordered_set<std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::KeyWordDetectorStateObserverInterface> >, const string&, std::vector<alexaClientSDK::kwd::KittAiKeyWordDetector::KittAiConfiguration>, float, bool, std::chrono::milliseconds)’:
/home/drpi1/AlexaSDK1.3/sdk-folder/sdk-source/avs-device-sdk/KWD/KittAi/src/KittAiKeyWordDetector.cpp:123:78: error: narrowing conversion of ‘(((std::chrono::duration<long long int, std::ratio<1ll, 1000ll> >::rep)(audioFormat.alexaClientSDK::avsCommon::utils::AudioFormat::sampleRateHz / 1000u)) * msToPushPerIteration.std::chrono::duration<_Rep, _Period>::count<long long int, std::ratio<1ll, 1000ll> >())’ from ‘std::chrono::duration<long long int, std::ratio<1ll, 1000ll> >::rep {aka long long int}’ to ‘size_t {aka unsigned int}’ inside { } [-Werror=narrowing]
         m_maxSamplesPerPush{(audioFormat.sampleRateHz / HERTZ_PER_KILOHERTZ) * msToPushPerIteration.count()} {
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 72%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/Normalizer.cpp.o
[ 73%] Linking CXX executable AbstractKeywordDetectorTest
[ 73%] Built target AbstractKeywordDetectorTest
Scanning dependencies of target AudioInputProcessorTest
[ 73%] Building CXX object CapabilityAgents/AIP/test/CMakeFiles/AudioInputProcessorTest.dir/AudioInputProcessorTest.cpp.o
cc1plus: all warnings being treated as errors
KWD/KittAi/src/CMakeFiles/KITTAI.dir/build.make:62: recipe for target 'KWD/KittAi/src/CMakeFiles/KITTAI.dir/KittAiKeyWordDetector.cpp.o' failed
make[2]: *** [KWD/KittAi/src/CMakeFiles/KITTAI.dir/KittAiKeyWordDetector.cpp.o] Error 1
CMakeFiles/Makefile2:4475: recipe for target 'KWD/KittAi/src/CMakeFiles/KITTAI.dir/all' failed
make[1]: *** [KWD/KittAi/src/CMakeFiles/KITTAI.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 74%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/OffsetManager.cpp.o
[ 74%] Building CXX object MediaPlayer/src/CMakeFiles/MediaPlayer.dir/UrlSource.cpp.o
[ 74%] Linking CXX shared library libMediaPlayer.so
[ 74%] Built target MediaPlayer
[ 75%] Linking CXX executable AudioInputProcessorTest
[ 75%] Built target AudioInputProcessorTest
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

It doesn't seem to be a snowboy issue.
Kitt-AI/snowboy#326

@sanjayrd
Copy link
Contributor

Hi @D3rpi,

It looks like the issue with the following line:
m_maxSamplesPerPush{(audioFormat.sampleRateHz / HERTZ_PER_KILOHERTZ) * msToPushPerIteration.count()}

For now, could you try modifying that to:
m_maxSamplesPerPush{(audioFormat.sampleRateHz / HERTZ_PER_KILOHERTZ) * static_cast<unsigned int>(msToPushPerIteration.count())}
?

Thanks,
Sanjay

@D3rpi
Copy link
Author

D3rpi commented Dec 12, 2017

@sanjayrd Thanks, that worked!
:)

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

2 participants