janestreet / janestreet/async_ssl

Can't build on (Arch Linux, Async_ssl (v0.17.0-1 or 6fb6fcc) , OCaml 5.2.1)

Open
#41 13 comments 0 reactions 0 assignees View on GitHub
forwarded-to-js-devs
Dominant language
OCaml
Stars
29
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Here's the error log

```
File "src/dune", line 25, characters 9-28:
25 | (names ffi_generated_stubs)
^^^^^^^^^^^^^^^^^^^
ffi_generated_stubs.c: In function ‘async_ssl_stub_57_BN_hex2bn’:
ffi_generated_stubs.c:379:25: error: passing argument 1 of ‘BN_hex2bn’ from incompatible pointer type [-Wincompatible-pointer-types]
379 | int x260 = BN_hex2bn(x258, x259);
| ^~~~
| |
| void **
In file included from /usr/include/openssl/params.h:16,
from /usr/include/openssl/indicator.h:18,
from /usr/include/openssl/core_dispatch.h:16,
from /usr/include/openssl/evp.h:28,
from /usr/include/openssl/x509.h:29,
from /usr/include/openssl/ssl.h:32,
from ffi_generated_stubs.c:2:
/usr/include/openssl/bn.h:346:24: note: expected ‘BIGNUM **’ {aka ‘struct bignum_st **’} but argument is of type ‘void **’
346 | int BN_hex2bn(BIGNUM **a, const char *str);
| ~~~~~~~~~^
ffi_generated_stubs.c: In function ‘async_ssl_stub_86_SSL_get0_alpn_selected’:
ffi_generated_stubs.c:574:33: error: passing argument 2 of ‘SSL_get0_alpn_selected’ from incompatible pointer type [-Wincompatible-pointer-types]
574 | SSL_get0_alpn_selected(x397, x398, x399);
| ^~~~
| |
| char **
/usr/include/openssl/ssl.h:848:67: note: expected ‘const unsigned char **’ but argument is of type ‘char **’
848 | void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
```

Contributor guide

Open the contributing guide

Research direction

Start with the build failure reported at src/dune and inspect the generated ffi_generated_stubs.c calls to BN_hex2bn and SSL_get0_alpn_selected alongside the OpenSSL headers named in the log. Reproduce the Arch Linux build with OCaml 5.2.1 and verify that async_ssl builds without the incompatible-pointer-type errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.