idf.py build报错 ninja failed with exit code 1

yuusphere
Posts: 2
Joined: Mon Nov 23, 2020 8:49 am

idf.py build报错 ninja failed with exit code 1

Postby yuusphere » Mon Nov 23, 2020 8:53 am

(base) yu:hello_world yuyuan$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /Users/yuyuan/esp/hello_world/build
Executing "ninja all"...
[0/1] Re-running CMake...
-- Unexpected file in components directory: /Users/yuyuan/esp/esp-idf/components/.DS_Store
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Project version: 1
-- Building ESP-IDF components for target esp32
CMake Deprecation Warning at /Users/yuyuan/esp/esp-idf/components/mbedtls/mbedtls/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.


-- Adding linker script /Users/yuyuan/esp/hello_world/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_netif esp_ringbuf esp_rom esp_serial_slave_link esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /Users/yuyuan/esp/esp-idf/components/app_trace /Users/yuyuan/esp/esp-idf/components/app_update /Users/yuyuan/esp/esp-idf/components/asio /Users/yuyuan/esp/esp-idf/components/bootloader /Users/yuyuan/esp/esp-idf/components/bootloader_support /Users/yuyuan/esp/esp-idf/components/bt /Users/yuyuan/esp/esp-idf/components/cbor /Users/yuyuan/esp/esp-idf/components/coap /Users/yuyuan/esp/esp-idf/components/console /Users/yuyuan/esp/esp-idf/components/cxx /Users/yuyuan/esp/esp-idf/components/driver /Users/yuyuan/esp/esp-idf/components/efuse /Users/yuyuan/esp/esp-idf/components/esp-tls /Users/yuyuan/esp/esp-idf/components/esp32 /Users/yuyuan/esp/esp-idf/components/esp_adc_cal /Users/yuyuan/esp/esp-idf/components/esp_common /Users/yuyuan/esp/esp-idf/components/esp_eth /Users/yuyuan/esp/esp-idf/components/esp_event /Users/yuyuan/esp/esp-idf/components/esp_gdbstub /Users/yuyuan/esp/esp-idf/components/esp_http_client /Users/yuyuan/esp/esp-idf/components/esp_http_server /Users/yuyuan/esp/esp-idf/components/esp_https_ota /Users/yuyuan/esp/esp-idf/components/esp_https_server /Users/yuyuan/esp/esp-idf/components/esp_local_ctrl /Users/yuyuan/esp/esp-idf/components/esp_netif /Users/yuyuan/esp/esp-idf/components/esp_ringbuf /Users/yuyuan/esp/esp-idf/components/esp_rom /Users/yuyuan/esp/esp-idf/components/esp_serial_slave_link /Users/yuyuan/esp/esp-idf/components/esp_websocket_client /Users/yuyuan/esp/esp-idf/components/esp_wifi /Users/yuyuan/esp/esp-idf/components/espcoredump /Users/yuyuan/esp/esp-idf/components/esptool_py /Users/yuyuan/esp/esp-idf/components/expat /Users/yuyuan/esp/esp-idf/components/fatfs /Users/yuyuan/esp/esp-idf/components/freemodbus /Users/yuyuan/esp/esp-idf/components/freertos /Users/yuyuan/esp/esp-idf/components/heap /Users/yuyuan/esp/esp-idf/components/idf_test /Users/yuyuan/esp/esp-idf/components/jsmn /Users/yuyuan/esp/esp-idf/components/json /Users/yuyuan/esp/esp-idf/components/libsodium /Users/yuyuan/esp/esp-idf/components/log /Users/yuyuan/esp/esp-idf/components/lwip /Users/yuyuan/esp/hello_world/main /Users/yuyuan/esp/esp-idf/components/mbedtls /Users/yuyuan/esp/esp-idf/components/mdns /Users/yuyuan/esp/esp-idf/components/mqtt /Users/yuyuan/esp/esp-idf/components/newlib /Users/yuyuan/esp/esp-idf/components/nghttp /Users/yuyuan/esp/esp-idf/components/nvs_flash /Users/yuyuan/esp/esp-idf/components/openssl /Users/yuyuan/esp/esp-idf/components/partition_table /Users/yuyuan/esp/esp-idf/components/perfmon /Users/yuyuan/esp/esp-idf/components/protobuf-c /Users/yuyuan/esp/esp-idf/components/protocomm /Users/yuyuan/esp/esp-idf/components/pthread /Users/yuyuan/esp/esp-idf/components/sdmmc /Users/yuyuan/esp/esp-idf/components/soc /Users/yuyuan/esp/esp-idf/components/spi_flash /Users/yuyuan/esp/esp-idf/components/spiffs /Users/yuyuan/esp/esp-idf/components/tcp_transport /Users/yuyuan/esp/esp-idf/components/tcpip_adapter /Users/yuyuan/esp/esp-idf/components/ulp /Users/yuyuan/esp/esp-idf/components/unity /Users/yuyuan/esp/esp-idf/components/vfs /Users/yuyuan/esp/esp-idf/components/wear_levelling /Users/yuyuan/esp/esp-idf/components/wifi_provisioning /Users/yuyuan/esp/esp-idf/components/wpa_supplicant /Users/yuyuan/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yuyuan/esp/hello_world/build
ninja: error: '../secure_boot_signing_key.pem', needed by 'signature_verification_key.bin', missing and no known rule to make it
ninja failed with exit code 1
(base) yu:hello_world yuyuan$ idf.py menuconfig
Executing action: menuconfig
Running ninja in directory /Users/yuyuan/esp/hello_world/build
Executing "ninja menuconfig"...
[0/1] cd /Users/yuyuan/esp/hello_world...Users/yuyuan/esp/hello_world/sdkconfig
TERM environment variable is set to "xterm-256color"
Loaded configuration '/Users/yuyuan/esp/hello_world/sdkconfig'
No changes to save (for '/Users/yuyuan/esp/hello_world/sdkconfig')
(base) yu:hello_world yuyuan$ idf.py build
Executing action: all (aliases: build)
Running ninja in directory /Users/yuyuan/esp/hello_world/build
Executing "ninja all"...
[0/1] Re-running CMake...
-- Unexpected file in components directory: /Users/yuyuan/esp/esp-idf/components/.DS_Store
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Project version: 1
-- Building ESP-IDF components for target esp32
CMake Deprecation Warning at /Users/yuyuan/esp/esp-idf/components/mbedtls/mbedtls/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.


-- Adding linker script /Users/yuyuan/esp/hello_world/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /Users/yuyuan/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_http_client esp_http_server esp_https_ota esp_https_server esp_local_ctrl esp_netif esp_ringbuf esp_rom esp_serial_slave_link esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /Users/yuyuan/esp/esp-idf/components/app_trace /Users/yuyuan/esp/esp-idf/components/app_update /Users/yuyuan/esp/esp-idf/components/asio /Users/yuyuan/esp/esp-idf/components/bootloader /Users/yuyuan/esp/esp-idf/components/bootloader_support /Users/yuyuan/esp/esp-idf/components/bt /Users/yuyuan/esp/esp-idf/components/cbor /Users/yuyuan/esp/esp-idf/components/coap /Users/yuyuan/esp/esp-idf/components/console /Users/yuyuan/esp/esp-idf/components/cxx /Users/yuyuan/esp/esp-idf/components/driver /Users/yuyuan/esp/esp-idf/components/efuse /Users/yuyuan/esp/esp-idf/components/esp-tls /Users/yuyuan/esp/esp-idf/components/esp32 /Users/yuyuan/esp/esp-idf/components/esp_adc_cal /Users/yuyuan/esp/esp-idf/components/esp_common /Users/yuyuan/esp/esp-idf/components/esp_eth /Users/yuyuan/esp/esp-idf/components/esp_event /Users/yuyuan/esp/esp-idf/components/esp_gdbstub /Users/yuyuan/esp/esp-idf/components/esp_http_client /Users/yuyuan/esp/esp-idf/components/esp_http_server /Users/yuyuan/esp/esp-idf/components/esp_https_ota /Users/yuyuan/esp/esp-idf/components/esp_https_server /Users/yuyuan/esp/esp-idf/components/esp_local_ctrl /Users/yuyuan/esp/esp-idf/components/esp_netif /Users/yuyuan/esp/esp-idf/components/esp_ringbuf /Users/yuyuan/esp/esp-idf/components/esp_rom /Users/yuyuan/esp/esp-idf/components/esp_serial_slave_link /Users/yuyuan/esp/esp-idf/components/esp_websocket_client /Users/yuyuan/esp/esp-idf/components/esp_wifi /Users/yuyuan/esp/esp-idf/components/espcoredump /Users/yuyuan/esp/esp-idf/components/esptool_py /Users/yuyuan/esp/esp-idf/components/expat /Users/yuyuan/esp/esp-idf/components/fatfs /Users/yuyuan/esp/esp-idf/components/freemodbus /Users/yuyuan/esp/esp-idf/components/freertos /Users/yuyuan/esp/esp-idf/components/heap /Users/yuyuan/esp/esp-idf/components/idf_test /Users/yuyuan/esp/esp-idf/components/jsmn /Users/yuyuan/esp/esp-idf/components/json /Users/yuyuan/esp/esp-idf/components/libsodium /Users/yuyuan/esp/esp-idf/components/log /Users/yuyuan/esp/esp-idf/components/lwip /Users/yuyuan/esp/hello_world/main /Users/yuyuan/esp/esp-idf/components/mbedtls /Users/yuyuan/esp/esp-idf/components/mdns /Users/yuyuan/esp/esp-idf/components/mqtt /Users/yuyuan/esp/esp-idf/components/newlib /Users/yuyuan/esp/esp-idf/components/nghttp /Users/yuyuan/esp/esp-idf/components/nvs_flash /Users/yuyuan/esp/esp-idf/components/openssl /Users/yuyuan/esp/esp-idf/components/partition_table /Users/yuyuan/esp/esp-idf/components/perfmon /Users/yuyuan/esp/esp-idf/components/protobuf-c /Users/yuyuan/esp/esp-idf/components/protocomm /Users/yuyuan/esp/esp-idf/components/pthread /Users/yuyuan/esp/esp-idf/components/sdmmc /Users/yuyuan/esp/esp-idf/components/soc /Users/yuyuan/esp/esp-idf/components/spi_flash /Users/yuyuan/esp/esp-idf/components/spiffs /Users/yuyuan/esp/esp-idf/components/tcp_transport /Users/yuyuan/esp/esp-idf/components/tcpip_adapter /Users/yuyuan/esp/esp-idf/components/ulp /Users/yuyuan/esp/esp-idf/components/unity /Users/yuyuan/esp/esp-idf/components/vfs /Users/yuyuan/esp/esp-idf/components/wear_levelling /Users/yuyuan/esp/esp-idf/components/wifi_provisioning /Users/yuyuan/esp/esp-idf/components/wpa_supplicant /Users/yuyuan/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/yuyuan/esp/hello_world/build
ninja: error: '../secure_boot_signing_key.pem', needed by 'signature_verification_key.bin', missing and no known rule to make it
ninja failed with exit code 1

:cry:
请问如何解决呢?

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: idf.py build报错 ninja failed with exit code 1

Postby ESP_morris » Mon Nov 23, 2020 9:02 am

secure_boot_signing_key.pem找不到这个文件?
另外你用的什么系统?Cmake版本有点老啊,我们推荐至少3.5

yuusphere
Posts: 2
Joined: Mon Nov 23, 2020 8:49 am

Re: idf.py build报错 ninja failed with exit code 1

Postby yuusphere » Mon Nov 23, 2020 2:19 pm

ESP_morris wrote:
Mon Nov 23, 2020 9:02 am
secure_boot_signing_key.pem找不到这个文件?
另外你用的什么系统?Cmake版本有点老啊,我们推荐至少3.5
macOS 11.0.1
cmake3.19按官网教程下载的 :idea:

GrandRiver
Posts: 9
Joined: Thu Dec 03, 2020 1:18 am

Re: idf.py build报错 ninja failed with exit code 1

Postby GrandRiver » Fri Dec 04, 2020 2:11 pm

yuusphere wrote:
Mon Nov 23, 2020 2:19 pm
ESP_morris wrote:
Mon Nov 23, 2020 9:02 am
secure_boot_signing_key.pem找不到这个文件?
另外你用的什么系统?Cmake版本有点老啊,我们推荐至少3.5
macOS 11.0.1
cmake3.19按官网教程下载的 :idea:
怎么查看cmake 版本?

txxxxxxxx
Posts: 2
Joined: Sun Feb 07, 2021 2:26 am

Re: idf.py build报错 ninja failed with exit code 1

Postby txxxxxxxx » Sun Feb 07, 2021 7:41 am

我在esp-who中编译里面得example也出现过ninja failed with exit code 1。
我的解决方法是,关闭并重新打开终端,进去esp-who里面得esp-idf执行export.bat,这样idf.py build就能成功了。

randt_zdj
Posts: 2
Joined: Tue Mar 02, 2021 1:43 am

Re: idf.py build报错 ninja failed with exit code 1

Postby randt_zdj » Tue Mar 02, 2021 1:51 am

建议试一下把项目目录下面的build目录全部删除,重新编译。

Who is online

Users browsing this forum: No registered users and 209 guests