Page 1 of 1

Issue with building light example in WSL2

Posted: Tue Feb 13, 2024 12:09 am
by hketabdar
I'm encountering a problem while trying to build the Matter Light example in WSL2. I've followed the instructions outlined on this page, https://docs.espressif.com/projects/esp ... oping.html, to set up ESP IDF and ESP Matter but I get below error when i build the project.

esp-idf/components/bt/host/nimble/nimble/nimble/host/include/host/ble_gatt.h:885:13: error: expected unqualified-id before 'namespace'
885 | uint8_t namespace;
| ^~~~~~~~~

Environment
ESP-Matter Commit Id: fe4f9f6
ESP-IDF Commit Id: 4b5b064
SoC (eg: ESP32 or ESP32-C3): ESP32-C6

Re: Issue with building light example in WSL2

Posted: Tue Feb 13, 2024 9:43 pm
by MicroController
There was a merge of an upstream change to the NimBLE Bluetooth stack into the IDF three weeks ago which introduced a new struct member unfortunately called "namespace". This change prevents ble_gatt.h, and with it virtually all of NimBLE, from being usable in any C++ code - "namespace" is a C++ keyword.

You may want to create an issue/bug report to get this fixed.

In the meantime, you can try using the stable/release version of the IDF, i.e. v5.1.2.