Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-core][PATCH] boost: install CMake config for header-only system library
@ 2026-07-03  9:59 Siva Balasubramanian
  2026-07-03 21:44 ` Alexander Kanavin
  0 siblings, 1 reply; 2+ messages in thread
From: Siva Balasubramanian @ 2026-07-03  9:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex, mathieu.dubois-briand, Siva Balasubramanian

In 1.91.0 (4981f3087a30) boost-system became a header-only "modular"
library with no separate shared object, and was therefore dropped from
BOOST_LIBS. As a side effect its CMake package config is no longer
installed: the top-level b2 install target only ships configs for the
libraries selected via --with-<library>, and 'system' can no longer be
named there (b2 errors out with "wrong library name 'system'").

Downstream software that does find_package(Boost COMPONENTS system) then
fails to configure and has to be patched.

Install the modular 'libs/system//install' target explicitly from
do_install so that lib/cmake/boost_system-<ver>/ is shipped again in the
-dev package. The target is header-only, so no library is built or
packaged; only the CMake config (and already-present headers) are added.

Verified with a from-scratch build: boost_system-config.cmake is packaged
into boost-dev and find_package(Boost REQUIRED COMPONENTS system)
succeeds against the installed tree again.

[YOCTO #16346]

Signed-off-by: Siva Balasubramanian <sivakumar.bs@gmail.com>
---
 meta/recipes-support/boost/boost.inc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 7a343e54f6..3cd71c4d6e 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -203,6 +203,17 @@ do_install() {
 		--libdir=${D}${libdir} \
 		--includedir=${D}${includedir} \
 		install
+
+	# In 1.91 boost-system became a header-only "modular" library and is no
+	# longer selectable through --with-system, so it is not part of BOOST_LIBS
+	# and the top-level install target no longer ships its CMake package
+	# config. Install that modular target explicitly so downstream
+	# find_package(Boost COMPONENTS system) keeps working.
+	b2 ${BJAM_OPTS} \
+		--libdir=${D}${libdir} \
+		--includedir=${D}${includedir} \
+		libs/system//install
+
 	for lib in ${BOOST_LIBS}; do
 		if [ -e ${D}${libdir}/libboost_${lib}.a ]; then
 			ln -s libboost_${lib}.a ${D}${libdir}/libboost_${lib}-mt.a
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-03 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03  9:59 [OE-core][PATCH] boost: install CMake config for header-only system library Siva Balasubramanian
2026-07-03 21:44 ` Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox