-
-
Notifications
You must be signed in to change notification settings - Fork 786
Description
Summary
ESP-IDF CMake configure fails in PlatformIO on macOS with missing CMakeFiles/git-data/head-ref and fatal: Needed a single revision.
Error
-- Configuring incomplete, errors occurred!
CMake Error at .pioenvs/poe-speaker/CMakeFiles/git-data/grabRef.cmake:48 (file):
file failed to open for reading (No such file or directory):
/Users/rioli/.esphome/build/poe-speaker/.pioenvs/poe-speaker/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
/Users/rioli/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:83 (include)
/Users/rioli/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:93 (get_git_head_revision)
/Users/rioli/.platformio/packages/framework-espidf/tools/cmake/build.cmake:99 (git_describe)
/Users/rioli/.platformio/packages/framework-espidf/tools/cmake/build.cmake:282 (__build_get_idf_git_revision)
/Users/rioli/.platformio/packages/framework-espidf/tools/cmake/idf.cmake:55 (__build_init)
/Users/rioli/.platformio/packages/framework-espidf/tools/cmake/project.cmake:29 (include)
CMakeLists.txt:2 (include)
warning: user value 0 on the int symbol LWIP_BRIDGEIF_MAX_PORTS (defined at /Users/rioli/.platformio/packages/framework-espidf/components/lwip/Kconfig:1222) ignored due to being outside the active range ([1, 63]) -- falling back on defaults
fatal: Needed a single revision
fatal: Needed a single revision## Environment
- OS: macOS 15.6.1 (Darwin 24.6.0, arm64)
- Python: 3.13.2
- Git: 2.52.0
- PlatformIO Core: 6.1.18
pio system info
PlatformIO Core 6.1.18
Python 3.13.2-final.0
System Type darwin_arm64
Platform macOS-15.6.1
File System Encoding utf-8
Locale Encoding UTF-8
PlatformIO Core Directory /Users/rioli/.platformio
PlatformIO Core Executable /Library/Frameworks/Python.framework/Versions/3.13/bin/platformio
Python Executable /Library/Frameworks/Python.framework/Versions/3.13/bin/python3
Global Libraries 0
Development Platforms 0
Tools & Toolchains 0## Notes
~/.platformio/packages/framework-espidf/.gitdoes not exist:ls: /Users/rioli/.platformio/packages/framework-espidf/.git: No such file or directory
- This suggests the installed
framework-espidfpackage lacks git metadata, but ESP-IDF CMake still attempts to derive a git revision and fails.
Steps to Reproduce
- On macOS arm64, install PlatformIO Core 6.1.18.
- Build an ESP-IDF based project (in my case triggered via ESPHome building for an ESP32 target).
- CMake configure fails with missing
head-refandfatal: Needed a single revision.
Expected Behavior
CMake configure/build succeeds even if the installed ESP-IDF framework package is not a git repository (or otherwise does not provide git metadata).
Actual Behavior
CMake configure fails with missing CMakeFiles/git-data/head-ref and fatal: Needed a single revision.