cd esp-idf
./install.sh esp32
. $HOME/esp/esp-idf/export.sh
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
cd ~/esp/hello_world
idf.py set-target esp32
Build or installation Logs.
idf.py set-target esp32
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/Users/huangganggui/esp/hello_world/build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32, new sdkconfig will be created.
Running cmake in directory /Users/huangganggui/esp/hello_world/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/huangganggui/.espressif/python_env/idf5.2_py3.12_env/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /Users/huangganggui/esp/hello_world"...
-- Found Git: /opt/homebrew/bin/git (found version "2.47.0")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.30.5/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/huangganggui/esp/hello_world/build/CMakeFiles/CMakeScratch/TryCompile-2cNieM'
Run Build Command(s): /opt/homebrew/bin/ninja -v cmTC_b00e9
[1/2] /Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -o CMakeFiles/cmTC_b00e9.dir/testCCompiler.c.obj -c /Users/huangganggui/esp/hello_world/build/CMakeFiles/CMakeScratch/TryCompile-2cNieM/testCCompiler.c
[2/2] : && /Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy :-L/opt/homebrew/opt/libffi/lib CMakeFiles/cmTC_b00e9.dir/testCCompiler.c.obj -o cmTC_b00e9 && :
FAILED: cmTC_b00e9
: && /Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -mlongcalls -Wno-frame-address -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy :-L/opt/homebrew/opt/libffi/lib CMakeFiles/cmTC_b00e9.dir/testCCompiler.c.obj -o cmTC_b00e9 && :
/Users/huangganggui/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: cannot find :-L/opt/homebrew/opt/libffi/lib: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
/Users/huangganggui/esp/esp-idf/tools/cmake/project.cmake:506 (__project)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /Users/huangganggui/esp/hello_world/build/log/idf_py_stderr_output_84932 and /Users/huangganggui/esp/hello_world/build/log/idf_py_stdout_output_84932
huangganggui@caiqiurudeMacBook-Pro hello_world %
More Information.
idf.py build also failed
/opt/homebrew/opt/libffi/lib exist
ls /opt/homebrew/opt/libffi/lib
libffi.8.dylib libffi.a libffi.dylib pkgconfig
I also tried on version v5.2.3 v5.1.5 and same question.
Answers checklist.
IDF version.
v5.2.3
Operating System used.
macOS
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
What is the expected behavior?
success
What is the actual behavior?
faild
Steps to reproduce.
git clone -b v5.2.3 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf ./install.sh esp32 . $HOME/esp/esp-idf/export.sh cd ~/esp cp -r $IDF_PATH/examples/get-started/hello_world . cd ~/esp/hello_world idf.py set-target esp32
Build or installation Logs.
More Information.
idf.py build
also failed/opt/homebrew/opt/libffi/lib exist
ls /opt/homebrew/opt/libffi/lib
libffi.8.dylib libffi.a libffi.dylib pkgconfigI also tried on version v5.2.3 v5.1.5 and same question.