Skip to content

Conversation

@nigels-com
Copy link

@nigels-com nigels-com commented Sep 4, 2025

Fix for boostorg/boost Issue #1033

I'd come across a problem building boost 1.89.0 on Ubuntu 24.04 (Noble) in -DBUILD_TESTING=Y mode.
Turned out the same had been reported previously as mentioned above.

This change resolves the problem for me, seems like the same as being done for test/v1 tests.

Working build for boostorg/boost

cmake .. --fresh -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=Y && ninja

@nigels-com
Copy link
Author

MS copilot says:

The pull request "test/v2: Resolve cmake link error regarding init_unit_test_suite" addresses build issues experienced when building Boost 1.89.0 on Ubuntu 24.04 with testing enabled, specifically related to the init_unit_test_suite link error noted in boostorg/boost Issue #1033. The PR updates seven test files in the test/v2 directory to add #define BOOST_TEST_MAIN at the top of each file. This aligns the v2 tests with the solution already used in the v1 tests.

  • No files were deleted and only straightforward additions were made (no deletions).
  • The change is minimal and targeted, reducing risk.
  • The PR is marked as mergeable, but with an "unstable" mergeable state (which may be due to CI or branch status).
  • There are no code comments, requested reviewers, or review comments so far.

Overall, the fix is clear, resolves a previously reported issue, and is consistent with existing project practices for similar test files. The change should help users building with CMake and testing enabled.

@james-sergeant-work
Copy link

@nigels-com Fancy seeing you here :) I was hoping the fix was as simple as this. Thanks - hope you're doing well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants