sparkfun/SparkFun_RTK_Firmware

Source compilation issue - missing SSLClientESP32 and mbedtls/net.h

semuadmin opened this issue · 5 comments

Subject of the issue

Attempting to compile the RTK Surveyor source using the Arduino IDE in accordance with the instructions here. I get a series of missing library errors.

Your workbench

Using Arduino IDE 2.3.3 on MacOS Sequoia 15.1 (ARM64).

Steps to reproduce

  1. Open the RTK Surveyor firmware source folder in Arduino IDE.
  2. Set the ESP32 hardware configuration as specified in the 'compiling source' document.
  3. Add all libraries listed in the 'Required Libraries' section of the 'compiling source' document via the Arduino LIbrary Manager (including those only available on GitHub).

Expected behavior

Successful compilation and linking.

Actual behavior

I get the following missing library error:

/Users/semuadmin/Library/CloudStorage/Dropbox/Development/workspace_vscode/SparkFun_RTK_Firmware/Firmware/RTK_Surveyor/RTK_Surveyor.ino:83:10: fatal error: SSLClientESP32.h: No such file or directory
   83 | #include <SSLClientESP32.h> // http://librarymanager/All#SSLClientESP32
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: SSLClientESP32.h: No such file or directory

On installing what I presume to be the missing library (https://github.com/alkonosst/SSLClientESP32), I get a further error:

In file included from /Users/semuadmin/Documents/Arduino/libraries/SSLClientESP32/src/SSLClientESP32.h:25,
                 from /Users/semuadmin/Library/CloudStorage/Dropbox/Development/workspace_vscode/SparkFun_RTK_Firmware/Firmware/RTK_Surveyor/RTK_Surveyor.ino:83:
/Users/semuadmin/Documents/Arduino/libraries/SSLClientESP32/src/ssl_lib_client.h:11:10: fatal error: mbedtls/net.h: No such file or directory
   11 | #include "mbedtls/net.h"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

I did a quick Google but couldn't see any obvious remedy.

Are you able to advise on which specific SSL/TLS and/or related libraries I need to install to successfully compile the firmware?

As an aside, not an issue at all but has any consideration been given to porting this library to VSCode PlatformIO? Appreciate the Arduino IDE is ubiquitous, but the PlatformIO extension to VSCode has (imho) far superior editing and debugging facilities, and the dependent configuration and libraries can all be specified in a single platformio.ini file for ease of management.

Welcome @semuadmin! Be sure to use v2.0.2 of the ESP32 core. alkonosst's is the correct SSLClientESP32 library. Be sure your library versions match the versions listed in the compilation yaml.

has any consideration been given to porting this library to VSCode PlatformIO?

This has been discussed before. In general, we too have moved past the IDE and use the CLI extensively. PlatformIO doesn't get us anything at the moment.

gdt commented

It would be nice if the README were updated so that following it was all you had to know. Even if it says to read the yaml and get that!

I'm -1 on supporting any proprietary tooling, and more than happy to have a CLI-only build process where people are expected to use whatever editor they want to edit the sources.

gdt commented

I have no objection to making things easier for multiple toolchains and editors. I should have said something a bit crisper, which was that I don't think it's good to favor or begin to go down the path of recommending it as a primary path. My wording was overly enthusiastic....

@semuadmin - I have no problem with a restructure to support other environments. We are very much a do-ocracy. If you'd like the door a different color, please pick the color and paint it. As long as it doesn't break our current workflow (too much :)), then I'll welcome the PR.

@semuadmin - I have no problem with a restructure to support other environments. We are very much a do-ocracy. If you'd like the door a different color, please pick the color and paint it. As long as it doesn't break our current workflow (too much :)), then I'll welcome the PR.

Thanks @nseidle

As per your DM, I may focus on the newer RTK Everywhere repo, though it'll probably be a while before I get to it :-)

Where I'm coming from is - for prospective contributors who would like to use an IDE for editing and potentially as part of the build and deploy chain, AFAIK using the Arduino *.ino structures pretty much obligates them to use the Arduino IDE (or a handful of geriatric Eclipse plugins), which is fine for hobbyists but not - I would argue - fit for purpose for more advanced work.

By migrating (in due course) to the de facto standard C++ repo structure (*.h, *.cpp in /src), the contributor is then at liberty to use any of a wide variety of IDEs (including, if they still want, the Arduino IDE), instead of or in addition to any CLI toolchains.

I personally like VSCode/PlatformIO for C++ MCU coding and deployment - indeed, it's about the only Microsoft application I still use regularly - but I'm 100% behind the principle of avoiding proprietary lock-ins and unnecessary regression.