Hi Team
I am trying to compile homekit_switch example available under rainmaker sdk. I am able to compile, flash and run switch example. I am getting error fatal error: hap.h: No such file or directory however I can see the file exists under HOMEKIT_PATH/components/homekit/esp_hap_core/include My current HOMEKIT_PATH is set to Users/user/Documents/homekit/esp-homekit-sdk/
I am using following versions:
ESP-IDF v4.4-dev-479-g1067b2870 master (from https://github.com/espressif/esp-idf.git)
rainmaker master (from https://github.com/espressif/esp-rainmaker.git)
homekit master (from https://github.com/espressif/esp-homekit-sdk.git)
Any help in this regard would be highly appreciated.
Thanks
The build log is
/***********************************************************************************************************************************/
user@192-168-1-109 homekit_switch % idf.py build
Executing action: all (aliases: build)
Running ninja in directory /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/build
Executing "ninja all"...
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/sdkconfig
Loading defaults file /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/sdkconfig.defaults...
/var/folders/0h/1hlw14px5d7bng6xgg1dxrlm0000gn/T/confgen_tmp24pw1gyu:2 line was updated to CONFIG_PARTITION_TABLE_SINGLE_APP=n
/var/folders/0h/1hlw14px5d7bng6xgg1dxrlm0000gn/T/confgen_tmp24pw1gyu:3 line was updated to CONFIG_PARTITION_TABLE_TWO_OTA=n
CMake Warning (dev) at /Users/user/esp/esp-idf/components/mbedtls/CMakeLists.txt:114 (target_sources):
Policy CMP0076 is not set: target_sources() command converts relative paths
to absolute. Run "cmake --help-policy CMP0076" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
A private source from a directory other than that of target "mbedcrypto"
has a relative path.
This warning is for project developers. Use -Wno-dev to suppress it.
-- App "homekit_switch" version: 1.0
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /Users/user/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
ESP RainMaker Project commit: 8cb1abc
-- Components: app_reset app_trace app_update app_wifi asio bootloader bootloader_support bt button cbor cmock coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_local_ctrl esp_netif esp_pm esp_rainmaker esp_ringbuf esp_rom esp_schedule esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test jsmn json json_generator json_parser libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread qrcode rmaker_common sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant ws2812_led xtensa
-- Component paths: /Users/user/Documents/rainmaker/esp-rainmaker/examples/common/app_reset /Users/user/esp/esp-idf/components/app_trace /Users/user/esp/esp-idf/components/app_update /Users/user/Documents/rainmaker/esp-rainmaker/examples/common/app_wifi /Users/user/esp/esp-idf/components/asio /Users/user/esp/esp-idf/components/bootloader /Users/user/esp/esp-idf/components/bootloader_support /Users/user/esp/esp-idf/components/bt /Users/user/Documents/rainmaker/esp-rainmaker/components/button /Users/user/esp/esp-idf/components/cbor /Users/user/esp/esp-idf/components/cmock /Users/user/esp/esp-idf/components/coap /Users/user/esp/esp-idf/components/console /Users/user/esp/esp-idf/components/cxx /Users/user/esp/esp-idf/components/driver /Users/user/esp/esp-idf/components/efuse /Users/user/esp/esp-idf/components/esp-tls /Users/user/esp/esp-idf/components/esp32 /Users/user/esp/esp-idf/components/esp_adc_cal /Users/user/esp/esp-idf/components/esp_common /Users/user/esp/esp-idf/components/esp_eth /Users/user/esp/esp-idf/components/esp_event /Users/user/esp/esp-idf/components/esp_gdbstub /Users/user/esp/esp-idf/components/esp_hid /Users/user/esp/esp-idf/components/esp_http_client /Users/user/esp/esp-idf/components/esp_http_server /Users/user/esp/esp-idf/components/esp_https_ota /Users/user/esp/esp-idf/components/esp_https_server /Users/user/esp/esp-idf/components/esp_hw_support /Users/user/esp/esp-idf/components/esp_ipc /Users/user/esp/esp-idf/components/esp_local_ctrl /Users/user/esp/esp-idf/components/esp_netif /Users/user/esp/esp-idf/components/esp_pm /Users/user/Documents/rainmaker/esp-rainmaker/components/esp_rainmaker /Users/user/esp/esp-idf/components/esp_ringbuf /Users/user/esp/esp-idf/components/esp_rom /Users/user/Documents/rainmaker/esp-rainmaker/components/esp_schedule /Users/user/esp/esp-idf/components/esp_serial_slave_link /Users/user/esp/esp-idf/components/esp_system /Users/user/esp/esp-idf/components/esp_timer /Users/user/esp/esp-idf/components/esp_websocket_client /Users/user/esp/esp-idf/components/esp_wifi /Users/user/esp/esp-idf/components/espcoredump /Users/user/esp/esp-idf/components/esptool_py /Users/user/esp/esp-idf/components/expat /Users/user/esp/esp-idf/components/fatfs /Users/user/esp/esp-idf/components/freemodbus /Users/user/esp/esp-idf/components/freertos /Users/user/esp/esp-idf/components/hal /Users/user/esp/esp-idf/components/heap /Users/user/esp/esp-idf/components/idf_test /Users/user/esp/esp-idf/components/jsmn /Users/user/esp/esp-idf/components/json /Users/user/Documents/rainmaker/esp-rainmaker/components/json_generator /Users/user/Documents/rainmaker/esp-rainmaker/components/json_parser /Users/user/esp/esp-idf/components/libsodium /Users/user/esp/esp-idf/components/log /Users/user/esp/esp-idf/components/lwip /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/main /Users/user/esp/esp-idf/components/mbedtls /Users/user/esp/esp-idf/components/mdns /Users/user/esp/esp-idf/components/mqtt /Users/user/esp/esp-idf/components/newlib /Users/user/esp/esp-idf/components/nghttp /Users/user/esp/esp-idf/components/nvs_flash /Users/user/esp/esp-idf/components/openssl /Users/user/esp/esp-idf/components/partition_table /Users/user/esp/esp-idf/components/perfmon /Users/user/esp/esp-idf/components/protobuf-c /Users/user/esp/esp-idf/components/protocomm /Users/user/esp/esp-idf/components/pthread /Users/user/Documents/rainmaker/esp-rainmaker/components/qrcode /Users/user/Documents/rainmaker/esp-rainmaker/components/rmaker_common /Users/user/esp/esp-idf/components/sdmmc /Users/user/esp/esp-idf/components/soc /Users/user/esp/esp-idf/components/spi_flash /Users/user/esp/esp-idf/components/spiffs /Users/user/esp/esp-idf/components/tcp_transport /Users/user/esp/esp-idf/components/tcpip_adapter /Users/user/esp/esp-idf/components/tinyusb /Users/user/esp/esp-idf/components/ulp /Users/user/esp/esp-idf/components/unity /Users/user/esp/esp-idf/components/vfs /Users/user/esp/esp-idf/components/wear_levelling /Users/user/esp/esp-idf/components/wifi_provisioning /Users/user/esp/esp-idf/components/wpa_supplicant /Users/user/Documents/rainmaker/esp-rainmaker/components/ws2812_led /Users/user/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/build
[2/11] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/app_homekit.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/app_homekit.c.obj
/Users/user/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DHAVE_CONFIG_H -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX -Iconfig -I../main -I/Users/user/esp/esp-idf/components/newlib/platform_include -I/Users/user/esp/esp-idf/components/freertos/include -I/Users/user/esp/esp-idf/components/freertos/port/xtensa/include -I/Users/user/esp/esp-idf/components/esp_hw_support/include -I/Users/user/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/Users/user/esp/esp-idf/components/heap/include -I/Users/user/esp/esp-idf/components/log/include -I/Users/user/esp/esp-idf/components/lwip/include/apps -I/Users/user/esp/esp-idf/components/lwip/include/apps/sntp -I/Users/user/esp/esp-idf/components/lwip/lwip/src/include -I/Users/user/esp/esp-idf/components/lwip/port/esp32/include -I/Users/user/esp/esp-idf/components/lwip/port/esp32/include/arch -I/Users/user/esp/esp-idf/components/soc/include -I/Users/user/esp/esp-idf/components/soc/esp32/. -I/Users/user/esp/esp-idf/components/soc/esp32/include -I/Users/user/esp/esp-idf/components/hal/esp32/include -I/Users/user/esp/esp-idf/components/hal/include -I/Users/user/esp/esp-idf/components/esp_rom/include -I/Users/user/esp/esp-idf/components/esp_rom/esp32 -I/Users/user/esp/esp-idf/components/esp_common/include -I/Users/user/esp/esp-idf/components/esp_system/include -I/Users/user/esp/esp-idf/components/esp32/include -I/Users/user/esp/esp-idf/components/driver/include -I/Users/user/esp/esp-idf/components/driver/esp32/include -I/Users/user/esp/esp-idf/components/esp_pm/include -I/Users/user/esp/esp-idf/components/esp_ringbuf/include -I/Users/user/esp/esp-idf/components/efuse/include -I/Users/user/esp/esp-idf/components/efuse/esp32/include -I/Users/user/esp/esp-idf/components/xtensa/include -I/Users/user/esp/esp-idf/components/xtensa/esp32/include -I/Users/user/esp/esp-idf/components/vfs/include -I/Users/user/esp/esp-idf/components/esp_wifi/include -I/Users/user/esp/esp-idf/components/esp_wifi/esp32/include -I/Users/user/esp/esp-idf/components/esp_event/include -I/Users/user/esp/esp-idf/components/esp_netif/include -I/Users/user/esp/esp-idf/components/esp_eth/include -I/Users/user/esp/esp-idf/components/tcpip_adapter/include -I/Users/user/esp/esp-idf/components/app_trace/include -I/Users/user/esp/esp-idf/components/esp_timer/include -I/Users/user/esp/esp-idf/components/mbedtls/port/include -I/Users/user/esp/esp-idf/components/mbedtls/mbedtls/include -I/Users/user/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/Users/user/esp/esp-idf/components/bootloader_support/include -I/Users/user/esp/esp-idf/components/app_update/include -I/Users/user/esp/esp-idf/components/spi_flash/include -I/Users/user/esp/esp-idf/components/esp_ipc/include -I/Users/user/esp/esp-idf/components/nvs_flash/include -I/Users/user/esp/esp-idf/components/pthread/include -I/Users/user/esp/esp-idf/components/esp_gdbstub/include -I/Users/user/esp/esp-idf/components/esp_gdbstub/xtensa -I/Users/user/esp/esp-idf/components/esp_gdbstub/esp32 -I/Users/user/esp/esp-idf/components/espcoredump/include -I/Users/user/esp/esp-idf/components/wpa_supplicant/include -I/Users/user/esp/esp-idf/components/wpa_supplicant/port/include -I/Users/user/esp/esp-idf/components/wpa_supplicant/include/esp_supplicant -I/Users/user/esp/esp-idf/components/perfmon/include -I/Users/user/esp/esp-idf/components/asio/asio/asio/include -I/Users/user/esp/esp-idf/components/asio/port/include -I/Users/user/esp/esp-idf/components/bt/common/osi/include -I/Users/user/esp/esp-idf/components/bt/include/esp32/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/porting/nimble/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/port/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/ans/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/bas/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/dis/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/gap/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/gatt/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/ias/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/ipss/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/lls/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/services/tps/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/util/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/store/ram/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/store/config/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include -I/Users/user/esp/esp-idf/components/bt/host/nimble/esp-hci/include -I/Users/user/esp/esp-idf/components/cbor/port/include -I/Users/user/esp/esp-idf/components/unity/include -I/Users/user/esp/esp-idf/components/unity/unity/src -I/Users/user/esp/esp-idf/components/cmock/CMock/src -I/Users/user/esp/esp-idf/components/coap/port/include -I/Users/user/esp/esp-idf/components/coap/port/include/coap -I/Users/user/esp/esp-idf/components/coap/libcoap/include -I/Users/user/esp/esp-idf/components/coap/libcoap/include/coap2 -I/Users/user/esp/esp-idf/components/console -I/Users/user/esp/esp-idf/components/nghttp/port/include -I/Users/user/esp/esp-idf/components/nghttp/nghttp2/lib/includes -I/Users/user/esp/esp-idf/components/esp-tls -I/Users/user/esp/esp-idf/components/esp-tls/esp-tls-crypto -I/Users/user/esp/esp-idf/components/esp_adc_cal/include -I/Users/user/esp/esp-idf/components/esp_hid/include -I/Users/user/esp/esp-idf/components/tcp_transport/include -I/Users/user/esp/esp-idf/components/esp_http_client/include -I/Users/user/esp/esp-idf/components/esp_http_server/include -I/Users/user/esp/esp-idf/components/esp_https_ota/include -I/Users/user/esp/esp-idf/components/protobuf-c/protobuf-c -I/Users/user/esp/esp-idf/components/protocomm/include/common -I/Users/user/esp/esp-idf/components/protocomm/include/security -I/Users/user/esp/esp-idf/components/protocomm/include/transports -I/Users/user/esp/esp-idf/components/mdns/include -I/Users/user/esp/esp-idf/components/esp_local_ctrl/include -I/Users/user/esp/esp-idf/components/sdmmc/include -I/Users/user/esp/esp-idf/components/esp_serial_slave_link/include -I/Users/user/esp/esp-idf/components/esp_websocket_client/include -I/Users/user/esp/esp-idf/components/expat/expat/expat/lib -I/Users/user/esp/esp-idf/components/expat/port/include -I/Users/user/esp/esp-idf/components/wear_levelling/include -I/Users/user/esp/esp-idf/components/fatfs/diskio -I/Users/user/esp/esp-idf/components/fatfs/vfs -I/Users/user/esp/esp-idf/components/fatfs/src -I/Users/user/esp/esp-idf/components/freemodbus/common/include -I/Users/user/esp/esp-idf/components/idf_test/include -I/Users/user/esp/esp-idf/components/idf_test/include/esp32 -I/Users/user/esp/esp-idf/components/jsmn/include -I/Users/user/esp/esp-idf/components/json/cJSON -I/Users/user/esp/esp-idf/components/libsodium/libsodium/src/libsodium/include -I/Users/user/esp/esp-idf/components/libsodium/port_include -I/Users/user/esp/esp-idf/components/mqtt/esp-mqtt/include -I/Users/user/esp/esp-idf/components/openssl/include -I/Users/user/esp/esp-idf/components/spiffs/include -I/Users/user/esp/esp-idf/components/ulp/include -I/Users/user/esp/esp-idf/components/wifi_provisioning/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/button/button/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/json_parser/upstream/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/json_parser/upstream -I/Users/user/Documents/rainmaker/esp-rainmaker/components/json_generator/upstream -I/Users/user/Documents/rainmaker/esp-rainmaker/components/esp_schedule/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/rmaker_common/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/esp_rainmaker/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/qrcode/include -I/Users/user/Documents/rainmaker/esp-rainmaker/components/ws2812_led -I/Users/user/Documents/rainmaker/esp-rainmaker/examples/common/app_reset -I/Users/user/Documents/rainmaker/esp-rainmaker/examples/common/app_wifi -mlongcalls -Wno-frame-address -g -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fmacro-prefix-map=/Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch=. -fmacro-prefix-map=/Users/user/esp/esp-idf=IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4-dev-479-g1067b2870\" -DESP_PLATFORM -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/app_homekit.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/app_homekit.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/app_homekit.c.obj -c ../main/app_homekit.c
../main/app_homekit.c:18:10: fatal error: hap.h: No such file or directory
#include <hap.h>
^~~~~~~
compilation terminated.
[4/11] Performing build step for 'bootloader'
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/sdkconfig
-- Adding linker script /Users/user/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/user/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /Users/user/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script /Users/user/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_hw_support esp_rom esp_system esptool_py hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /Users/user/esp/esp-idf/components/bootloader /Users/user/esp/esp-idf/components/bootloader_support /Users/user/esp/esp-idf/components/efuse /Users/user/esp/esp-idf/components/esp32 /Users/user/esp/esp-idf/components/esp_common /Users/user/esp/esp-idf/components/esp_hw_support /Users/user/esp/esp-idf/components/esp_rom /Users/user/esp/esp-idf/components/esp_system /Users/user/esp/esp-idf/components/esptool_py /Users/user/esp/esp-idf/components/hal /Users/user/esp/esp-idf/components/log /Users/user/esp/esp-idf/components/bootloader/subproject/main /Users/user/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /Users/user/esp/esp-idf/components/newlib /Users/user/esp/esp-idf/components/partition_table /Users/user/esp/esp-idf/components/soc /Users/user/esp/esp-idf/components/spi_flash /Users/user/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/user/Documents/rainmaker/esp-rainmaker/examples/homekit_switch/build/bootloader
ninja: no work to do.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
/**********************************/
homekit_switch doesn't compile
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: homekit_switch doesn't compile
Hi Virendra,
I just tried this on a MacBook and did not face any issues as such. Can you double check for typos in your HOMEKIT_PATH. I see that the path you mentioned is Users/user/Documents/homekit/esp-homekit-sdk/ which has a "/" missing at the beginning. Please confirm.
Regards,
Piyush
I just tried this on a MacBook and did not face any issues as such. Can you double check for typos in your HOMEKIT_PATH. I see that the path you mentioned is Users/user/Documents/homekit/esp-homekit-sdk/ which has a "/" missing at the beginning. Please confirm.
Regards,
Piyush
Who is online
Users browsing this forum: No registered users and 81 guests