Skip to content

install rustls-ffi on centos 7 #318

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

Closed
davideperson opened this issue May 4, 2023 · 2 comments
Closed

install rustls-ffi on centos 7 #318

davideperson opened this issue May 4, 2023 · 2 comments

Comments

@davideperson
Copy link

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

@davideperson davideperson changed the title compiling apache install rustls-ffi on centos 7 May 4, 2023
@jsha
Copy link
Collaborator

jsha commented May 4, 2023

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.

@cpu
Copy link
Member

cpu commented Oct 4, 2024

I'll write a PR to fix it so make doesn't build client and server.

I went ahead and made this change: #473

I'm going to close this issue for now since I think we're blocked on a confirmation the issue still applies with the latest available rustls-ffi, and more information about the system of the OP (compiler versions, etc).

@cpu cpu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants