AchimPieters / esp32-homekit

esp32-homekit
https://www.studiopieters.nl
MIT License
7 stars 2 forks source link

storage issue #6

Open itatboy opened 1 month ago

itatboy commented 1 month ago

Hi, I encountered the following error while compiling this project: undefined reference to `homekit_storage_reset' Any interface related to homekit_storage will report an error. Please note that the latest commit (commit c33288bb1eaa7Baa23486ba8bd74999dce773c) made significant changes to storage. Is there still any unfinished work Looking forward to your reply

AchimPieters commented 1 month ago

@itatboy I need some more information, did you follow these instructions? https://github.com/AchimPieters/esp32-homekit-demo

itatboy commented 1 month ago

Thank you for your prompt reply I deployed ESP-IDF V5.2.3 on the Ubuntu 20.04 system, then cloned the esp32 homekit demo project and executed the following command: cd ~/esp-idf . ./export.sh cd ~/esp32-homekit-demo/examples/led idf.py set-target esp32 idf.py menuconfig idf.py build We have received a large number of errors regarding homekit_storage, all of which are undefined references to. I noticed that in (commit c33288bb1eaa7Baa23486ba8bd74999dce773c), you made a lot of changes to storage, deleting the specific implementation of the homekit_storage function and only keeping the declaration. What is the purpose of doing this? Is it already implemented elsewhere, or is there any other dependency when compiling this project? When I revert back to your previous commit, it can compile smoothly

AchimPieters commented 1 month ago

@itatboy could you send mea log please?

AchimPieters commented 1 month ago

@itatboy I have fixed storage of pairing in esp32-homekit

Download the latest version and try again, all the problems should be solved now.

itatboy commented 1 month ago

In order to reduce the introduction of variables, I temporarily followed the instructions of esp32 homekit demo and installed esp-idf V5.2.2 using Docker, strictly following the REPORT STEPS. Unfortunately, the problem still exists.

Step

  1. docker pull espressif/idf:v5.2.2
  2. git clone --recursive https://github.com/AchimPieters/esp32-homekit-demo.git
  3. docker run -it -v ~/esp32-homekit-demo:/project -w /project espressif/idf:v5.2.2
  4. cd examples/led
  5. idf.py set-target esp32
  6. idf.py menuconfig
  7. idf.py build

Compilation error

image

Compile logs

idf_py_stdout_output_477.log

This may be a stable reproduction error, where is the problem? thank you

AchimPieters commented 1 month ago

@itatboy well as you can see it missing mdns.h it should be downloaded when compiling see https://github.com/AchimPieters/esp32-homekit/blob/main/idf_component.yml

So the problem is not within the code but missing a component.

Try idf.py fullclean or delete everthing and download the latest version as described above commented 2 hours ago

itatboy commented 1 month ago

This error is clearly caused by the lack of espresso/mdns dependency

Under normal circumstances, in the ESP-IDF framework, executing idf.py set-target esp32 will automatically generate the dependencies. lock file, and then download the dependencies to the managed_components directory.

When I use espressif/idf (Docker) according to the readme of esp32_homekit_demo and execute idf.py set-target esp32, the dependencies. lock file is not automatically generated, and there is not managed_components directory.

This may be an issue with Docker/IDF, which does not support resolving dependency problems and requires manual addition of components.

I think there is still room for improvement in the readme of esp32 homekit demo until it can be compiled smoothly according to the steps. When I compile according to the steps and get errors, the first thing that comes to my mind is that the project is still in the development stage and cannot be used. This may hinder the participation of most people.

AchimPieters commented 1 month ago

I can compile it just fine on my end, so clearly there's also something specific on your side. And yes, I will continue developing and improving the project. Perhaps you should try using the latest version of ESP-IDF, as I don’t believe the issue lies with Docker. What I would recommend is checking why the mDNS isn’t being downloaded in your case, and find out the reason for that, as it seems to be the only issue on your end. Once resolved, you should be able to compile step by step, and there would be no need to change the README file.

itatboy commented 1 month ago

Perhaps due to special network reasons, I will conduct testing on the Oracle server. Thank you for your reply. This question can be temporarily closed for now.