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

Gnu C++ 7.x fails building with missing #include <functional> #908

Closed
2 of 8 tasks
brett-lynnes opened this issue Aug 16, 2018 · 3 comments
Closed
2 of 8 tasks

Gnu C++ 7.x fails building with missing #include <functional> #908

brett-lynnes opened this issue Aug 16, 2018 · 3 comments

Comments

@brett-lynnes
Copy link

brett-lynnes commented Aug 16, 2018

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

Briefly summarize your issue:

see: #396 , same problem with the newly added bluetooth code in BlueZ/GVariantMapReader.h and BlueZ/GVariantTupleReader.h

What is the expected behavior?

AVS should compile with -BLUETOOTH_BLUEZ on my system

What behavior are you observing?

failure to build with:

In file included from /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/BlueZUtils.h:21:0, from /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/src/DBusConnection.cpp:18: /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/GVariantTupleReader.h:115:23: error: ‘std::function’ has not been declared bool forEach(std::function<bool(GVariant* value)> iteratorFunction) const; ^~~~~~~~ /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/GVariantTupleReader.h:115:31: error: expected ‘,’ or ‘...’ before ‘<’ token bool forEach(std::function<bool(GVariant* value)> iteratorFunction) const; ^ In file included from /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/BlueZUtils.h:22:0, from /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/src/DBusConnection.cpp:18: /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/GVariantMapReader.h:112:23: error: ‘std::function’ has not been declared bool forEach(std::function<bool(char* key, GVariant* value)> iteratorFunction) const; ^~~~~~~~ /home/lynnes/AVS/avs-device-sdk/BluetoothImplementations/BlueZ/include/BlueZ/GVariantMapReader.h:112:31: error: expected ‘,’ or ‘...’ before ‘<’ token bool forEach(std::function<bool(char* key, GVariant* value)> iteratorFunction) const; ^ BluetoothImplementations/BlueZ/src/CMakeFiles/BluetoothImplementationsBlueZ.dir/build.make:206: recipe for target 'BluetoothImplementations/BlueZ/src/CMakeFiles/BluetoothImplementationsBlueZ.dir/DBusConnection.cpp.o' failed make[2]: *** [BluetoothImplementations/BlueZ/src/CMakeFiles/BluetoothImplementationsBlueZ.dir/DBusConnection.cpp.o] Error 1 CMakeFiles/Makefile2:3890: recipe for target 'BluetoothImplementations/BlueZ/src/CMakeFiles/BluetoothImplementationsBlueZ.dir/all' failed make[1]: *** [BluetoothImplementations/BlueZ/src/CMakeFiles/BluetoothImplementationsBlueZ.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

Provide the steps to reproduce the issue, if applicable:

Ubuntu 18.x with Gnu C++ 7.3 and attempt to compile with -BLUETOOTH_BLUEZ (and some other included header hasn't already #include <functional>, possibly my installation of bluez-5.29 differs)

if you add #include <functional> to these files, the build succeeds:
BluetoothImplementations/BlueZ/include/BlueZ/GVariantMapReader.h
BluetoothImplementations/BlueZ/include/BlueZ/GVariantTupleReader.h

Tell us about your environment:

What version of the AVS Device SDK are you using?

1.8.1

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:
@kjkh
Copy link

kjkh commented Aug 17, 2018

Hi @brett-lynnes,

Thanks for bringing this to our attention. It will be fixed in a future release.

scotthea-amazon added a commit that referenced this issue Oct 24, 2018
Changes in this update:

**Enhancements**

* New optional configuration for [EqualizerController](https://github.com/alexa/avs-device-sdk/blob/v1.10.0/Integration/AlexaClientSDKConfig.json#L154). The EqualizerController interface allows you to adjust equalizer settings on your product, such as decibel (dB) levels and modes.
* Added reference implementation of the EqualizerController for GStreamer-based (MacOS, Linux, and Raspberry Pi) and OpenSL ES-based (Android) MediaPlayers. Note: In order to use with Android, it must support OpenSL ES.
* New optional configuration for the [TemplateRuntime display card value](https://github.com/alexa/avs-device-sdk/blob/v1.10.0/Integration/AlexaClientSDKConfig.json#L144).
* A configuration file generator script, `genConfig.sh` is now included with the SDK in the **tools/Install** directory. `genConfig.sh` and it's associated arguments populate `AlexaClientSDKConfig.json` with the data required to authorize with LWA.
* Added Bluetooth A2DP source and AVRCP target support for Linux.
* Added Amazon for Business (A4B) support, which includes support for handling the new [RevokeAuthorization](https://developer.amazon.com/docs/alexa-voice-service/system.html#revokeauth) directive in the Settings interface. A new CMake option has been added to enable A4B within the SDK, `-DA4B`.
* Added locale support for IT and ES.
* The Alexa Communication Library (ACL), `CBLAUthDelegate`, and sample app have been enhanced to detect de-authorization using the new `z` command.
* Added `ExternalMediaPlayerObserver`, which receives notification of player state, track, and username changes.
* `HTTP2ConnectionInterface` was factored out of `HTTP2Transport` to enable unit testing of `HTTP2Transport` and re-use of `HTTP2Connection` logic.

**Bug Fixes**

* Fixed a bug in which `ExternalMediaPlayer` adapter playback wasn't being recognized by AVS.
* [Issue 973](#973) - Fixed issues related to `AudioPlayer` where progress reports were being sent out of order or with incorrect offsets.
* An `EXPECTING`, state has been added to `DialogUXState` in order to handle `EXPECT_SPEECH` state for hold-to-talk devices.
* [Issue 948](#948) - Fixed a bug in which the sample app was stuck in a listening state.
* Fixed a bug where there was a delay between receiving a `DeleteAlert` directive, and deleting the alert.
* [Issue 839](#839) - Fixed an issue where speech was being truncated due to the `DialogUXStateAggregator` transitioning between a `THINKING` and `IDLE` state.
* Fixed a bug in which the `AudioPlayer` attempted to play when it wasn't in the `FOREGROUND` focus.
* `CapabilitiesDelegateTest` now works on Android.
* [Issue 950](#950) - Improved Android Media Player audio quality.
* [Issue 908](#908) - Fixed compile error on g++ 7.x in which includes were missing.
@scotthea-amazon
Copy link
Contributor

Hello brett-lynnes,

Release 1.10 includes a change to fix this problem. If you can, please let us know if it is fixed for you.

Thank you,
-SWH

@dhpp dhpp closed this as completed Nov 7, 2018
@EpicIntegratedSystems
Copy link

Found a fix for me

sudo apt-get install libsbc-dev

Worked for ubuntu 16.04

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

5 participants