Open davideperson opened 1 year ago
One problem I see is that our Makefile builds client
and server
by default when you run make
, but those are part of the tests, so you shouldn't need to build them. You can work around that problem by running sudo make install
directly. I'll write a PR to fix it so make
doesn't build client
and server
.
If you're wanting to also run tests, I would want to see cc --version
and know if there are any flags turned on by default (for instance via a wrapper script or alias), to see what might need changing.
i'm having this error after download rustls-ffi from https://github.com/rustls/rustls-ffi/archive/refs/tags/v0.10.0.tar.gz , any idea?
[root@spidportdrfe1v1 rustls-ffi-0.10.0]# make cc -o target/client.o -c tests/client.c -Werror -Wall -Wextra -Wpedantic -g -I src/ -O3 In file included from tests/client.c:25:0: src/rustls.h:111:44: error: comma at end of enumerator list [-Werror=pedantic] RUSTLS_RESULT_CERT_SCT_UNKNOWN_LOG = 7323, ^ src/rustls.h:124:35: error: comma at end of enumerator list [-Werror=pedantic] RUSTLS_TLS_VERSION_TLSV1_3 = 772, ^ In file included from tests/client.c:26:0: tests/common.h:31:11: error: comma at end of enumerator list [-Werror=pedantic] DEMO_EOF, ^ tests/client.c: In function ‘make_conn’: tests/client.c:45:3: error: ISO C90 forbids mixed declarations and code [-Werror=pedantic] int getaddrinfo_result = ^ tests/client.c:60:3: error: ISO C90 forbids mixed declarations and code [-Werror=pedantic] int connect_result = connect( ^ tests/client.c: In function ‘do_read’: tests/client.c:133:13: error: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Werror=format=] n); ^ tests/client.c: In function ‘send_request_and_read_response’: tests/client.c:240:13: error: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Werror=format=] fprintf(stderr, "client: body began at %zu\n", headers_len); ^ tests/client.c:297:3: error: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Werror=format=] fprintf(stderr, "client: writing %zu bytes to stdout\n", conn->data.len); ^ tests/client.c: In function ‘do_request’: tests/client.c:320:5: error: C++ style comments are not allowed in ISO C90 [-Werror] // No perror because make_conn printed error already. ^ tests/client.c:320:5: error: (this will be reported only once per input file) [-Werror] tests/client.c:324:3: error: ISO C90 forbids mixed declarations and code [-Werror=pedantic] rustls_result result = ^ tests/client.c: In function ‘verify’: tests/client.c:378:3: error: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Werror=format=] fprintf(stderr, "client: end entity len: %zu\n", params->end_entity_cert_der.len); ^ tests/client.c:383:7: error: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Werror=format=] fprintf(stderr, "client: intermediate, len = %zu\n", bytes.len); ^ tests/client.c:386:3: error: ISO C90 does not support the ‘z’ gnu_printf length modifier [-Werror=format=] fprintf(stderr, "client: ocsp response len: %zu\n", params->ocsp_response.len); ^ tests/client.c: In function ‘main’: tests/client.c:408:3: error: ISO C90 forbids mixed declarations and code [-Werror=pedantic] const char *hostname = argv[1]; ^ tests/client.c:445:3: error: ISO C90 forbids mixed declarations and code [-Werror=pedantic] int i; ^ cc1: all warnings being treated as errors make: *** [target/client.o] Error 1