Page 1 of 1

https_server编译报错!

Posted: Thu Jul 06, 2023 2:30 am
by zhuwenjun
版本:IDF4.3.5
报错输出如下:
[982/983] Linking CXX executable https_server.elf
FAILED: https_server.elf
cmd.exe /C "cd . && D:\Espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc -nostartfiles -march=rv32imc --specs=nosys.specs @CMakeFiles\https_server.elf.rsp -o https_server.elf && cd ."
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: esp-idf/main/libmain.a(app_main.c.obj): in function `esp_create_https_server':
d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:216: undefined reference to `_binary_cacert_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:216: undefined reference to `_binary_cacert_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:217: undefined reference to `_binary_cacert_pem_end'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:217: undefined reference to `_binary_cacert_pem_end'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:221: undefined reference to `_binary_prvtkey_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:221: undefined reference to `_binary_prvtkey_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:222: undefined reference to `_binary_prvtkey_pem_end'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: d:\espressif\frameworks\esp-idf-v4.3.5\workspace\https_server\build/../main/app_main.c:222: undefined reference to `_binary_prvtkey_pem_end'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1


请问是什么原因?

Re: https_server编译报错!

Posted: Tue Aug 08, 2023 9:44 am
by ESP_YJM
能贴一下你使用的例程链接吗?看着像是没有把证书编译进去。

Re: https_server编译报错!

Posted: Thu May 16, 2024 2:46 pm
by 13942003258
我也碰到了同样的问题,请问这个问题解决了吗?

[983/984] Linking CXX executable https_server.elf
FAILED: https_server.elf
cmd.exe /C "cd . && D:\Espressif\tools\riscv32-esp-elf\esp-2021r2-patch3-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -march=rv32imc -nostartfiles -march=rv32imc --specs=nosys.specs @CMakeFiles\https_server.elf.rsp -o https_server.elf && cd ."
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: esp-idf/main/libmain.a(app_main.c.obj): in function `esp_create_https_server':
D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:216: undefined reference to `_binary_cacert_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:216: undefined reference to `_binary_cacert_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:217: undefined reference to `_binary_cacert_pem_end'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:217: undefined reference to `_binary_cacert_pem_end'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:221: undefined reference to `_binary_prvtkey_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:221: undefined reference to `_binary_prvtkey_pem_start'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:222: undefined reference to `_binary_prvtkey_pem_end'
d:/espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\projects\esp32\book-esp32c3-iot-projects-main\test_case\https_server\build/../main/app_main.c:222: undefined reference to `_binary_prvtkey_pem_end'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.