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

[BUG] Fails to build with MbedTLS 3.6 LTS #2957

Open
PatTheMav opened this issue May 29, 2024 · 0 comments
Open

[BUG] Fails to build with MbedTLS 3.6 LTS #2957

PatTheMav opened this issue May 29, 2024 · 0 comments
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

Comments

@PatTheMav
Copy link

PatTheMav commented May 29, 2024

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.

  1. Configure SRT by specifying -DUSE_ENCLIB:STRING=mbedtls and providing a CMAKE_PREFIX_PATH with MbedTLS 3.6 installed
  2. Run cmake --build <BUILD_DIR>
  3. Observe the error once the final output file is created by the linker - LNK2019 will be emitted because BCryptGenRandom (referenced by function mbedtls_platform_entropy_poll) cannot be resolved.

Expected behavior
SRT compiles and links successfully with MbedTLS 3.6.

Desktop (please provide the following information):

  • OS: Windows 11 23H2
  • SRT Version 1.5.3

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 with target_link_libraries directly and will add all necessary libraries (including transitive dependencies) and include directories directly. This includes adding bcrypt and other "new" dependencies of MbedTLS automatically.

@PatTheMav PatTheMav added the Type: Bug Indicates an unexpected problem or unintended behavior label May 29, 2024
@maxsharabayko maxsharabayko added [build] Area: Changes in build files help wanted Indicates that a maintainer wants help on an issue or pull request labels May 29, 2024
@maxsharabayko maxsharabayko added this to the Backlog milestone May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants