Compile Error in IDE v6 Build of Arduino sketch

mikescott
Posts: 3
Joined: Wed Jul 01, 2026 4:12 pm

Compile Error in IDE v6 Build of Arduino sketch

Postby mikescott » Thu Jul 02, 2026 11:33 am

I am getting the following error message when i use IDF 6.0 idf.py build to compile an Arduino sketch:
[1443/1456] Building CXX object esp-idf/arduino/CMakeFiles/__idf_arduino.dir/libraries/NetworkClientSecure/src/ssl_client.cpp.obj
:
:
C:/Users/Mike/Projects/components/arduino/libraries/NetworkClientSecure/src/ssl_client.cpp
C:/Users/Mike/Projects/components/arduino/libraries/NetworkClientSecure/src/ssl_client.cpp: In function 'int ssl_starttls_handshake(sslclient_context*)':
C:/Users/Mike/Projects/components/arduino/libraries/NetworkClientSecure/src/ssl_client.cpp:354:5: error: 'mbedtls_x509_crt_verify_info' was not declared in this scope; did you mean 'mbedtls_x509_crt_verify_chain'?
354 | mbedtls_x509_crt_verify_info(buf, sizeof(buf), " ! ", flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

The sketch uses NetworkClientSecure function from Arduino-ESP32 Network component in order to make use of the mbedtls API functions in the IDE, and for some reason there is a conflict between the "ssl-client.cpp" routine from Arduino-ESP32 and the mbedtls library of IDE v6.0. I can't understand what is causing this error message, because:
  • a. the sketch compiles without errors in Arduino IDE 2.3.10 with board "ESP32 Dev Module" with Arduino-ESP32 v 4.0.0 alpha1 and earlier releases
.
  • IDE 6.0 can successfully build other examples which use the mbedtls component and they run without error
  • The "missing" routine
    mbedtls_x509_crt_verify_info
    ' is in mbedtls files x509_crt.h, x509_crt.c which are included by mbedtls file ssl.h dependant on the value of Menuconfig setting
    MBEDTLS_X509_CRT_H
    - which is set to "y".
So, it looks to me like all the conditions are satisfied, but i am baffled what is causing this error and have reached the end of my meagre diagnostic skills. I would welcome any help or advice.
attachment=0]idf_py_stdout_output_21184.txt[/attachment]
Btw: the reason i am using the IDF instead of Arduino IDE is because the Arduino-ESP32 is currently limited to TLS1.2 and i wanted to try the TLS1.3 functions in IDF 6.0, using "Arduino-as-a-component"
Attachments
idf_py_stdout_output_21184.txt
Build error output file
(201.33 KiB) Downloaded 3 times

lbernstone
Posts: 1138
Joined: Mon Jul 22, 2019 3:20 pm

Re: Compile Error in IDE v6 Build of Arduino sketch

Postby lbernstone » Fri Jul 03, 2026 2:49 pm

Looks like the function is only included if CONFIG_MBEDTLS_X509_REMOVE_INFO is disabled.

mikescott
Posts: 3
Joined: Wed Jul 01, 2026 4:12 pm

Re: Compile Error in IDE v6 Build of Arduino sketch

Postby mikescott » Fri Jul 03, 2026 4:34 pm

Hi lbernstone - Yep, spot on! Changing that option to "=n" definitely removed the error message. Thank you very much for your help, I would never have guessed that that was the cause.
Can you tell me please how you found the connection to CONFIG_MBEDTLS_X509_REMOVE_INFO as the cause?

lbernstone
Posts: 1138
Joined: Mon Jul 22, 2019 3:20 pm

Re: Compile Error in IDE v6 Build of Arduino sketch

Postby lbernstone » Sat Jul 04, 2026 6:10 am

I just have an idea of how a lot of this code is structured, and if the compiler complains that a function is not defined, but you can see where it is declared, and other functions in the same header work, then there is probably some config option blocking it out. 2 seconds browsing the code confirmed it.

mikescott
Posts: 3
Joined: Wed Jul 01, 2026 4:12 pm

Re: Compile Error in IDE v6 Build of Arduino sketch

Postby mikescott » Sat Jul 04, 2026 6:40 am

Thanks again for your help and have a good weekend!

Who is online

Users browsing this forum: No registered users and 1 guest