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

Linux build fails against system libwebsockets using OpenSSL #27632

Closed
akien-mga opened this issue Apr 3, 2019 · 0 comments · Fixed by #30263
Closed

Linux build fails against system libwebsockets using OpenSSL #27632

akien-mga opened this issue Apr 3, 2019 · 0 comments · Fixed by #30263

Comments

@akien-mga
Copy link
Member

Godot version:
3.1-stable
f64336f

OS/device including version:
Mageia 7 64-bit
Packages:

  • lib64websockets-devel-3.1.0-1.mga7 (RPM .spec file)
  • lib64openssl-devel-1.1.0j-1.mga7 (pulled in as dependency of libwebsockets)

Issue description:
Building with scons p=x11 builtin_libwebsockets=no on above system fails with:

modules/websocket/lws_client.cpp: In member function 'virtual int LWSClient::_handle_cb(lws*, lws_callback_reasons, void*, void*, size_t)':
modules/websocket/lws_client.cpp:131:59: error: cannot convert 'const unsigned char*' to 'const unsigned char**'
     SSL_CTX_add_client_CA((SSL_CTX *)user, d2i_X509(NULL, &arr.read()[0], arr.size()));
In file included from /usr/include/openssl/objects.h:916,
                 from /usr/include/openssl/evp.h:27,
                 from /usr/include/openssl/x509.h:23,
                 from /usr/include/openssl/ssl.h:50,
                 from /usr/include/libwebsockets.h:223,
                 from modules/websocket/lws_peer.h:39,
                 from modules/websocket/lws_helper.h:41,
                 from modules/websocket/lws_client.h:37,
                 from modules/websocket/lws_client.cpp:33:
/usr/include/openssl/x509.h:540:1: note:   initializing argument 2 of 'X509* d2i_X509(X509**, const unsigned char**, long int)'
 DECLARE_ASN1_FUNCTIONS(X509)
 ^~~~~~~~~~~~~~~~~~~~~~

Seems like a conflict between a system-provided libwebsockets + openssl compared to our builtin libwebsockets + mbedtls.

Steps to reproduce:

  • Install distro package for libwebsockets
  • scons p=x11 builtin_libwebsockets=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants