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

ERROR WHILE BUILD SDK #1136

Closed
6 tasks
patadia opened this issue Dec 21, 2018 · 6 comments
Closed
6 tasks

ERROR WHILE BUILD SDK #1136

patadia opened this issue Dec 21, 2018 · 6 comments

Comments

@patadia
Copy link

patadia commented Dec 21, 2018

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

from a guide for macOs quickstart in step Build SDK I got following error

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'}

jays-MacBook-Air:sdk-build jaysanjay$ make SampleApp -j2 >>jay.txt

In file included from /Users/jaysanjay/sdk-folder/sdk-source/avs-device-sdk/CapabilityAgents/DoNotDisturb/src/DoNotDisturbCapabilityAgent.cpp:16:

In file included from /Users/jaysanjay/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/error/en.h:18:

In file included from /Users/jaysanjay/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/error/../error/error.h:18:

In file included from /Users/jaysanjay/sdk-folder/sdk-source/avs-device-sdk/ThirdParty/rapidjson/rapidjson-1.1.0/include/rapidjson/error/../internal/../rapidjson.h:144:

In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string:477:

In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/string_view:176:

In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/__string:56:

In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:643:

/Library/Developer/CommandLineTools/usr/include/c++/v1/memory:2285:5: error: delete called on non-final

  'alexaClientSDK::settings::Setting<bool>' that has virtual functions but non-virtual destructor

  [-Werror,-Wdelete-non-virtual-dtor]

delete __ptr;

^

/Library/Developer/CommandLineTools/usr/include/c++/v1/memory:2598:7: note: in instantiation of member function

  'std::__1::default_delete<alexaClientSDK::settings::Setting<bool> >::operator()' requested here

  __ptr_.second()(__tmp);

  ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/memory:2552:19: note: in instantiation of member function

  'std::__1::unique_ptr<alexaClientSDK::settings::Setting<bool>, std::__1::default_delete<alexaClientSDK::settings::Setting<bool> >

  >::reset' requested here

~unique_ptr() { reset(); }

              ^

/Library/Developer/CommandLineTools/usr/include/c++/v1/memory:4013:21: note: in instantiation of member function

  'std::__1::unique_ptr<alexaClientSDK::settings::Setting<bool>, std::__1::default_delete<alexaClientSDK::settings::Setting<bool> >

  >::~unique_ptr' requested here

unique_ptr<_Yp> __hold(__p);

                ^

/Users/jaysanjay/sdk-folder/sdk-source/avs-device-sdk/Settings/include/Settings/Setting.h:137:9: note: in instantiation of function

  template specialization 'std::__1::shared_ptr<alexaClientSDK::settings::Setting<bool>

  >::shared_ptr<alexaClientSDK::settings::Setting<bool> >' requested here

    std::shared_ptr<Setting<ValueT>>(new Setting(defaultValue, applyValueFn, std::move(settingProtocol)));

    ^

/Users/jaysanjay/sdk-folder/sdk-source/avs-device-sdk/CapabilityAgents/DoNotDisturb/src/DoNotDisturbCapabilityAgent.cpp:143:49: note:

  in instantiation of member function 'alexaClientSDK::settings::Setting<bool>::create' requested here

m_dndModeSetting = settings::Setting<bool>::create(false, std::move(protocol));

                                            ^

1 error generated.

make[3]: *** [CapabilityAgents/DoNotDisturb/src/CMakeFiles/DoNotDisturbCA.dir/DoNotDisturbCapabilityAgent.cpp.o] Error 1

make[2]: *** [CapabilityAgents/DoNotDisturb/src/CMakeFiles/DoNotDisturbCA.dir/all] Error 2

make[1]: *** [SampleApp/src/CMakeFiles/SampleApp.dir/rule] Error 2

make: *** [SampleApp] Error 2

jays-MacBook-Air:sdk-build jaysanjay$

What is the expected behavior?

What behavior are you observing?

Provide the steps to reproduce the issue, if applicable:

from MacOS QUICKSTART GUIDE

Tell us about your environment:

What version of the AVS Device SDK are you using?

  1.10

Tell us what hardware you're using:

  • [-] Desktop / Laptop
  • Raspberry Pi
  • Other - tell us more:

Tell us about your OS (Type & version):

  • Linux
  • [-] MacOS
  • Raspbian Stretch
  • Raspbian Jessy
  • Other - tell us more:
@scotthea-amazon
Copy link
Contributor

Hello patadia,

Thank you for bringing this to our attention!

From the error messages, it looks like this might be addressed by adding a default virtual destructor to SettingInterface.

We did not run across this in our testing on MacOS. I wonder if your compiler is just configured differently. Can you attach a copy of CMakeFiles/[your CMake's version]/CMakeCXXCompiler.cmake
from your build folder so that we might better understand this problem?

Best regards,
-SWH

@frivas
Copy link

frivas commented Dec 28, 2018

Hello @scotthea-amazon, I am also having the same error, Please find enclosed the CMakeCXXCompiler.cmake. I am using v1.11 of the SDK.

CMakeCXXCompiler.cmake.zip

What thing I have noticed is that the origin of the error is slightly different

In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__string:56:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/algorithm:643:
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2285:5: error: delete called on non-final
      'alexaClientSDK::settings::Setting<bool>' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
    delete __ptr;
    ^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2598:7: note: in instantiation of member function
      'std::__1::default_delete<alexaClientSDK::settings::Setting<bool> >::operator()' requested here
      __ptr_.second()(__tmp);
      ^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2552:19: note: in instantiation of member
      function 'std::__1::unique_ptr<alexaClientSDK::settings::Setting<bool>, std::__1::default_delete<alexaClientSDK::settings::Setting<bool> > >::reset'
      requested here
  ~unique_ptr() { reset(); }
                  ^
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4013:21: note: in instantiation of member
      function
      'std::__1::unique_ptr<alexaClientSDK::settings::Setting<bool>, std::__1::default_delete<alexaClientSDK::settings::Setting<bool> > >::~unique_ptr'
      requested here
    unique_ptr<_Yp> __hold(__p);
                    ^
/Users/fran/Downloads/ExplorationProjects/AVS_macOS/sdk-source/avs-device-sdk/Settings/include/Settings/Setting.h:137:9: note: in instantiation of function
      template specialization 'std::__1::shared_ptr<alexaClientSDK::settings::Setting<bool> >::shared_ptr<alexaClientSDK::settings::Setting<bool> >' requested
      here
        std::shared_ptr<Setting<ValueT>>(new Setting(defaultValue, applyValueFn, std::move(settingProtocol)));
        ^
/Users/fran/Downloads/ExplorationProjects/AVS_macOS/sdk-source/avs-device-sdk/CapabilityAgents/DoNotDisturb/src/DoNotDisturbCapabilityAgent.cpp:143:49: note: 
      in instantiation of member function 'alexaClientSDK::settings::Setting<bool>::create' requested here
    m_dndModeSetting = settings::Setting<bool>::create(false, std::move(protocol));
                                                ^
1 error generated.
make[3]: *** [CapabilityAgents/DoNotDisturb/src/CMakeFiles/DoNotDisturbCA.dir/DoNotDisturbCapabilityAgent.cpp.o] Error 1
make[2]: *** [CapabilityAgents/DoNotDisturb/src/CMakeFiles/DoNotDisturbCA.dir/all] Error 2
make[1]: *** [SampleApp/src/CMakeFiles/SampleApp.dir/rule] Error 2
make: *** [SampleApp] Error 2

Just checked #880 not sure if it is related, just in case, below the GCC and Clang version my system is currently using:

➜  sdk-build gcc --version
Configured with: --prefix=/Applications/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

➜  sdk-build clang -v      
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Thank you very much in advanced.

@frivas
Copy link

frivas commented Jan 3, 2019

Hello @scotthea-amazon,

Just an update.

I have added the default virtual destructor to the SettingInterface.h like so:

virtual ~SettingInterface() = default;

The build process almost finishes correctly.

There is an error at the end

[100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/main.cpp.o
[100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/PortAudioMicrophoneWrapper.cpp.o
make[2]: *** No rule to make target `/Users/fran/Downloads/ExplorationProjects/AVS_macOS/sdk-source/avs-device-sdk/third-party/portaudio/lib/.libs/libportaudio.a', needed by `SampleApp/src/SampleApp'.  Stop.
make[1]: *** [SampleApp/src/CMakeFiles/SampleApp.dir/all] Error 2
make: *** [all] Error 2

Still investigating what is going on.

[UPDATE]: The lib directory I specified was wrong, now it is fixed and it has build the app correctly.

Thank you very much again.

@visayamv
Copy link
Contributor

visayamv commented Jan 5, 2019

Hi @frivas , thanks for the update. We will fix the missing virtual destructor in the code.

@jbfitb
Copy link

jbfitb commented Feb 25, 2019

@visayamv Is there a timeline for that? It's been over two months since the issue was reported.

kjkh pushed a commit that referenced this issue Feb 26, 2019
Changes in this update:

**Enhancements**

* Support was added for the `fr_CA` locale.
* The Executor has been optimized to run a single thread when there are active job in the queue, and to remain idle when there are not active jobs.
* An additional parameter of `alertType` has been added to the Alerts capability agent. This will allow observers of alerts to know the type of alert being delivered.
* Support for programmatic unload and load of PulseAudio Bluetooth modules was added. To enable this feature, there is a [new CMake option](https://github.com/alexa/avs-device-sdk/wiki/CMake-parameters#bluetooth): `BLUETOOTH_BLUEZ_PULSEAUDIO_OVERRIDE_ENDPOINTS`. Note that [libpulse-dev is a required dependency](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#bluetooth) of this feature.
* An observer interface was added for when an active Bluetooth device connects and disconnects.
* The `BluetoothDeviceManagerInterface` instantiation was moved from `DefaultClient` to `SampleApp` to allow applications to override it.
* The `MediaPlayerInterface` now supports repeating playback of URL sources.
* The Kitt.AI wake word engine (WWE) is now compatible with GCC5+.
* Stop of ongoing alerts, management of MessageObservers, and management of CallStateObservers have been exposed through DefaultClient.

**Bug Fixes**

* [Issue 953](#953) - The `MediaPlayerInterface` requirement that callbacks not be made upon a callers thread has been removed.
* [Issue 1136](#1136) - Added a missing default virtual destructor.
* [Issue 1140](#1140) - Fixed an issue where DND states were not synchronized to the AVS cloud after device reset.
* [Issue 1143](#1143) - Fixed an issue in which the SpeechSynthesizer couldn't enter a sleeping state.
* [Issue 1183](#1183) - Fixed an issue where alarm is not sounding for certain timezones
* Changing an alert's volume from the Alexa app now works when an alert is playing.
* Added missing shutdown handling for ContentDecrypter to prevent the `Stop` command from triggering a crash when SAMPLE-AES encrypted content was streaming.
* Fixed a bug where if the Notifications database is empty, due to a crash or corruption, the SDK initialization process enters an infinite loop when it retries to get context from the Notifications capability agent.
* Fixed a race condition that caused `AlertsRenderer` observers to miss notification that an alert has been completed.

**Known Issues**

* `PlaylistParser` and `IterativePlaylistParser` generate two HTTP requests (one to fetch the content type, and one to fetch the audio data) for each audio stream played.
* Music playback history isn't being displayed in the Alexa app for certain account and device types.
* On GCC 8+, issues related to `-Wclass-memaccess` will trigger warnings. However, this won't cause the build to fail and these warnings can be ignored.
* Android error ("libDefaultClient.so" not found) can be resolved by upgrading to ADB version 1.0.40
* When network connection is lost, lost connection status is not returned via local TTS.
* `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* `make integration` is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user text-to-speech (TTS).
* When the sample app is restarted and network connection is lost, Reminder TTS does not play. Instead, the default alarm tone will play twice.
@kclchan
Copy link
Contributor

kclchan commented Mar 5, 2019

Thanks for opening this issue. It has been fixed in our v1.12 release. Thanks!

@kclchan kclchan closed this as completed Mar 5, 2019
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

6 participants