warmcat / libwebsockets

canonical libwebsockets.org networking library
https://libwebsockets.org
Other
4.66k stars 1.46k forks source link

[question] Does libwebsockets compile against openssl/3.1? #2894

Open memsharded opened 1 year ago

memsharded commented 1 year ago

Hi!

I am trying to build libwebsockets/4.3.2, with openssl, and exactly the same build with openssl/1.1.1t builds perfectly, but the same build with openssl/3.1 is throwing several of these errors:

...src/include/libwebsockets/lws-genhash.h:85:18: error: field ‘ctx’ has incomplete type
   85 |         HMAC_CTX ctx;

I couldn't find information in the site or in Github, so I'd like to know if it is possible to use openssl 3.1 (note, same errors happen too with openssl/3.0.8), and it should work, or this is not supported. Many thanks!

zzblydia commented 7 months ago

Could you show the output log when you execute cmake? Do you have two different versions of the OpenSSL library in your environment?

memsharded commented 7 months ago

Yes, I have different openssl versions built locally, in Conan packages. Everything is exactly the same, but with different openssl version. I am launching the build from https://github.com/conan-io/conan-center-index/tree/master/recipes/libwebsockets/all, with:

conan create . --version=4.3.2 2> build.log
Building against openssl/1.1.1w (success) ``` -- Using Conan toolchain: C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/build/generators/conan_toolchain.cmake -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.38.33130.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Compiled with LWS_WITH_DIR and LWS_WITH_LEJP_CONF SMD requires pthreads -- Found Git: C:/ws/cmder/vendor/git-for-windows/cmd/git.exe (found version "2.34.0.windows.1") fatal: not a git repository (or any of the parent directories): .git Git commit hash: -- CMAKE_TOOLCHAIN_FILE='C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/build/generators/conan_toolchain.cmake' -- Performing Test LWS_HAVE_inline -- Performing Test LWS_HAVE_inline - Success -- Performing Test LWS_HAVE___inline__ -- Performing Test LWS_HAVE___inline__ - Failed -- Performing Test LWS_HAVE___inline -- Performing Test LWS_HAVE___inline - Success -- Performing Test LWS_HAVE_MALLOC_TRIM -- Performing Test LWS_HAVE_MALLOC_TRIM - Failed -- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE -- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE - Failed -- Looking for fork -- Looking for fork - not found -- Looking for getenv -- Looking for getenv - found -- Looking for malloc -- Looking for malloc - found -- Looking for memset -- Looking for memset - found -- Looking for realloc -- Looking for realloc - found -- Looking for socket -- Looking for socket - not found -- Looking for strerror -- Looking for strerror - found -- Looking for vfork -- Looking for vfork - not found -- Looking for execvpe -- Looking for execvpe - found -- Looking for getifaddrs -- Looking for getifaddrs - not found -- Looking for snprintf -- Looking for snprintf - not found -- Looking for _snprintf -- Looking for _snprintf - not found -- Looking for _vsnprintf -- Looking for _vsnprintf - not found -- Looking for getloadavg -- Looking for getloadavg - not found -- Looking for atoll -- Looking for atoll - found -- Looking for _atoi64 -- Looking for _atoi64 - found -- Looking for _stat32i64 -- Looking for _stat32i64 - found -- Looking for clock_gettime -- Looking for clock_gettime - not found -- Looking for localtime_r -- Looking for localtime_r - not found -- Looking for gmtime_r -- Looking for gmtime_r - not found -- Looking for ctime_r -- Looking for ctime_r - not found -- Looking for getgrgid_r -- Looking for getgrgid_r - not found -- Looking for getgrnam_r -- Looking for getgrnam_r - not found -- Looking for getpwuid_r -- Looking for getpwuid_r - not found -- Looking for getpwnam_r -- Looking for getpwnam_r - not found -- Looking for timegm -- Looking for timegm - not found -- Looking for in6addr.h -- Looking for in6addr.h - found -- Looking for memory.h -- Looking for memory.h - found -- Looking for netinet/in.h -- Looking for netinet/in.h - not found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stdlib.h -- Looking for stdlib.h - found -- Looking for strings.h -- Looking for strings.h - not found -- Looking for string.h -- Looking for string.h - found -- Looking for sys/prctl.h -- Looking for sys/prctl.h - not found -- Looking for sys/socket.h -- Looking for sys/socket.h - not found -- Looking for sys/sockio.h -- Looking for sys/sockio.h - not found -- Looking for sys/stat.h -- Looking for sys/stat.h - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for unistd.h -- Looking for unistd.h - not found -- Looking for vfork.h -- Looking for vfork.h - not found -- Looking for sys/capability.h -- Looking for sys/capability.h - not found -- Looking for malloc.h -- Looking for malloc.h - found -- Looking for pthread.h -- Looking for pthread.h - not found -- Looking for inttypes.h -- Looking for inttypes.h - found -- Looking for sys/resource.h -- Looking for sys/resource.h - not found -- Performing Test LWS_HAVE_WIN32_AFUNIX_H -- Performing Test LWS_HAVE_WIN32_AFUNIX_H - Success -- Looking for cap_set_flag in cap -- Looking for cap_set_flag in cap - not found -- Looking for 3 include files stdlib.h, ..., string.h -- Looking for 3 include files stdlib.h, ..., string.h - found -- Performing Test LWS_HAS_INTPTR_T -- Performing Test LWS_HAS_INTPTR_T - Success -- Performing Test LWS_HAS_GETOPT_LONG -- Performing Test LWS_HAS_GETOPT_LONG - Failed -- Performing Test LWS_HAVE_RTA_PREF -- Performing Test LWS_HAVE_RTA_PREF - Failed -- Performing Test LWS_HAVE_SUSECONDS_T -- Performing Test LWS_HAVE_SUSECONDS_T - Failed -- Performing Test LWS_HAVE_PIPE2 -- Performing Test LWS_HAVE_PIPE2 - Failed -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT - Failed Compiling with SSL support OpenSSL include dir: C:/Users/memsharded/.conan2/p/opens07fa59b597942/p/include OpenSSL libraries: C:/Users/memsharded/.conan2/p/opens07fa59b597942/p/lib/libssl.lib;C:/Users/memsharded/.conan2/p/opens07fa59b597942/p/lib/libcrypto.lib -- Looking for openssl/ecdh.h -- Looking for openssl/ecdh.h - not found -- Looking for SSL_CTX_set1_param -- Looking for SSL_CTX_set1_param - found -- Looking for SSL_set_info_callback -- Looking for SSL_set_info_callback - found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - not found -- Looking for RSA_set0_key -- Looking for RSA_set0_key - found -- Looking for X509_get_key_usage -- Looking for X509_get_key_usage - found -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key - not found -- Looking for SSL_CTX_get0_certificate -- Looking for SSL_CTX_get0_certificate - found -- Looking for SSL_get0_alpn_selected -- Looking for SSL_get0_alpn_selected - found -- Looking for SSL_set_alpn_protos -- Looking for SSL_set_alpn_protos - found -- Looking for EVP_aes_128_cfb8 -- Looking for EVP_aes_128_cfb8 - found -- Looking for EVP_aes_128_cfb128 -- Looking for EVP_aes_128_cfb128 - found -- Looking for EVP_aes_192_cfb8 -- Looking for EVP_aes_192_cfb8 - found -- Looking for EVP_aes_192_cfb128 -- Looking for EVP_aes_192_cfb128 - found -- Looking for EVP_aes_256_cfb8 -- Looking for EVP_aes_256_cfb8 - found -- Looking for EVP_aes_256_cfb128 -- Looking for EVP_aes_256_cfb128 - found -- Looking for EVP_aes_128_xts -- Looking for EVP_aes_128_xts - found -- Looking for EVP_aes_128_ofb -- Looking for EVP_aes_128_ofb - found -- Looking for EVP_aes_128_ecb -- Looking for EVP_aes_128_ecb - found -- Looking for EVP_aes_128_ctr -- Looking for EVP_aes_128_ctr - found -- Looking for RSA_verify_pss_mgf1 -- Looking for RSA_verify_pss_mgf1 - not found -- Looking for HMAC_CTX_new -- Looking for HMAC_CTX_new - found -- Looking for EVP_PKEY_new_raw_private_key -- Looking for EVP_PKEY_new_raw_private_key - found -- Looking for SSL_SESSION_set_time -- Looking for SSL_SESSION_set_time - found -- Looking for EC_KEY_new_by_curve_name -- Looking for EC_KEY_new_by_curve_name - found -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS - Success -- Performing Test LWS_HAVE_EVP_MD_CTX_free -- Performing Test LWS_HAVE_EVP_MD_CTX_free - Success -- Performing Test LWS_HAVE_OPENSSL_STACK -- Performing Test LWS_HAVE_OPENSSL_STACK - Success -- Looking for ECDSA_SIG_set0 -- Looking for ECDSA_SIG_set0 - found -- Looking for BN_bn2binpad -- Looking for BN_bn2binpad - found -- Looking for EVP_aes_128_wrap -- Looking for EVP_aes_128_wrap - found -- Looking for EC_POINT_get_affine_coordinates -- Looking for EC_POINT_get_affine_coordinates - found -- Looking for TLS_client_method -- Looking for TLS_client_method - found -- Looking for TLSv1_2_client_method -- Looking for TLSv1_2_client_method - found Searching for OpenSSL executable and dlls OpenSSL executable: C:/ws/cmder/vendor/git-for-windows/mingw64/bin/openssl.exe GENCERTS = 0 DIR C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/build CMP C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/src/cmake -- Configuring done -- Generating done -- Build files have been written to: C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/build libwebsockets/4.3.2: Running CMake.build() libwebsockets/4.3.2: RUN: cmake --build "C:\Users\memsharded\.conan2\p\b\libwe3ea0ad5fe5b19\b\build" --config Release MSBuild version 17.8.3+195e7f5a3 for .NET Framework Checking Build System Creating build include dir Building Custom Rule C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/src/CMakeLists.txt C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): warning MSB8065: Custom build for item "C:\Users\memsharded\.conan2\p\b\libwe3ea0ad5fe5b19\b\build\lws_config.h" succeeded, but specified output "c:\users\memsharded\.conan2\p\b\libwe3ea0ad5fe5b19\b\build\include\libwebsockets" has not been created. This may cause incremental build to work incorrectly. [C:\Users\memsharded\.conan2\p\b\libwe3ea0ad5fe5b19\b\build\GENHDR.vcxproj] Building Custom Rule C:/Users/memsharded/.conan2/p/b/libwe3ea0ad5fe5b19/b/src/lib/CMakeLists.txt windows-fds.c windows-file.c windows-init.c windows-misc.c windows-pipe.c windows-plugins.c windows-service.c windows-sockets.c gettimeofday.c tls.c tls-network.c tls-sessions.c openssl-tls.c openssl-x509.c openssl-ssl.c openssl-session.c tls-server.c openssl-server.c tls-client.c openssl-client.c alloc.c buflist.c context.c lws_dll2.c lws_map.c libwebsockets.c logs.c vfs.c base64-decode.c prng.c lws-ring.c lws-cache-ttl.c heap.c file.c dir.c lwsac.c cached-file.c sha-1.c lejp.c system.c dummy-callback.c output.c close.c network.c vhost.c pollfd.c service.c sorted-usec-list.c wsi.c wsi-timeout.c adopt.c ops-pipe.c state.c sequencer.c client.c connect.c connect2.c connect3.c connect4.c sort-dns.c conmon.c header.c date.c parsers.c server.c lws-spa.c cookie.c lejp-conf.c ops-h1.c http2.c hpack.c ops-h2.c ops-ws.c client-ws.c client-parser-ws.c server-ws.c ops-raw-skt.c ops-raw-file.c ops-listen.c client-http.c poll.c websockets.vcxproj -> C:\Users\memsharded\.conan2\p\b\libwe3ea0ad5fe5b19\b\build\lib\Release\websockets_static.lib```
Building against openssl/3.1.2 (changing the conanfile.py ``requires``) (error) -- Using Conan toolchain: C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/build/generators/conan_toolchain.cmake -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.38.33130.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Compiled with LWS_WITH_DIR and LWS_WITH_LEJP_CONF SMD requires pthreads -- Found Git: C:/ws/cmder/vendor/git-for-windows/cmd/git.exe (found version "2.34.0.windows.1") fatal: not a git repository (or any of the parent directories): .git Git commit hash: -- CMAKE_TOOLCHAIN_FILE='C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/build/generators/conan_toolchain.cmake' -- Performing Test LWS_HAVE_inline -- Performing Test LWS_HAVE_inline - Success -- Performing Test LWS_HAVE___inline__ -- Performing Test LWS_HAVE___inline__ - Failed -- Performing Test LWS_HAVE___inline -- Performing Test LWS_HAVE___inline - Success -- Performing Test LWS_HAVE_MALLOC_TRIM -- Performing Test LWS_HAVE_MALLOC_TRIM - Failed -- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE -- Performing Test LWS_HAVE_MALLOC_USABLE_SIZE - Failed -- Looking for fork -- Looking for fork - not found -- Looking for getenv -- Looking for getenv - found -- Looking for malloc -- Looking for malloc - found -- Looking for memset -- Looking for memset - found -- Looking for realloc -- Looking for realloc - found -- Looking for socket -- Looking for socket - not found -- Looking for strerror -- Looking for strerror - found -- Looking for vfork -- Looking for vfork - not found -- Looking for execvpe -- Looking for execvpe - found -- Looking for getifaddrs -- Looking for getifaddrs - not found -- Looking for snprintf -- Looking for snprintf - not found -- Looking for _snprintf -- Looking for _snprintf - not found -- Looking for _vsnprintf -- Looking for _vsnprintf - not found -- Looking for getloadavg -- Looking for getloadavg - not found -- Looking for atoll -- Looking for atoll - found -- Looking for _atoi64 -- Looking for _atoi64 - found -- Looking for _stat32i64 -- Looking for _stat32i64 - found -- Looking for clock_gettime -- Looking for clock_gettime - not found -- Looking for localtime_r -- Looking for localtime_r - not found -- Looking for gmtime_r -- Looking for gmtime_r - not found -- Looking for ctime_r -- Looking for ctime_r - not found -- Looking for getgrgid_r -- Looking for getgrgid_r - not found -- Looking for getgrnam_r -- Looking for getgrnam_r - not found -- Looking for getpwuid_r -- Looking for getpwuid_r - not found -- Looking for getpwnam_r -- Looking for getpwnam_r - not found -- Looking for timegm -- Looking for timegm - not found -- Looking for in6addr.h -- Looking for in6addr.h - found -- Looking for memory.h -- Looking for memory.h - found -- Looking for netinet/in.h -- Looking for netinet/in.h - not found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stdlib.h -- Looking for stdlib.h - found -- Looking for strings.h -- Looking for strings.h - not found -- Looking for string.h -- Looking for string.h - found -- Looking for sys/prctl.h -- Looking for sys/prctl.h - not found -- Looking for sys/socket.h -- Looking for sys/socket.h - not found -- Looking for sys/sockio.h -- Looking for sys/sockio.h - not found -- Looking for sys/stat.h -- Looking for sys/stat.h - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for unistd.h -- Looking for unistd.h - not found -- Looking for vfork.h -- Looking for vfork.h - not found -- Looking for sys/capability.h -- Looking for sys/capability.h - not found -- Looking for malloc.h -- Looking for malloc.h - found -- Looking for pthread.h -- Looking for pthread.h - not found -- Looking for inttypes.h -- Looking for inttypes.h - found -- Looking for sys/resource.h -- Looking for sys/resource.h - not found -- Performing Test LWS_HAVE_WIN32_AFUNIX_H -- Performing Test LWS_HAVE_WIN32_AFUNIX_H - Success -- Looking for cap_set_flag in cap -- Looking for cap_set_flag in cap - not found -- Looking for 3 include files stdlib.h, ..., string.h -- Looking for 3 include files stdlib.h, ..., string.h - found -- Performing Test LWS_HAS_INTPTR_T -- Performing Test LWS_HAS_INTPTR_T - Success -- Performing Test LWS_HAS_GETOPT_LONG -- Performing Test LWS_HAS_GETOPT_LONG - Failed -- Performing Test LWS_HAVE_RTA_PREF -- Performing Test LWS_HAVE_RTA_PREF - Failed -- Performing Test LWS_HAVE_SUSECONDS_T -- Performing Test LWS_HAVE_SUSECONDS_T - Failed -- Performing Test LWS_HAVE_PIPE2 -- Performing Test LWS_HAVE_PIPE2 - Failed -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT - Failed Compiling with SSL support OpenSSL include dir: C:/Users/memsharded/.conan2/p/opensb53b6bbd27953/p/include OpenSSL libraries: C:/Users/memsharded/.conan2/p/opensb53b6bbd27953/p/lib/libssl.lib;C:/Users/memsharded/.conan2/p/opensb53b6bbd27953/p/lib/libcrypto.lib -- Looking for openssl/ecdh.h -- Looking for openssl/ecdh.h - not found -- Looking for SSL_CTX_set1_param -- Looking for SSL_CTX_set1_param - not found -- Looking for SSL_set_info_callback -- Looking for SSL_set_info_callback - not found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - not found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - not found -- Looking for RSA_set0_key -- Looking for RSA_set0_key - not found -- Looking for X509_get_key_usage -- Looking for X509_get_key_usage - not found -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key - not found -- Looking for SSL_CTX_get0_certificate -- Looking for SSL_CTX_get0_certificate - not found -- Looking for SSL_get0_alpn_selected -- Looking for SSL_get0_alpn_selected - not found -- Looking for SSL_set_alpn_protos -- Looking for SSL_set_alpn_protos - not found -- Looking for EVP_aes_128_cfb8 -- Looking for EVP_aes_128_cfb8 - not found -- Looking for EVP_aes_128_cfb128 -- Looking for EVP_aes_128_cfb128 - not found -- Looking for EVP_aes_192_cfb8 -- Looking for EVP_aes_192_cfb8 - not found -- Looking for EVP_aes_192_cfb128 -- Looking for EVP_aes_192_cfb128 - not found -- Looking for EVP_aes_256_cfb8 -- Looking for EVP_aes_256_cfb8 - not found -- Looking for EVP_aes_256_cfb128 -- Looking for EVP_aes_256_cfb128 - not found -- Looking for EVP_aes_128_xts -- Looking for EVP_aes_128_xts - not found -- Looking for EVP_aes_128_ofb -- Looking for EVP_aes_128_ofb - not found -- Looking for EVP_aes_128_ecb -- Looking for EVP_aes_128_ecb - not found -- Looking for EVP_aes_128_ctr -- Looking for EVP_aes_128_ctr - not found -- Looking for RSA_verify_pss_mgf1 -- Looking for RSA_verify_pss_mgf1 - not found -- Looking for HMAC_CTX_new -- Looking for HMAC_CTX_new - not found -- Looking for EVP_PKEY_new_raw_private_key -- Looking for EVP_PKEY_new_raw_private_key - not found -- Looking for SSL_SESSION_set_time -- Looking for SSL_SESSION_set_time - not found -- Looking for EC_KEY_new_by_curve_name -- Looking for EC_KEY_new_by_curve_name - not found -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS - Failed -- Performing Test LWS_HAVE_EVP_MD_CTX_free -- Performing Test LWS_HAVE_EVP_MD_CTX_free - Failed -- Performing Test LWS_HAVE_OPENSSL_STACK -- Performing Test LWS_HAVE_OPENSSL_STACK - Success -- Looking for ECDSA_SIG_set0 -- Looking for ECDSA_SIG_set0 - not found -- Looking for BN_bn2binpad -- Looking for BN_bn2binpad - not found -- Looking for EVP_aes_128_wrap -- Looking for EVP_aes_128_wrap - not found -- Looking for EC_POINT_get_affine_coordinates -- Looking for EC_POINT_get_affine_coordinates - not found -- Looking for TLS_client_method -- Looking for TLS_client_method - not found -- Looking for TLSv1_2_client_method -- Looking for TLSv1_2_client_method - not found Searching for OpenSSL executable and dlls OpenSSL executable: C:/ws/cmder/vendor/git-for-windows/mingw64/bin/openssl.exe GENCERTS = 0 DIR C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/build CMP C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/src/cmake -- Configuring done -- Generating done -- Build files have been written to: C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/build libwebsockets/4.3.2: Running CMake.build() libwebsockets/4.3.2: RUN: cmake --build "C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build" --config Release MSBuild version 17.8.3+195e7f5a3 for .NET Framework Checking Build System Creating build include dir Building Custom Rule C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/src/CMakeLists.txt C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): warning MSB8065: Custom build for item "C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lws_config.h" succeeded, but specified output "c:\users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\include\libwebsockets" has not been created. This may cause incremental build to work incorrectly. [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\GENHDR.vcxproj] Building Custom Rule C:/Users/memsharded/.conan2/p/b/libwec7e7f5a13c273/b/src/lib/CMakeLists.txt windows-fds.c windows-file.c windows-init.c windows-misc.c windows-pipe.c windows-plugins.c windows-service.c windows-sockets.c gettimeofday.c tls.c tls-network.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] tls-sessions.c (compiling source file '../../src/lib/plat/windows/windows-misc.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] openssl-tls.c (compiling source file '../../src/lib/plat/windows/windows-sockets.c') openssl-x509.c openssl-ssl.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] openssl-session.c (compiling source file '../../src/lib/plat/windows/windows-file.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/plat/windows/windows-service.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/plat/windows/windows-fds.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/plat/windows/windows-plugins.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/plat/windows/windows-pipe.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/plat/windows/windows-init.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/tls-network.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/tls.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] tls-server.c (compiling source file '../../src/lib/tls/openssl/openssl-tls.c') openssl-server.c tls-client.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/tls-sessions.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] openssl-client.c (compiling source file '../../src/lib/tls/openssl/openssl-x509.c') alloc.c buflist.c context.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/openssl/openssl-ssl.c') lws_dll2.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/openssl/openssl-session.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/tls-server.c') lws_map.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/tls/openssl/openssl-server.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] libwebsockets.c (compiling source file '../../src/lib/tls/tls-client.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core/lws_dll2.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] logs.c (compiling source file '../../src/lib/core/context.c') vfs.c base64-decode.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] prng.c (compiling source file '../../src/lib/tls/openssl/openssl-client.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core/alloc.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core/buflist.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\lib\tls\openssl\openssl-client.c(778,3): warning C4013: 'EVP_MD_CTX_destroy' undefined; assuming extern returning int [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] lws-ring.c lws-cache-ttl.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core/lws_map.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] heap.c (compiling source file '../../src/lib/core/libwebsockets.c') file.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core/vfs.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core/logs.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/base64-decode.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] dir.c (compiling source file '../../src/lib/misc/prng.c') lwsac.c sha-1.c cached-file.c lejp.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/cache-ttl/lws-cache-ttl.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] system.c (compiling source file '../../src/lib/misc/lws-ring.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/cache-ttl/heap.c') dummy-callback.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/cache-ttl/file.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/lwsac/lwsac.c') output.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/dir.c') close.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] network.c (compiling source file '../../src/lib/misc/sha-1.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/system/system.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/lejp.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/misc/lwsac/cached-file.c') vhost.c pollfd.c service.c sorted-usec-list.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/dummy-callback.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/close.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] wsi.c wsi-timeout.c (compiling source file '../../src/lib/core-net/output.c') adopt.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/network.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/service.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] ops-pipe.c state.c sequencer.c client.c (compiling source file '../../src/lib/core-net/pollfd.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/vhost.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/sorted-usec-list.c') connect.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/wsi.c') connect2.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/wsi-timeout.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/adopt.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] connect3.c (compiling source file '../../src/lib/roles/pipe/ops-pipe.c') connect4.c sort-dns.c conmon.c header.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/sequencer.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] date.c (compiling source file '../../src/lib/core-net/state.c') parsers.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/client.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/connect.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/connect2.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/connect3.c') server.c lws-spa.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/connect4.c') cookie.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/sort-dns.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/header.c') lejp-conf.c ops-h1.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/core-net/client/conmon.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/date.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/parsers.c') http2.c hpack.c ops-h2.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/server/server.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/cookie.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] ops-ws.c (compiling source file '../../src/lib/roles/http/server/lws-spa.c') client-ws.c client-parser-ws.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/h1/ops-h1.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/server/lejp-conf.c') server-ws.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/h2/http2.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/h2/hpack.c') ops-raw-skt.c ops-raw-file.c ops-listen.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/h2/ops-h2.c') client-http.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/ws/ops-ws.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/ws/client-ws.c') poll.c C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/ws/client-parser-ws.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/raw-skt/ops-raw-skt.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/ws/server-ws.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/raw-file/ops-raw-file.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/listen/ops-listen.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/roles/http/client/client-http.c') C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\src\include\libwebsockets\lws-genhash.h(85,18): error C2079: 'ctx' uses undefined struct 'hmac_ctx_st' [C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build\lib\websockets.vcxproj] (compiling source file '../../src/lib/event-libs/poll/poll.c') libwebsockets/4.3.2: ERROR: Package 'aca03bf54d9c1e8f29aa5483b2bee6eabf16ec1f' build failed libwebsockets/4.3.2: WARN: Build folder C:\Users\memsharded\.conan2\p\b\libwec7e7f5a13c273\b\build ERROR: libwebsockets/4.3.2: Error in build() method, line 450 cmake.build() ConanException: Error 1 while executing
zzblydia commented 7 months ago

Yes, I have different openssl versions built locally, in Conan packages. Everything is exactly the same, but with different openssl version. I am launching the build from https://github.com/conan-io/conan-center-index/tree/master/recipes/libwebsockets/all, with:

conan create . --version=4.3.2 2> build.log

Building against openssl/1.1.1w (success) Building against openssl/3.1.2 (changing the conanfile.py requires) (error)

I tested compiling libwebsockets4.3.2 with OpenSSL 3.0.12 (without conan) successfully on Windows 10 and Ubuntu 22.

lws defines the macro LWS_HAVE_HMAC_CTX_new in tls/CMakeLists.txt after finding HMAC_CTX_new. I found "Looking for HMAC_CTX_new - not found" in your 3.1.2 build log, while "Looking for HMAC_CTX_new - found" in your 1.1.1w build log. This leads to the error you encountered: 'error: field 'ctx' has incomplete type'.

The HMAC_CTX_new function has been deprecated since OpenSSL 3.0. However, it maintains compatibility by allowing HMAC_CTX_new to be used with setting OPENSSL_API_COMPAT to 30000 by default. Therefore, I believe the issue may be caused by the downloaded libcrypto.so of version 3.1.2.

To further investigate, I reproduced the issue on Windows 10 using Conan 2 and VS2022. I performed the build using OpenSSL versions 1.1.1w and 3.0.12. When I placed the libcrypto.lib file from 1.1.1w into the OpenSSL lib folder of version 3.0.12 and recompiled, it showed "Looking for HMAC_CTX_new - found,". So I believe it is worth trying to check the downloaded OpenSSL 3.1.2 library to resolve the issue.

lws-team commented 7 months ago

@zzblydia thanks for sharing your findings.

zzblydia commented 6 months ago

@lws-team it's my pleasure. @memsharded I believe I have identified the root cause of the issue.

explore

I wrote a demo.c file that calls the function HMAC_CTX_new and attempted to link the OpenSSL library (3.1.2) that your project download. However, Visual Studio 2022 displayed an error: 'LNK2019 unresolved external symbol deflate referenced in function zlib_stateful_compress_block ... libcrypto.lib(libcrypto-lib-c_zlib.obj)'.

conclusion

After investigating, I discovered that the OpenSSL library (libcrypto) from your project download has a dependency on zlib. This caused the CHECK_FUNCTION_EXISTS(${VARIA}HMAC_CTX_new LWS_HAVE_HMAC_CTX_new PARENT_SCOPE) in tls/CMakeLists.txt to return 'not found'.

solution

I suggest setting 'with_zlib': 'zlib' (default_options) in conanfile.py, as the OpenSSL library(3.1.2 or 3.0.12) downloaded relies on zlib. I tested this solution with OpenSSL 3.1.2 (and 3.0.12) and found it to be effective.

part of compiling log:

cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE="C:/Users/vmwin10/.conan2/p/b/libwefb6db7f5b2349/b/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/vmwin10/.conan2/p/b/libwefb6db7f5b2349/p" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\Users\vmwin10.conan2\p\b\libwefb6db7f5b2349\b\src"

-- Performing Test LWS_HAVE_SUSECONDS_T -- Performing Test LWS_HAVE_SUSECONDS_T - Failed zlib/miniz include dirs: C:/Users/vmwin10/.conan2/p/zlibee1f000851145/p/include zlib/miniz libraries: C:/Users/vmwin10/.conan2/p/zlibee1f000851145/p/lib/zlib.lib -- Performing Test LWS_HAVE_PIPE2 -- Performing Test LWS_HAVE_PIPE2 - Failed -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT -- Performing Test LWS_HAVE_TCP_USER_TIMEOUT - Failed Compiling with SSL support OpenSSL include dir: C:/Users/vmwin10/.conan2/p/opens7eaedae154df5/p/include OpenSSL libraries: C:/Users/vmwin10/.conan2/p/opens7eaedae154df5/p/lib/libssl.lib;C:/Users/vmwin10/.conan2/p/opens7eaedae154df5/p/lib/libcrypto.lib -- Looking for openssl/ecdh.h -- Looking for openssl/ecdh.h - not found CHECK_FUNCTION_EXISTS CMAKE_REQUIRED_INCLUDES: C:/Users/vmwin10/.conan2/p/opens7eaedae154df5/p/include CHECK_FUNCTION_EXISTS CMAKE_REQUIRED_LIBRARIES: C:/Users/vmwin10/.conan2/p/opens7eaedae154df5/p/lib/libssl.lib;C:/Users/vmwin10/.conan2/p/opens7eaedae154df5/p/lib/libcrypto.lib;C:/Users/vmwin10/.conan2/p/zlibee1f000851145/p/lib/zlib.lib;ws2_32.lib;userenv.lib;psapi.lib;iphlpapi.lib;crypt32.lib;C:/Users/vmwin10/.conan2/p/zlibee1f000851145/p/lib/zlib.lib -- Looking for SSL_CTX_set1_param -- Looking for SSL_CTX_set1_param - found -- Looking for SSL_set_info_callback -- Looking for SSL_set_info_callback - found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - found -- Looking for X509_VERIFY_PARAM_set1_host -- Looking for X509_VERIFY_PARAM_set1_host - not found -- Looking for RSA_set0_key -- Looking for RSA_set0_key - found -- Looking for X509_get_key_usage -- Looking for X509_get_key_usage - found -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key -- Looking for SSL_CTX_EVP_PKEY_new_raw_private_key - not found -- Looking for SSL_CTX_get0_certificate -- Looking for SSL_CTX_get0_certificate - found -- Looking for SSL_get0_alpn_selected -- Looking for SSL_get0_alpn_selected - found -- Looking for SSL_set_alpn_protos -- Looking for SSL_set_alpn_protos - found -- Looking for EVP_aes_128_cfb8 -- Looking for EVP_aes_128_cfb8 - found -- Looking for EVP_aes_128_cfb128 -- Looking for EVP_aes_128_cfb128 - found -- Looking for EVP_aes_192_cfb8 -- Looking for EVP_aes_192_cfb8 - found -- Looking for EVP_aes_192_cfb128 -- Looking for EVP_aes_192_cfb128 - found -- Looking for EVP_aes_256_cfb8 -- Looking for EVP_aes_256_cfb8 - found -- Looking for EVP_aes_256_cfb128 -- Looking for EVP_aes_256_cfb128 - found -- Looking for EVP_aes_128_xts -- Looking for EVP_aes_128_xts - found -- Looking for EVP_aes_128_ofb -- Looking for EVP_aes_128_ofb - found -- Looking for EVP_aes_128_ecb -- Looking for EVP_aes_128_ecb - found -- Looking for EVP_aes_128_ctr -- Looking for EVP_aes_128_ctr - found -- Looking for RSA_verify_pss_mgf1 -- Looking for RSA_verify_pss_mgf1 - not found -- Looking for HMAC_CTX_new -- Looking for HMAC_CTX_new - found -- Looking for EVP_PKEY_new_raw_private_key -- Looking for EVP_PKEY_new_raw_private_key - found -- Looking for SSL_SESSION_set_time -- Looking for SSL_SESSION_set_time - found -- Looking for EC_KEY_new_by_curve_name -- Looking for EC_KEY_new_by_curve_name - found -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS -- Performing Test LWS_HAVE_SSL_EXTRA_CHAIN_CERTS - Success -- Performing Test LWS_HAVE_EVP_MD_CTX_free -- Performing Test LWS_HAVE_EVP_MD_CTX_free - Success -- Performing Test LWS_HAVE_OPENSSL_STACK -- Performing Test LWS_HAVE_OPENSSL_STACK - Success -- Looking for ECDSA_SIG_set0 -- Looking for ECDSA_SIG_set0 - found -- Looking for BN_bn2binpad -- Looking for BN_bn2binpad - found -- Looking for EVP_aes_128_wrap -- Looking for EVP_aes_128_wrap - found -- Looking for EC_POINT_get_affine_coordinates -- Looking for EC_POINT_get_affine_coordinates - found -- Looking for TLS_client_method -- Looking for TLS_client_method - found -- Looking for TLSv1_2_client_method -- Looking for TLSv1_2_client_method - found `

ydcpp commented 2 months ago

Hi, I was also having this issue with conan build. When I build openssl 3 as shared library in conan dependencies there is no problem with building LWS.

But when openssl is built as static library for version 3xx , then LWS CMake cannot locate some of the new functions of openssl. Then fallbacks to old openssl definitions into compilation errors.

I'm not sure if this issue is related to LWS configurations or openssl itself with static build.

memsharded commented 2 months ago

Thanks very much all for the support and help.

I can confirm that the following patch builds:

--- a/recipes/libwebsockets/all/conanfile.py
+++ b/recipes/libwebsockets/all/conanfile.py
@@ -109,7 +109,7 @@ class LibwebsocketsConan(ConanFile):
         "fPIC": True,
         "with_libuv": False,
         "with_libevent": False,
-        "with_zlib": False,
+        "with_zlib": "zlib",
         "with_ssl": "openssl",
         "with_sqlite3": False,
         "with_libmount": False,
@@ -225,7 +225,7 @@ class LibwebsocketsConan(ConanFile):

         if self.options.with_ssl == "openssl":
             # Cannot add the [>=1.1 <4] range, as it seems openssl3 makes it fail
-            self.requires("openssl/1.1.1w", transitive_headers=True)
+            self.requires("openssl/[>=1.1.1w <4]", transitive_headers=True)
         elif self.options.with_ssl == "mbedtls":
             self.requires("mbedtls/3.5.0")
         elif self.options.with_ssl == "wolfssl":

I still don't fully understand why the zlib information is not correctly propagated. Conan is correctly bringing zlib as a transitive dependency and linking it as transitive dependency of openssl, but isn't this enough for libwebsockets and it is necessary to explicitly define LWS_WITH_ZLIB cmake var?

jcar87 commented 2 months ago

Hi @zzblydia - thanks so much for taking the time to troubleshoot.

In the end, I think it has to do with CHECK_FUNCTION_EXISTS, which relies on CMake's try_compile functionality. The CMAKE_REQUIRED_LIBRARIES need to contain not only OpenSSL, but ZLIB as well, if the former depends on the latter.

These days this is typically handled automatically by CMake, when using targets - try_compile accepts modern imported targets, as well as legacy variables.

What was confusing for us was that there seems to be 3 ways to locate OpenSSL:

In most cases, CMake's legacy dependency variables (xxx_LIBRARIES, etc), can contain a modern CMake target and still work as intended - I would perhaps advice to consider a more "direct" way of locating OpenSSL (with find_package(OpenSSL) first, as that would have prevented this issue altogether.