Skip to content
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

Error while compiling async_ssl.v0.17.0 #39

Closed
yrk-pub opened this issue Jun 8, 2024 · 5 comments
Closed

Error while compiling async_ssl.v0.17.0 #39

yrk-pub opened this issue Jun 8, 2024 · 5 comments

Comments

@yrk-pub
Copy link

yrk-pub commented Jun 8, 2024

During installation on a 5.1.0 switch using dune I get this error message:

# [...]
# /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:850:67: note: expected ‘const unsigned char **’ but argument is of type ‘char **’
#   850 | void SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data,
#       |

OpenSSL on my system is at 3.3.0

@vbmithr
Copy link
Contributor

vbmithr commented Jun 29, 2024

Same here.

@DarioHett
Copy link

Same here, tried with 5.1.1 and 5.2.0, as well as versions 0.16.0, 0.17.0 and 0.15.0.

dnf info libffi libffi-devel openssl --installed
Installed Packages
Name : libffi
Version : 3.4.4
Release : 7.fc40
Architecture : i686
Size : 77 k
Source : libffi-3.4.4-7.fc40.src.rpm
Repository : @System
From repo : fedora
Summary : A portable foreign function interface library
URL : http://sourceware.org/libffi
License : MIT
Description : [...]

Name : libffi
Version : 3.4.4
Release : 7.fc40
Architecture : x86_64
Size : 82 k
Source : libffi-3.4.4-7.fc40.src.rpm
Repository : @System
From repo : fedora
Summary : A portable foreign function interface library
URL : http://sourceware.org/libffi
License : MIT
Description : [...]

Name : libffi-devel
Version : 3.4.4
Release : 7.fc40
Architecture : x86_64
Size : 33 k
Source : libffi-3.4.4-7.fc40.src.rpm
Repository : @System
From repo : fedora
Summary : Development files for libffi
URL : http://sourceware.org/libffi
License : MIT
Description : The libffi-devel package contains libraries and header files for
: developing applications that use libffi.

Name : openssl
Epoch : 1
Version : 3.2.1
Release : 2.fc40
Architecture : x86_64
Size : 1.7 M
Source : openssl-3.2.1-2.fc40.src.rpm
Repository : @System
From repo : fedora
Summary : Utilities from the general purpose cryptography library with TLS implementation
URL : http://www.openssl.org/
License : Apache-2.0
Description : The OpenSSL toolkit provides support for secure communications between
: machines. OpenSSL includes a certificate management tool and shared
: libraries which provide various cryptographic algorithms and
: protocols.

@vbmithr
Copy link
Contributor

vbmithr commented Jul 10, 2024

I have a temporary fix here: vbmithr@5206b3b

@DarioHett
Copy link

opam pin async_ssl https://github.com/vbmithr/async_ssl.git\#5206b3b
[...]
Do you want to continue? [Y/n] Y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved async_ssl.v0.17.0  (no changes)
∗ installed async_ssl.v0.17.0
Done.

Thank you so much!

@SquidDev
Copy link

The fix in 77910a4 does not appear to be correct. -Wincompatible-pointer-types is not in dune's standard flag list, so removing it does not work! Instead, -Wno-incompatible-pointer-types needs to be passed directly:

diff --git a/src/dune b/src/dune
index bf67dbc..edfe18f 100644
--- a/src/dune
+++ b/src/dune
@@ -24,11 +24,12 @@
   (language c)
   (names ffi_generated_stubs)
   (flags
-   (:standard \ -Werror -pedantic -Wall -Wunused -Wincompatible-pointer-types)
+   (:standard \ -Werror -pedantic -Wall -Wunused)
    -w
    (:include ../bindings/openssl-ccopt.sexp)
    -Wno-int-conversion
-   -Wno-implicit-function-declaration))
+   -Wno-implicit-function-declaration
+   -Wno-incompatible-pointer-types))
  (name async_ssl)
  (public_name async_ssl)
  (modules import version opt verify_mode ffi_generated_types ffi_generated

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

5 participants