idf.py build failed!
Posted: Mon Nov 24, 2025 2:06 am
Question: idf.py build failed!
Environment:
window 11
Log:
IDF_TOOLS_PATH not set. Setting to D:\Espressif\
Setting PYTHONNOUSERSITE, was not set
Using Python in D:\Espressif\python_env\idf5.5_py3.11_env\Scripts\
Python 3.11.2
Using Git in D:\Espressif\tools\idf-git\2.44.0\cmd\
git version 2.44.0.windows.1
Activating ESP-IDF 5.5
Setting IDF_PATH to 'D:\Espressif\frameworks\esp-idf-v5.5.1'.
* Checking python version ... 3.11.2
* Checking python dependencies ... OK
* Deactivating the current ESP-IDF environment (if any) ... OK
* Establishing a new ESP-IDF environment ... OK
* Identifying shell ... cmd.exe
* Detecting outdated tools in system ... OK - no outdated tools found
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
D:\Espressif\frameworks\esp-idf-v5.5.1>idf.py build
Executing action: all (aliases: build)
Running cmake in directory D:\Espressif\frameworks\esp-idf-v5.5.1\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=D:\Espressif\python_env\idf5.5_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 D:\Espressif\frameworks\esp-idf-v5.5.1"...
-- The C compiler identification is Clang 19.1.2
-- The CXX compiler identification is Clang 19.1.2
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe
-- Check for working C compiler: D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe - broken
CMake Error at D:/Espressif/tools/cmake/3.30.2/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'D:/Espressif/frameworks/esp-idf-v5.5.1/build/CMakeFiles/CMakeScratch/TryCompile-j6pfeu'
Run Build Command(s): D:/Espressif/tools/ninja/1.12.1/ninja.exe -v cmTC_4d625
[1/2] D:\Espressif\tools\esp-clang\esp-19.1.2_20250312\esp-clang\bin\clang.exe -MD -MT CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -MF CMakeFiles\cmTC_4d625.dir\testCCompiler.c.obj.d -o CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -c D:/Espressif/frameworks/esp-idf-v5.5.1/build/CMakeFiles/CMakeScratch/TryCompile-j6pfeu/testCCompiler.c
[2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && D:\Espressif\tools\esp-clang\esp-19.1.2_20250312\esp-clang\bin\clang.exe CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -o cmTC_4d625.exe -Wl,--out-implib,libcmTC_4d625.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
FAILED: cmTC_4d625.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && D:\Espressif\tools\esp-clang\esp-19.1.2_20250312\esp-clang\bin\clang.exe CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -o cmTC_4d625.exe -Wl,--out-implib,libcmTC_4d625.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
ld.lld: error: unknown argument '--major-image-version'
ld.lld: error: unknown argument '--minor-image-version'
ld.lld: error: cannot open 0: No such file or directory
ld.lld: error: cannot open 0: No such file or directory
ld.lld: error: unable to find library -lkernel32
ld.lld: error: unable to find library -luser32
ld.lld: error: unable to find library -lgdi32
ld.lld: error: unable to find library -lwinspool
ld.lld: error: unable to find library -lshell32
ld.lld: error: unable to find library -lole32
ld.lld: error: unable to find library -loleaut32
ld.lld: error: unable to find library -luuid
ld.lld: error: unable to find library -lcomdlg32
ld.lld: error: unable to find library -ladvapi32
clang: error: ld command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the D:\Espressif\frameworks\esp-idf-v5.5.1\build\log\idf_py_stderr_output_9056 and D:\Espressif\frameworks\esp-idf-v5.5.1\build\log\idf_py_stdout_output_9056
D:\Espressif\frameworks\esp-idf-v5.5.1>
Environment:
window 11
Log:
IDF_TOOLS_PATH not set. Setting to D:\Espressif\
Setting PYTHONNOUSERSITE, was not set
Using Python in D:\Espressif\python_env\idf5.5_py3.11_env\Scripts\
Python 3.11.2
Using Git in D:\Espressif\tools\idf-git\2.44.0\cmd\
git version 2.44.0.windows.1
Activating ESP-IDF 5.5
Setting IDF_PATH to 'D:\Espressif\frameworks\esp-idf-v5.5.1'.
* Checking python version ... 3.11.2
* Checking python dependencies ... OK
* Deactivating the current ESP-IDF environment (if any) ... OK
* Establishing a new ESP-IDF environment ... OK
* Identifying shell ... cmd.exe
* Detecting outdated tools in system ... OK - no outdated tools found
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
D:\Espressif\frameworks\esp-idf-v5.5.1>idf.py build
Executing action: all (aliases: build)
Running cmake in directory D:\Espressif\frameworks\esp-idf-v5.5.1\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=D:\Espressif\python_env\idf5.5_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 D:\Espressif\frameworks\esp-idf-v5.5.1"...
-- The C compiler identification is Clang 19.1.2
-- The CXX compiler identification is Clang 19.1.2
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe
-- Check for working C compiler: D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe - broken
CMake Error at D:/Espressif/tools/cmake/3.30.2/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"D:/Espressif/tools/esp-clang/esp-19.1.2_20250312/esp-clang/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: 'D:/Espressif/frameworks/esp-idf-v5.5.1/build/CMakeFiles/CMakeScratch/TryCompile-j6pfeu'
Run Build Command(s): D:/Espressif/tools/ninja/1.12.1/ninja.exe -v cmTC_4d625
[1/2] D:\Espressif\tools\esp-clang\esp-19.1.2_20250312\esp-clang\bin\clang.exe -MD -MT CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -MF CMakeFiles\cmTC_4d625.dir\testCCompiler.c.obj.d -o CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -c D:/Espressif/frameworks/esp-idf-v5.5.1/build/CMakeFiles/CMakeScratch/TryCompile-j6pfeu/testCCompiler.c
[2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && D:\Espressif\tools\esp-clang\esp-19.1.2_20250312\esp-clang\bin\clang.exe CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -o cmTC_4d625.exe -Wl,--out-implib,libcmTC_4d625.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
FAILED: cmTC_4d625.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && D:\Espressif\tools\esp-clang\esp-19.1.2_20250312\esp-clang\bin\clang.exe CMakeFiles/cmTC_4d625.dir/testCCompiler.c.obj -o cmTC_4d625.exe -Wl,--out-implib,libcmTC_4d625.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
ld.lld: error: unknown argument '--major-image-version'
ld.lld: error: unknown argument '--minor-image-version'
ld.lld: error: cannot open 0: No such file or directory
ld.lld: error: cannot open 0: No such file or directory
ld.lld: error: unable to find library -lkernel32
ld.lld: error: unable to find library -luser32
ld.lld: error: unable to find library -lgdi32
ld.lld: error: unable to find library -lwinspool
ld.lld: error: unable to find library -lshell32
ld.lld: error: unable to find library -lole32
ld.lld: error: unable to find library -loleaut32
ld.lld: error: unable to find library -luuid
ld.lld: error: unable to find library -lcomdlg32
ld.lld: error: unable to find library -ladvapi32
clang: error: ld command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the D:\Espressif\frameworks\esp-idf-v5.5.1\build\log\idf_py_stderr_output_9056 and D:\Espressif\frameworks\esp-idf-v5.5.1\build\log\idf_py_stdout_output_9056
D:\Espressif\frameworks\esp-idf-v5.5.1>