hannestschofenig / mbedtls

An open source, portable, easy to use, readable and flexible SSL library
https://tls.mbed.org
Apache License 2.0
15 stars 8 forks source link

Build errors encountered on tls13-prototype #394

Open fwh-dc opened 2 years ago

fwh-dc commented 2 years ago

Summary

I want to play around with your experimental post quantum support and as a first step I was trying to build the code locally without any configuration.

I am executing

git clone https://github.com/hannestschofenig/mbedtls.git --branch tls13-prototype
cmake -B build-mbedtls -S mbedtls
cmake --build build-mbedtls

But then I get

mbedtls/library/ssl_tls13_client.c:44:10: fatal error: 'ssl_debug_helpers_generated.h' file not found
#include "ssl_debug_helpers_generated.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I can fix that by manually executing

tests/scripts/check-generated-files.sh -u

and re-running

cmake --build build-mbedtls

But then I get the following errors:

mbedtls/library/ssl_tls13_server.c:709:31: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Werror,-Wformat]
                              diff ) );
mbedtls/library/ssl_tls13_server.c:725:69: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Werror,-Wformat]
                              "MBEDTLS_SSL_EARLY_DATA_MAX_DELAY )", diff ) );

So my question is if this is expected behaviour and if so what are the required build steps?

System information

Mbed TLS version (number or commit id): Operating system and version: MacOS 12.2.1 Compiler and options (if you used a pre-built binary, please indicate how you obtained it): AppleClang 13.1.6.13160021

Expected behavior

Build success.