-
Notifications
You must be signed in to change notification settings - Fork 129
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
Unable to reference MBEDTLS_ERR_NET_SEND_FAILED and MBEDTLS_ERR_NET_RECV_FAILED after upgrade to ESP-IDF v5.3.2 / esp-idf-svc 0.50.1 #361
Comments
I think in 4.4.X you had those symbols, because 4.4.X uses an older/different mbedtls library and mbedtls porting layer, and the "net_sockets.h" header got included anyway even if we do not explicitly include it in our bindings header. In 5.X, the ESP IDF folks did some includes' cleanup, and now some headers are missing unless we explicitly re-add them. While I think it is not a problem to just add the "net_sockets.h" header to the list of mbedtls includes from above, I'm a bit more concerned whether you sould be using anything from that header (even #define-s) anyway, because - while the header with the defines and function signatures seems always available and safe to include - its function implementations are only available if So before just including this header into the |
Those are all fair points and questions, and thanks for the prompt reply. In this instance, we use these error values while implementing the three callbacks needed by Note that I'm not the original author of this code, I'm merely trying to position us to make the jump to ESP-IDF 5 as soon as we can, given that ESP-IDF 4 is EOL, and this is currently blocking me. I can get the original author involved if it would help clarify our usage. I do understand your position about not exporting symbols that may not be meaningfully usable. On the other hand, in this case, an available symbol was revoked. On the other other hand, this is a major version bump for ESP-IDF, so, fair enough to do that, but it is a bit inconvenient and I don't have an obvious path forward. |
Interesting. The mbedtls documentation is unfortunately lacking the detail as to is it OK to return those error codes from the "bio" callbacks in the first place. But if you believe returning these is OK, then why not, we can always include the header in our bindings.h file. In fact, if you open a PR with that, I can merge immediately given that the CI completes.
It might be that we are implementing the same thing, except slightly differently. I mean, if you guys are implementing a TLS socket layer, and not some other custom encryption scheme based on mbedtls (I don't know WebRTC). Look at
Would be nice, specifically in relation to my observation from above.
You can always return the actual constants behind these |
Bug description
I'm attempting to update an
esp-rs
based project which is currently using ESP-IDF v4.4.8 / esp-idf-svc 0.48.1 / esp-idf-sys 0.34.1 to ESP-IDF v5.3.2 / esp-idf-svc 0.50.1 / esp-idf-sys 0.36.0.Things are mostly building, but I've found that references to
esp_idf_svc::sys::MBEDTLS_ERR_NET_SEND_FAILED
andesp_idf_svc::sys::MBEDTLS_ERR_NET_RECV_FAILED
no longer work.The symbols do still seem to be part of mbedtls as bundled in ESP-IDF v5.3.2:
But when I look for these symbols in
bindings.rs
generated with ESP-IDF v5.3.2 / esp-idf-svc 0.50.1 I don't get any matches:However, after reverting to an ESP-IDF v4.4.8 / esp-idf-svc 0.48.1 build I can see those symbols are generated into
bindings.rs
:Sure, if it is a real issue and I haven't messed something up, I'd be happy to work on a fix with some guidance if that would be helpful.
To Reproduce
Check out acmorrow/micro-rdk@0c7c2aa and run
make build-esp32-bin
, and you should see errors like:Note that there are some other errors in there that I haven't investigated yet.
Expected behavior
Unless these symbols have been removed from mbedtls (doesn't seem like it) or purposely withdrawn from visibility as part of esp-idf / esp-idf-sys, I'd expect to be able to continue to use them. I looked but didn't see any sort of release note that seemed to hint at that. Also possible i'm missing some new kconfig option or esp-idf-[sys,svc] feature?
Environment
esp-idf-sys
) version: 0.36.0The text was updated successfully, but these errors were encountered: