Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TW#23646] 编译get-started/project_template错误 #241

Closed
donny681 opened this issue Jun 27, 2018 · 17 comments
Closed

[TW#23646] 编译get-started/project_template错误 #241

donny681 opened this issue Jun 27, 2018 · 17 comments
Assignees

Comments

@donny681
Copy link

donny681 commented Jun 27, 2018

我用最新sdk编译project_template,出现以下错误

In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/sha512.c:30: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ CC build/ssl/mbedtls/mbedtls/library/error.o In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/x509write_csr.c:30: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ CC build/ssl/mbedtls/mbedtls/library/version_features.o In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/x509_csr.c:35: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/pk.c:25: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/oid.c:27: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/ccm.c:34: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/md5.c:30: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/ripemd160.c:31: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/aes.c:31: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/pkcs12.c:31: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/ripemd160.o' failed make[1]: *** [mbedtls/mbedtls/library/ripemd160.o] Error 1 make[1]: *** 正在等待未完成的任务.... /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/pkcs12.o' failed make[1]: *** [mbedtls/mbedtls/library/pkcs12.o] Error 1 In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/camellia.c:31: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/cipher.c:29: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/ccm.o' failed make[1]: *** [mbedtls/mbedtls/library/ccm.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/x509write_csr.o' failed make[1]: *** [mbedtls/mbedtls/library/x509write_csr.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/camellia.o' failed make[1]: *** [mbedtls/mbedtls/library/camellia.o] Error 1 In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/ecp_curves.c:25: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/arc4.c:30: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/blowfish.c:31: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/entropy_poll.c:25: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/blowfish.o' failed make[1]: *** [mbedtls/mbedtls/library/blowfish.o] Error 1 In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/ssl_ticket.c:25: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/ssl_ticket.o' failed make[1]: *** [mbedtls/mbedtls/library/ssl_ticket.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/arc4.o' failed make[1]: *** [mbedtls/mbedtls/library/arc4.o] Error 1 In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/version_features.c:25: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ In file included from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/port/esp8266/include/mbedtls/esp_config.h:2965:0, from /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/library/error.c:25: /home/ai-thinker/esp/ESP8266_RTOS_SDK/components/ssl/mbedtls/mbedtls/include/mbedtls/check_config.h:220:2: error: #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" #error "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" ^ /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/pk.o' failed make[1]: *** [mbedtls/mbedtls/library/pk.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/md5.o' failed make[1]: *** [mbedtls/mbedtls/library/md5.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/entropy_poll.o' failed make[1]: *** [mbedtls/mbedtls/library/entropy_poll.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/oid.o' failed make[1]: *** [mbedtls/mbedtls/library/oid.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/version_features.o' failed make[1]: *** [mbedtls/mbedtls/library/version_features.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/cipher.o' failed make[1]: *** [mbedtls/mbedtls/library/cipher.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/aes.o' failed make[1]: *** [mbedtls/mbedtls/library/aes.o] Error 1 WARNING: Toolchain version is not supported: 1.22.0-60-g37b07f6 Expected to see version: 1.22.0-80-g6c4433a Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk. WARNING: Compiler version is not supported: Expected to see version(s): 5.2.0 Please check ESP-IDF setup instructions and update the toolchain, or proceed at your own risk. /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/error.o' failed make[1]: *** [mbedtls/mbedtls/library/error.o] Error 1T /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/x509_csr.o' failed make[1]: *** [mbedtls/mbedtls/library/x509_csr.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/ecp_curves.o' failed make[1]: *** [mbedtls/mbedtls/library/ecp_curves.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/component_wrapper.mk:285: recipe for target 'mbedtls/mbedtls/library/sha512.o' failed make[1]: *** [mbedtls/mbedtls/library/sha512.o] Error 1 /home/ai-thinker/esp/ESP8266_RTOS_SDK/make/project.mk:467: recipe for target 'component-ssl-build' failed make: *** [component-ssl-build] Error 2

初步调查到是打开menuconfig->ssl->mbedtls-> TLS Key Exchange Methods里面功能导致出现错误。

@27-301
Copy link

27-301 commented Jun 28, 2018

@donny681
Copy link
Author

@27-301 是的,大概什么时候能够修复好,因为我们要对接aws,但是这个加密问题一直编译不过

@27-301
Copy link

27-301 commented Jun 28, 2018

@donny681 希望你对 IDF 有些熟悉,当前 8266 SDK 做了较大的重构,今天会同步一个版本出来,做到和 IDF APIs 基本兼容。因此你应用层的代码需要做相应测修改。关于 aws,在我们计划内的。你也可以参考 IDF 中的 aws_iot 以及其 demo,理论上是可以直接拿过来使用的。

@FayeY FayeY removed their assignment Jun 28, 2018
@FayeY FayeY changed the title 编译get-started/project_template错误 [TW#23646] 编译get-started/project_template错误 Jun 28, 2018
@donny681
Copy link
Author

donny681 commented Jun 29, 2018

是的,我已经玩8266和32至少2年了,所以对乐鑫芯片非常熟悉,你们现在最新8266 sdk目标是跟esp32 sdk框架差不多。你们昨天更新的SDK,里面example例子主函数名字要改为app_main()吧,否则会编译报错。

@donny681
Copy link
Author

其实已经把esp32 aws移植到8266差不多了,只是sdk mbedtls库加密还是出现错误,所以才咨询你们

@27-301
Copy link

27-301 commented Jun 29, 2018

examples 还没来得急改,会尽快。aws 下周有时间会加进来。因为重构了挺多,因此测试工作量比较大。有其他问题和建议,也欢迎提上来。

@donny681
Copy link
Author

donny681 commented Jul 9, 2018

我尝试编译你们最新ESP8266_RTOS_SDK,根据你们提供的demo,缺少了esp_misc.h,esp_sta.h,esp_system.h等头文件

@27-301
Copy link

27-301 commented Jul 10, 2018

@donny681 which commit and which example lead this header missing?

BTW: commit cb0c5ee has aws iot demos, please refer to examples/protocols/aws_iot, please try and give me feedback.

@donny681
Copy link
Author

donny681 commented Jul 11, 2018

Hi,我测试该aws subscribe_publish_sample是可用的,thing_shadow_sample不可用

menu saveimg savepath20180711212051

还发现一个问题,我初始化uart_init_new()函数,模块出现复位重启,我打算做串口输入。

@donny681
Copy link
Author

@projectgus 发现调用ETS_UART_INTR_ENABLE()函数出现问题

@donny681
Copy link
Author

test

找到问题,原因是json数据错误,明天我修复这个问题

@27-301
Copy link

27-301 commented Jul 12, 2018

uart is under refactoring.

For the fix of thing_shadow_sample, can you raise a PR to fix it?

Thanks

@donny681
Copy link
Author

嗯,已经找到问题了,因为esp8266不支持浮点型字符串格式化,你们工程师igrr已经确认这个事情(https://github.com/esp8266/Arduino/issues/1179),可以参考(http://yaab-arduino.blogspot.com/2015/12/how-to-sprintf-float-with-arduino.html),稍后我把工程pull requests给您们

@donny681
Copy link
Author

@projectgus 已经修复了aws thing shadow错误问题。请查看PR(#255)

@27-301
Copy link

27-301 commented Jul 12, 2018

@donny681 SDK can support float for snprintf. In order to save some memory, SDK use newlib in nano mode by default. But you can use new lib in normal mode, in menuconfig, choose Component config->Newlib->newlib level, and choose normal. We will modify the sdkconfig.default for thing_shadow demo.

some info:
For more details about "nano" formatting option, please see newlib readme file, search for '--enable-newlib-nano-formatted-io': https://sourceware.org/newlib/README

@coraminformatica
Copy link

coraminformatica commented Aug 25, 2018

Hello @27-301 ,
The MBEDTLS_DHM_C should not be defined as constitutes a security risk (it is also stated in the esp_config.h source code).
While it is better leave off "Enable DHE-RSA based ciphersuite modes" in ESP IDF configurator.
Setting this option off, solve the compilation error and raises the system security.
To set the options off run make menuconfig in your project root folder, then navigate to:
Component config -> SSL -> mbedTLS -> TLS Key Exchange Methods -> Uncheck "Enable DHE-RSA based ciphersuite modes"
Hope could be useful

@FayeY FayeY closed this as completed Oct 22, 2018
@FayeY
Copy link

FayeY commented Oct 22, 2018

Off the topic, please submit a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants