Skip to content

Remove the hard dependency on boost::system compatibility library to fix builds with Boost 1.89.0#16163

Merged
clonker merged 1 commit intoargotorg:developfrom
cho-m:boost-1.89.0
Aug 19, 2025
Merged

Remove the hard dependency on boost::system compatibility library to fix builds with Boost 1.89.0#16163
clonker merged 1 commit intoargotorg:developfrom
cho-m:boost-1.89.0

Conversation

@cho-m
Copy link
Contributor

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

Boost.System has been header-only since Boost 1.691 and will be dropping the compatibility stub library in Boost 1.89 (boostorg/system@7a495bb).

Since the system component is only needed for Boost < 1.69, it can be added to BOOST_COMPONENTS in the fallback find_package.

Footnotes

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

@github-actions
Copy link

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@cho-m cho-m mentioned this pull request Aug 12, 2025
41 tasks
Copy link
Member

@clonker clonker left a comment

Choose a reason for hiding this comment

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

Thank you for getting this rolling! I think the usage of the Boost_SYSTEM_LIBRARY is not optimal and I'd rather not rely on it

@cameel
Copy link
Collaborator

cameel commented Aug 14, 2025

Since the system component is only needed for Boost < 1.69, it can be added to BOOST_COMPONENTS in the fallback find_package.

I'd recommend just bumping minimum Boost version to 1.69 and removing the fallback for simplicity. We don't have all a strong reason to support such old versions, and it's very likely that we'll have to bump minimum Boost version to 1.75 anyway due to #16084.

@cameel
Copy link
Collaborator

cameel commented Aug 14, 2025

BTW, we don't use boost::system too extensively. Just in a couple of test helpers to check error codes when deleting files or creating symlinks. We could probably easily replace those with std::filesystem equivalents and drop the usage of the library completely.

@cameel cameel changed the title Fix build with Boost 1.89.0 Remove the hard dependency on boost::system compatibility library to fix builds with Boost 1.89.0 Aug 14, 2025
@clonker
Copy link
Member

clonker commented Aug 15, 2025

Since the system component is only needed for Boost < 1.69, it can be added to BOOST_COMPONENTS in the fallback find_package.

I'd recommend just bumping minimum Boost version to 1.69 and removing the fallback for simplicity. We don't have all a strong reason to support such old versions, and it's very likely that we'll have to bump minimum Boost version to 1.75 anyway due to #16084.

Fair point. We can do that in a follow-up and think about bumping it to 1.70, then it always comes with a cmake config and we can leave out the entire branch:

https://github.com/ethereum/solidity/blob/c79f2ccda62e1a6871f9cef6a54770b64c83acc0/cmake/EthDependencies.cmake#L47-L54

Boost.System has been header-only since Boost 1.69 and will be dropping
the compatibility stub library in Boost 1.89 (boostorg/system@7a495bb).

Since the `system` component is only needed for Boost < 1.69, it can be
added to `BOOST_COMPONENTS` in the fallback find_package.

Signed-off-by: Michael Cho <michael@michaelcho.dev>
@clonker clonker merged commit a7e1bac into argotorg:develop Aug 19, 2025
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants