-
Notifications
You must be signed in to change notification settings - Fork 37
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
ESP-IDF 5.1.1 compile fail #29
Comments
I tested builds only with ESP-IDF 4.4.5, since that is the version used with the Arduino framework. Let me have the commit id from the official espressif/arduino-esp32.git repository so this can be reproduced. |
I do not use the Arduino framework. I have a project based on the ESP-IDF framework. I downloaded the last version of the ESP-IDF from the official site (5.1.1) and got the last version of LibSSH-ESP32 (3.1.0). You can use my test repository (https://github.com/VNovytskyi/libssh-esp32-idf511-build) to try the build. This repository was created only to test the build process. I'd like to suggest adding the CMakeList.txt file to simplify the building process for non-Arduino projects. In the test project, you can see a lot of warnings/errors. These errors would be good to clean up. |
Awesome, thanks! When building against ESP-IDF v5.1.1 using
|
It is the first error that would be great to fix. It is an error that occurs in a lot of source files in LibSSH-ESP32. This error appeared because the ESP-IDF 5.1.1 started using the GCC 12.2.0, instead of the old GCC 8.4.0. You can read more information about this at https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.0/index.html and https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.1/index.html. I propose the following solution to this problem:
If we are using this solution we steel with backward compatibility (as I think, it needs to be tested). Another way to fix this problem is to replace the %u with %ul (the GCC 11 compiler must help you with hints about errors). In the case of this fix, case may be problems with backward compabilities in the future. The next error is missing the It is not a lot of a problem to update the LibSSH-ESP32 for ESP-IDF 5. You can feel free to ask me about some issues when you update the library. I hope the next release of LibSSH-ESP32 will have ESP-IDF 5 support. |
The following patch is applied to
Therefore if you set |
I'm still getting the same problem after deleting the conditional block and just having it set. long unsigned int in auth.c |
Fixed variables for recent GCC version, see: will make pull request. Need to fix the mbedtls_md_context issue. Espressif provides the following guide I'll follow |
Created pull request, compiles now but mostly untested |
The limitation of PRs is they do not address the re-porting needs when a new release of upstream libssh is available. I had not pushed the work I had done on this a couple of months ago. Now pushed, hence please refer to release 4.0.1 in new branch preview-arduino-esp32-3.0.0 commit 1a11d61 and advise. |
Oh nice thanks, I'll try this and report back |
I tested, I get returned |
Looking at this line of code, it comes from upstream. The best way to approach a fix is to get and apply a patch for libssh to use the newer mbedtls 3.1 (currently max 3.0 supported for 0.10 stable). However in any case, code for both versions of mbedtls will need to remain in order to support IDF 4.4 and 5 for Arduino. |
Hi, |
Acknowledged. I do not think fixing the compilation error is enough since I'd also expect further errors in regards to the new version of mbedtls in IDF 5. I believe support for the new mbedtls version is being added into the libssh master branch now, so maybe a re-port will be the solution (just for core 3.0.1+). |
I have pushed a preview release, branch preview-arduino-esp32-3.0.0 commit 917fc3d for you to test. I ran only basic tests and found no issues under 2.0.17 or 3.0.1. Let me know how you get on. |
Fixed with commit 057ada8. Please check and confirm. |
Brief: Can not compile the library with ESP-IDF project.
ESP-IDF version: 5.1.1
LibSSH-ESP32 version: 3.1.0
Errors list:
Notes:
#define ESP32
because there are two configuration files (libssh_esp32_config.h)*len = (unsigned int)mbedtls_md_get_size(c->MBEDTLS_PRIVATE(md_info));
Request: Test the LibSSH-ESP32 with ESP-IDF 5.1.1
The text was updated successfully, but these errors were encountered: