mrk-its / esphome-canopen

Apache License 2.0
24 stars 5 forks source link

ota_component.h not found #11

Closed timota closed 3 months ago

timota commented 3 months ago

With the latest ESPhome release, in time of writing (2024.6.6), probably earlier.

ESPhome Ota component has been changed, and now during compiling I got error below

In file included from src/esphome.h:27,
                 from src/esphome/components/canopen/canopen.cpp:2:
src/esphome/components/canopen/fw.h:5:10: fatal error: esphome/components/ota/ota_component.h: No such file or directory
 #include "esphome/components/ota/ota_component.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/can-sp-slave-01/src/esphome/components/canopen/canopen.cpp.o] Error 1
In file included from src/esphome.h:27,
                 from src/esphome/components/canopen/co_cmd.cpp:1:
src/esphome/components/canopen/fw.h:5:10: fatal error: esphome/components/ota/ota_component.h: No such file or directory
 #include "esphome/components/ota/ota_component.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from src/esphome.h:27,
                 from src/esphome/components/canopen/canopen.h:3,
                 from src/esphome/components/canopen/driver_can.cpp:1:
src/esphome/components/canopen/fw.h:5:10: fatal error: esphome/components/ota/ota_component.h: No such file or directory
 #include "esphome/components/ota/ota_component.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/can-sp-slave-01/src/esphome/components/canopen/co_cmd.cpp.o] Error 1
*** [.pioenvs/can-sp-slave-01/src/esphome/components/canopen/driver_can.cpp.o] Error 1
In file included from src/esphome.h:27,
                 from src/esphome/components/canopen/co_storage.cpp:1:
src/esphome/components/canopen/fw.h:5:10: fatal error: esphome/components/ota/ota_component.h: No such file or directory
 #include "esphome/components/ota/ota_component.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/can-sp-slave-01/src/esphome/components/canopen/co_storage.cpp.o] Error 1
========================= [FAILED] Took 22.91 seconds =========================

ESPHome ota url: https://github.com/esphome/esphome/tree/dev/esphome/components/ota

timota commented 3 months ago

is it any options to disable ota without refactoring ?

timota commented 3 months ago

Just need to remove line below to make it compile https://github.com/mrk-its/esphome-canopen/blob/main/components/canopen/fw.h#L5

mrk-its commented 3 months ago

Thanks. I just fixed it - for now esphome-canopen doesn't use OTA, it should compile now.