[BUG] Fails to build with MbedTLS 3.6 LTS #2957
Labels
[build]
Area: Changes in build files
help wanted
Indicates that a maintainer wants help on an issue or pull request
Type: Bug
Indicates an unexpected problem or unintended behavior
Milestone
Describe the bug
Trying to build SRT 1.5.3 with MbedTLS 3.6 LTS for Windows ARM64 fails because SRT's CMake find module for MbedTLS is outdated and does not take the transitive dependencies of MbedTLS into account (including but not limited to
bcrypt
not being added to the dependency list).To Reproduce
0. This requires configuring and building on Windows - the host architecture should be irrelevant, building MbedTLS on ARM64 with the Visual Studio toolchain requires version 3.6 however.
-DUSE_ENCLIB:STRING=mbedtls
and providing aCMAKE_PREFIX_PATH
with MbedTLS 3.6 installedcmake --build <BUILD_DIR>
LNK2019
will be emitted becauseBCryptGenRandom
(referenced by functionmbedtls_platform_entropy_poll
) cannot be resolved.Expected behavior
SRT compiles and links successfully with MbedTLS 3.6.
Desktop (please provide the following information):
Additional context
MbedTLS provides its own CMake package which when used (instead of the custom find module) yields a CMake target
MbedTLS::mbedtls
that can be used withtarget_link_libraries
directly and will add all necessary libraries (including transitive dependencies) and include directories directly. This includes addingbcrypt
and other "new" dependencies of MbedTLS automatically.The text was updated successfully, but these errors were encountered: