Repository navigation
fatal error: mbedtls/ctr_drbg.h: No such file or directory #577
Copy link
Copy link
Closed
Description
I used the latest versions of IXWebSocket and mbedtls at this moment:
- IXWebSocket 12.0.0: https://github.com/machinezone/IXWebSocket/releases/tag/v12.0.0
- mbedtls-4.1.0 (.tar.bz2): https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.1.0
- MinGW 13.1: https://winlibs.com/
My steps:
1. Building and installing mbedtls-4.1.0:
cmake -G "MinGW Makefiles" -S . -B dist -DCMAKE_INSTALL_PREFIX=C:/libs/mbedtls-4.1.0-mingwcmake --build dist -j8cmake --install dist2. Building and installing zlib 1.3.2:
cmake -G "MinGW Makefiles" -S . -B dist -DCMAKE_INSTALL_PREFIX=C:/libs/zlib-1.3.2-mingwcmake --build dist -j8cmake --install dist3. Building and installing IXWebSocket 12.0.0:
cmake -G "MinGW Makefiles" -S . -B dist -DCMAKE_INSTALL_PREFIX=C:/libs/IXWebSocket-12.0.0-mingw -DZLIB_INCLUDE_DIR=C:/libs/zlib-1.3.2-mingw/include -DZLIB_LIBRARY=C:/libs/zlib-1.3.2-mingw/lib/libzlibstatic.a -DMBEDTLS_LIBRARY=C:/libs/mbedtls-4.1.0-mingw/lib/libmbedtls.a -DMBEDTLS_INCLUDE_DIRS=C:/libs/mbedtls-4.1.0-mingw/include -DMBEDX509_LIBRARY=C:/libs/mbedtls-4.1.0-mingw/lib/libmbedx509.a -DMBEDCRYPTO_LIBRARY=C:/libs/mbedtls-4.1.0-mingw/lib/libmbedcrypto.a -DUSE_TLS=ON -DUSE_WS=ON -DUSE_ZLIB=ONcmake --build dist -j8cmake --install distLog:
[ 4%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/stdout_sinks.cpp.obj
[ 4%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.obj
[ 8%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/color_sinks.cpp.obj
[ 8%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/file_sinks.cpp.obj
[ 10%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/async.cpp.obj
[ 14%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXBench.cpp.obj
[ 14%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/cfg.cpp.obj
[ 16%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/fmt.cpp.obj
[ 18%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXCancellationRequest.cpp.obj
[ 20%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXConnectionState.cpp.obj
[ 22%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXDNSLookup.cpp.obj
[ 24%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXExponentialBackoff.cpp.obj
[ 26%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXGetFreePort.cpp.obj
[ 28%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXGzipCodec.cpp.obj
[ 30%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXHttp.cpp.obj
[ 32%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXHttpClient.cpp.obj
[ 34%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXHttpServer.cpp.obj
[ 36%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXNetSystem.cpp.obj
[ 38%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSelectInterrupt.cpp.obj
[ 40%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSelectInterruptFactory.cpp.obj
[ 42%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSelectInterruptPipe.cpp.obj
[ 44%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSelectInterruptEvent.cpp.obj
[ 46%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSetThreadName.cpp.obj
[ 48%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocket.cpp.obj
[ 50%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocketConnect.cpp.obj
[ 52%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocketFactory.cpp.obj
[ 54%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocketServer.cpp.obj
In file included from C:\libs\IXWebSocket-12.0.0\ixwebsocket\IXSocketFactory.cpp:13:
C:\libs\IXWebSocket-12.0.0\ixwebsocket\IXSocketMbedTLS.h:12:10: fatal error: mbedtls/ctr_drbg.h: No such file or directory
12 | #include <mbedtls/ctr_drbg.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[ 56%] Building CXX object CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocketTLSOptions.cpp.obj
mingw32-make[2]: *** [CMakeFiles\ixwebsocket.dir\build.make:349: CMakeFiles/ixwebsocket.dir/ixwebsocket/IXSocketFactory.cpp.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[1]: *** [CMakeFiles\Makefile2:131: CMakeFiles/ixwebsocket.dir/all] Error 2
mingw32-make[1]: *** Waiting for unfinished jobs....
[ 58%] Linking CXX static library libspdlog.a
[ 58%] Built target spdlog
mingw32-make: *** [Makefile:135: all] Error 2Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
ivan-enzhaev commentedon May 20, 2026
But
IXWebSocket 12.0.0works well withMbed TLS 3.6.6. See my step-by-step guide: #529 (comment)bsergean commentedon May 21, 2026
Probably that file is gone in mbedtls 4.x+.
bsergean commentedon May 21, 2026
this should be fixed in master, can you try ?
ivan-enzhaev commentedon May 22, 2026
Thank you for the quick fix! I can confirm that IXWebSocket on master is now fully compatible with Mbed TLS 4.x.
Fix mbedTLS 4.x compatibility: guard removed APIs behind version chec…
ivan-enzhaev commentedon May 31, 2026
@bsergean could you release the
12.0.1version with this fix: 998cf95ivan-enzhaev commentedon Jun 1, 2026
My step-by-step guide: Setting up IXWebSocket with SDL3 and OpenGL (MinGW)