-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idf.py build system fails on 4.3 and 4.2 due to missing referece to esptool_py_flash_target function in component/partition_table/CMakeLists.txt (IDFGH-4874) #6670
Comments
This also reproduced on the docker image to build, referenced here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html |
My project was using the When I remove `app_update, the project builds fine on v4.2 and v4.3. Without the Interestingly,
I dont know if CMake will process the subproject before the PRIV_REQUIRES but if it does, that might explain why the project builds sucessfully without |
Here's an example of project that won't build and causes error, but then builds (not compiles!) with proposed change |
Hi @marcidy, Thanks for the detailed description and the PR. Agree with your conclusion. The key to triggering the bug is that normally all components are included in the build, but because your sample project has Will merge the Pull Request ASAP, but in the meantime a workaround that doesn't involve patching ESP-IDF is to add |
…s it Many components uses esptool_py_flash_target function, they all should explicitly requier the esptool_py component. Related to #6670
…s it Many components uses esptool_py_flash_target function, they all should explicitly requier the esptool_py component. Related to espressif#6670
Environment
git describe --tags
to find it): v4.3, v4.2Problem Description
create a project with a component that REQUIRES app_update
idf,py build fails with error:
upgrading from v4.1 to v4.2 or v4.3 resulted failure to build a simple project. (The project doesn't compile at the moment, though this is not relevant to the build failure, which doesn't get to the compile stage)
I removed the build directory and rebuilt the toolchain a number of times with different versions of the idf, all with the same result.
I deleted esp-idf repo clone, removed ~/.espressif/ directories, cloned from scratch per instructions, and attempted a number of fresh installations (install.sh, export.sh) using a few versions. All failed with the same error.
multiple
idf.py commands
failed similarly.Steps to reproduce
run any invocation of idf.py on a fresh installation
Debug Logs
Possible Solution Indication
esptool_py_flash_target
is defined in theesptool_py
component, inproject_include.cmake
.Inspecting the
partition_table
CMakeList.txt, I didn't see a reference to the esptool_py component. I changed line 1 incomponents/partition_table/CMakeLists.txt
to:And now the build works fine.
other components that require esptool_py* functions appear to include the component in some fashion, e.g.
components/bootloader/subprojectCMakeLists.txt
:Reverting the change causes the failure.
I don't know if that's correct, but it indicates to me the partition_table component is not being passed the reference to functions defined in
components/esptool_py/CMakeLists.txt
.Notes
I reproduced this issue after multiple attempts at freshly installing esp-idf in clean directories, including using
IDF_TOOLS_PATH
to segregate the issue from my home directory or other installations. All attempts reproduced the problem.I will attempt further investigation as to why this suddenly is an issue for me. I would expect this failure to impact other people on these versions. At this time I cannot localize the issue to something I did, and it's reproducible for me at least.
The text was updated successfully, but these errors were encountered: