Skip to contentSkip to conversation

package/boost: enable all features except python on host

PATCH In review Fabrice Fontaine 3 participants 3 messages Jan 15, 2022 – Jul 27, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/boost: enable all features except python on host

Enable all features except python on host variant as suggested by Yann E. Morin in
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]

Indeed, host packages have no way to express their dependencies on host boost

---
 package/boost/boost.mk | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
package/boost/boost.mk +1 -7
index 2d2a8fb311..ad071ed206 100644
@@ -12,13 +12,7 @@ BOOST_LICENSE = BSL-1.0
 BOOST_LICENSE_FILES = LICENSE_1_0.txt
 BOOST_CPE_ID_VENDOR = boost
 
-# keep host variant as minimal as possible
-HOST_BOOST_FLAGS = --without-icu --with-toolset=gcc \
-	--without-libraries=$(subst $(space),$(comma),atomic chrono context \
-	contract container coroutine date_time exception fiber filesystem graph \
-	graph_parallel iostreams json locale log math mpi nowide program_options \
-	python random serialization stacktrace test thread timer \
-	type_erasure wave)
+HOST_BOOST_FLAGS = --without-icu --with-toolset=gcc --without-libraries=python
 
 BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_ATOMIC),,atomic)
 BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
Signature · 6 lines
2.34.1

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

Fabrice, All,

+Peter K., +Thomas P., +Arnout.

On 2022-01-15 11:37 +0100, Fabrice Fontaine spake thusly:

Quoted 6 lines

Enable all features except python on host variant as suggested by Yann E. Morin in
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]

Indeed, host packages have no way to express their dependencies on host boost

So, I was not expecting an actual patch so fast, and I was doing more testing here...

So, with a recent-enough gcc (e.g. gcc-10 as is available in our Docker image used in our CI), the full Boost (save for python) is indeed built.

So I gave it a shot on a much older system, like my autobuilder, that is still running gcc-4.8. And there, only the headers component is built; everything else is just skipped.

This means that host packages that depend on specific features of host-boost will fail randomly depending on the host system, and there is no way to prevent that, except by adding appropriate Config.in.host options for host-boost.

Note: in our case, host-riscv-isa-sim already depends on gcc >= 4.9, so it would not be selectable on my autobuilder. But still...

So I wonder what we should do... Any idea?

Regards,
Yann E. MORIN.

Quoted 31 lines
---
 package/boost/boost.mk | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
package/boost/boost.mk +1 -7
index 2d2a8fb311..ad071ed206 100644
@@ -12,13 +12,7 @@ BOOST_LICENSE = BSL-1.0
 BOOST_LICENSE_FILES = LICENSE_1_0.txt
 BOOST_CPE_ID_VENDOR = boost
 
-# keep host variant as minimal as possible
-HOST_BOOST_FLAGS = --without-icu --with-toolset=gcc \
-	--without-libraries=$(subst $(space),$(comma),atomic chrono context \
-	contract container coroutine date_time exception fiber filesystem graph \
-	graph_parallel iostreams json locale log math mpi nowide program_options \
-	python random serialization stacktrace test thread timer \
-	type_erasure wave)
+HOST_BOOST_FLAGS = --without-icu --with-toolset=gcc --without-libraries=python
 
 BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_ATOMIC),,atomic)
 BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Fabrice Fontaine

Hello Fabrice,

Quoted 8 lines · On Sat, 15 Jan 2022 11:37:54 +0100 Fabrice Fontaine…

Enable all features except python on host variant as suggested by Yann E. Morin in
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]

Indeed, host packages have no way to express their dependencies on host boost

As Yann said in
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected],
it significantly increases the build time of host-boost, and for no good reason.

We discussed with Arnout, and we prefer to keep things as they are
today: progressively enable the host-boost features that are needed by our packages, when needed. With luck, our CPUs will grow in computing power faster than we enable host-boost features, and we won't see a visible build time increase.

Worst case, we can always add package/boost/Config.in.host with some blind options BR2_PACKAGE_HOST_BOOST_xyz that other packages can select to request enabling a particular feature in a host package they depend on.

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