Skip to contentSkip to conversation

package/boost: remove dependencies on Boost.System

PATCH In review Michael Nosthoff via buildroot 1 participant 4 messages Sep 3, 2025 – Sep 5, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/boost: remove dependencies on Boost.System

Boost.System is a header only library since Boost 1.69.0 [0].

A Stub Library remained for backward compatibility. This mainly affects CMake Packages that use FindPackage and explicitly list 'system'.

For Boost internal modules this is not the case so remove this dependency.

Buildroot packages should select BR2_PACKAGE_BOOST_SYSTEM explicitly if needed and not rely on a proxy dependency from other boost packages.

[0] https://github.com/boostorg/system/blob/develop/doc/system/changes.adoc#changes-in-boost-169

---
 package/boost/Config.in         | 13 -------------
 package/libcpprestsdk/Config.in |  1 +
 2 files changed, 1 insertion(+), 13 deletions(-)
package/boost/Config.in +0 -13
index c7c90aa9ab..5d4e530a6f 100644
@@ -24,7 +24,6 @@ config BR2_PACKAGE_BOOST_ATOMIC
 
 config BR2_PACKAGE_BOOST_CHRONO
 	bool "boost-chrono"
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  Useful time utilities. C++11.
 
@@ -62,7 +61,6 @@ config BR2_PACKAGE_BOOST_CONTRACT
 	bool "boost-contract"
 	# pthread_condattr_setclock
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  Contract programming for C++.
 
@@ -77,7 +75,6 @@ config BR2_PACKAGE_BOOST_COROUTINE
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context, boost-thread
 	select BR2_PACKAGE_BOOST_CHRONO
 	select BR2_PACKAGE_BOOST_CONTEXT
-	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_THREAD
 	help
 	  deprecated coroutine library, the non-deprecated coroutine2
@@ -117,7 +114,6 @@ config BR2_PACKAGE_BOOST_FIBER
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	select BR2_PACKAGE_BOOST_CONTEXT
 	select BR2_PACKAGE_BOOST_FILESYSTEM
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  C++11 userland threads library.
 
@@ -134,7 +130,6 @@ config BR2_PACKAGE_BOOST_FILESYSTEM
 	bool "boost-filesystem"
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
 	select BR2_PACKAGE_BOOST_ATOMIC
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  The Boost Filesystem Library provides portable facilities to
 	  query and manipulate paths, files, and directories.
@@ -184,7 +179,6 @@ config BR2_PACKAGE_BOOST_LOCALE
 	depends on !(BR2_TOOLCHAIN_HAS_GCC_BUG_64735 && BR2_PACKAGE_ICU) # boost-thread
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS \
 		|| !BR2_PACKAGE_ICU # boost-thread
-	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_THREAD if BR2_PACKAGE_ICU
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	help
@@ -209,7 +203,6 @@ config BR2_PACKAGE_BOOST_LOG
 	select BR2_PACKAGE_BOOST_DATE_TIME
 	select BR2_PACKAGE_BOOST_FILESYSTEM
 	select BR2_PACKAGE_BOOST_REGEX
-	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_THREAD
 	help
 	  Logging library.
@@ -279,7 +272,6 @@ config BR2_PACKAGE_BOOST_PYTHON
 
 config BR2_PACKAGE_BOOST_RANDOM
 	bool "boost-random"
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  A complete system for random number generation.
 
@@ -312,7 +304,6 @@ config BR2_PACKAGE_BOOST_SYSTEM
 config BR2_PACKAGE_BOOST_TEST
 	bool "boost-test"
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_TIMER
 	help
 	  Support for simple program testing, full unit testing, and for
@@ -323,7 +314,6 @@ config BR2_PACKAGE_BOOST_THREAD
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception
 	select BR2_PACKAGE_BOOST_CHRONO
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  Portable C++ multi-threading. C++11, C++14.
 
@@ -333,7 +323,6 @@ comment "boost-thread needs a toolchain not affected by GCC bug 64735"
 config BR2_PACKAGE_BOOST_TIMER
 	bool "boost-timer"
 	select BR2_PACKAGE_BOOST_CHRONO
-	select BR2_PACKAGE_BOOST_SYSTEM
 	help
 	  Event timer, progress timer, and progress display classes.
 
@@ -341,7 +330,6 @@ config BR2_PACKAGE_BOOST_TYPE_ERASURE
 	bool "boost-type_erasure"
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
-	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_THREAD
 	help
 	  Runtime polymorphism based on concepts.
@@ -371,7 +359,6 @@ config BR2_PACKAGE_BOOST_WAVE
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
 	select BR2_PACKAGE_BOOST_DATE_TIME
 	select BR2_PACKAGE_BOOST_FILESYSTEM
-	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_THREAD
 	help
 	  The Boost.Wave library is a Standards conformant, and highly
package/libcpprestsdk/Config.in +1 -0
index e533b30393..7688021ed0 100644
@@ -13,6 +13,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK
 	select BR2_PACKAGE_BOOST_FILESYSTEM
 	select BR2_PACKAGE_BOOST_RANDOM
 	select BR2_PACKAGE_BOOST_REGEX
+	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_BOOST_THREAD
 	select BR2_PACKAGE_OPENSSL
 	help
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Michael,

Quoted 6 lines · On Wed, 3 Sep 2025 15:37:52 +0200 Michael Nosthoff via buildroot…

Boost.System is a header only library since Boost 1.69.0 [0].

A Stub Library remained for backward compatibility. This mainly affects CMake Packages that use FindPackage and explicitly list 'system'.

Quoted 7 lines

For Boost internal modules this is not the case so remove this dependency.

Buildroot packages should select BR2_PACKAGE_BOOST_SYSTEM explicitly if needed and not rely on a proxy dependency from other boost packages.

[0] https://github.com/boostorg/system/blob/develop/doc/system/changes.adoc#changes-in-boost-169

Thanks for the patch. It's great to have someone understanding the dependencies between the different Boost modules, because they are not obvious, and not easy to maintain, so thanks a lot.

Since this has the potential for breaking stuff quite a bit for packages that depend on Boost, how much testing did you do (build testing) ? I see your patch fixes package/libcpprestsdk, but is it the only package affected?

Note that the fix of package/libcpprestsdk and other packages could be done as a separate, preliminary patch.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hi Thomas,

Quoted 14 lines · Thomas Petazzoni

Hello Michael,

Quoted 9 lines · On Wed, 3 Sep 2025 15:37:52 +0200 Michael Nosthoff via buildroot…

Boost.System is a header only library since Boost 1.69.0 [0].

A Stub Library remained for backward compatibility. This mainly affects CMake Packages that use FindPackage and explicitly list 'system'.

For Boost internal modules this is not the case so remove this dependency.

Quoted 9 lines
Quoted 4 lines

Buildroot packages should select BR2_PACKAGE_BOOST_SYSTEM explicitly if needed and not rely on a proxy dependency from other boost packages.

[0] https://github.com/boostorg/system/blob/develop/doc/system/changes.adoc#changes-in-boost-169

Thanks for the patch. It's great to have someone understanding the dependencies between the different Boost modules, because they are not obvious, and not easy to maintain, so thanks a lot.

The boost guys are currently working on better modularization support. So at least now each boost subproject has a dependency list in its build.jam file which helps a lot. e.g., https://github.com/boostorg/json/blob/develop/build.jam

Quoted 4 lines

Since this has the potential for breaking stuff quite a bit for packages that depend on Boost, how much testing did you do (build testing) ? I see your patch fixes package/libcpprestsdk, but is it the only package affected?

I checked all packages that depend on at least one of the boost modules where I removed the Boost.System dependency. Only two don't explicitly select BOOST_SYSTEM. libcpprestsdk nedded it so I fixed it. The other one is log4cxx which really doesn't depends on it in it's CMakeLists.

Quoted 3 lines

Note that the fix of package/libcpprestsdk and other packages could be done as a separate, preliminary patch.

I will split them and resubmit.

Regards,
Michael

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
Quoted 7 lines · On Thu, 04 Sep 2025 21:52:00 +0200 "Michael Nosthoff" <[email protected]>…
Quoted 3 lines

Thanks for the patch. It's great to have someone understanding the dependencies between the different Boost modules, because they are not obvious, and not easy to maintain, so thanks a lot.

The boost guys are currently working on better modularization support. So at least now each boost subproject has a dependency list in its build.jam file which helps a lot. e.g., https://github.com/boostorg/json/blob/develop/build.jam

Sounds very nice indeed to then have a better representation of those dependencies in Buildroot.

Quoted 4 lines

I checked all packages that depend on at least one of the boost modules where I removed the Boost.System dependency. Only two don't explicitly select BOOST_SYSTEM. libcpprestsdk nedded it so I fixed it. The other one is log4cxx which really doesn't depends on it in it's CMakeLists.

Great work! You could have mentioned this in the commit log.

Quoted 4 lines
Quoted 2 lines

Note that the fix of package/libcpprestsdk and other packages could be done as a separate, preliminary patch.

I will split them and resubmit.

Excellent, thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot