Skip to content

Fix build with Boost 1.89.0#405

Closed
cho-m wants to merge 1 commit intofacebook:mainfrom
cho-m:boost-1.89.0
Closed

Fix build with Boost 1.89.0#405
cho-m wants to merge 1 commit intofacebook:mainfrom
cho-m:boost-1.89.0

Conversation

@cho-m
Copy link

@cho-m cho-m commented Aug 11, 2025

In the upcoming Boost 1.89.0 release, the Boost.System stub library introduced back in 1.691 has been removed (boostorg/system@7a495bb), which causes a CMake error when system component is required.

This PR change using OPTIONAL_COMPONENTS is based on upstream comment https://github.com/boostorg/system/issues/132#issuecomment-3146378680 given that Boost 1.62 is still supported.

If minimum is increased to 1.69 (or later), then can remove system instead, e.g.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e19d18f1b..8f0b6fbab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,10 +41,9 @@ fb_activate_static_library_option()
 set(QUIC_FBCODE_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Dependencies
-find_package(Boost 1.62
+find_package(Boost 1.69
   REQUIRED COMPONENTS
   iostreams
-  system
   thread
   filesystem
   regex

Footnotes

  1. https://www.boost.org/doc/libs/1_69_0/libs/system/doc/html/system.html#changes_in_boost_1_69

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 11, 2025
@cho-m cho-m mentioned this pull request Aug 11, 2025
41 tasks
CMakeLists.txt Outdated
Comment on lines 53 to 54
OPTIONAL_COMPONENTS
system
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake_minimum_required(VERSION 3.10)

CMake 3.11 introduced OPTIONAL_COMPONENTS but project allows 3.10 so will need some more work.

Easiest options are increasing CMake to 3.11 or increasing Boost to 1.69. Otherwise, may have to run find_package twice.

Signed-off-by: Michael Cho <michael@michaelcho.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant