Closed Maldus512 closed 11 months ago
I have the exact same issue.
This reminds me of once I had the same problem on a project I had made myself. The issue was header files including themselves and due to the order in which they were included, one of the key headers was included last. That in turn lead to headers who relied on the aforementioned header caused compilation issues.
In file included from ../components/esp-azure-pnp/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h:7,
from /home/robing/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/xtensa-esp32-elf/sys-include/string.h:24,
from ../components/esp-azure-pnp/azure-iot-sdk-c/c-utility/inc/azure_macro_utils/macro_utils.h:22,
from ../components/esp-azure-pnp/azure-iot-sdk-c/digitaltwin_client/inc/digitaltwin_device_client_ll.h:21,
from ../main/inc/pnp_device.h:10,
from ../main/main.c:13:
../components/esp-azure-pnp/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h:18:1: error: unknown type name 'MU_IF'
MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_new);
^~~~~~~~~~~~~~~~~
../components/esp-azure-pnp/azure-iot-sdk-c/c-utility/inc/azure_c_shared_utility/strings.h:19:1: error: unknown type name 'MU_IF'
MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_clone, STRING_HANDLE, handle);
^~~~~~~~~~~~~~~~~
...
The issue could be related to
'>strings.h which includes
'>> umock_c/umock_c_prod.h which includes
'>>> ../deps/azure-macro-utils-c/inc/azure_macro_utils/macro_utils.h which includes
'>>>> string.h, which is part of the xtensa build system. This in turn includes strings.h
And then we have an inclusion error of some sort. How to solve it, I have no idea, but at least this may be a clue for those who know the system.
Sorry to be late on this. we'll have a look. keep you posted
I do not reproduce the above issue.... following the exact steps described in the readme. I'm using wsl1. FYI my config: Toolchain path: /mnt/c/azure-iot/esp/stable/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc Toolchain version: crosstool-ng-1.22.0-80-g6c4433a Compiler version: 5.2.0
Perhaps interesting to look at: https://github.com/Azure/azure-iot-sdk-c/issues/1177
I'm trying to implement a Plug and Play application for the ESP32, and I'm having a lot of problems with the various versions of the needed libraries.
Even with this repo, the compilation (of any example) fails with the following error, repeated for many source files:
The compilation process is pretty straightforward, so I have no idea what I could be doing wrong. I copied the folder esp-azure-pnp inside components and tried to build the example (azure-esp-pnp-starter) with the
idf.py build
command.