From 29e14c10cb59a1027aa1e478e8fc883ea446ed2c Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 31 Aug 2026 22:00:45 +0500 Subject: [PATCH] build-all: `--disable-icu` on boost to avoid linking unexpected ICU libs Example error coming from Linux build (`build_rocky` is bringing ISU dev libs transitively through pango/cairo): ``` ./BonsaiViewer: error while loading shared libraries: libicudata.so.67: cannot open shared object file: No such file or directory ``` --- nix/build-all.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nix/build-all.py b/nix/build-all.py index eb560977b7..155edfd7ea 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -1462,7 +1462,9 @@ if "boost" in targets: toolset = [] if WASM: toolset.append("toolset=emscripten") - boost_name = Dependencies.register("boost", BOOST_VERSION) + # TODO: drop `boost_alternative_name` on next BOOST_VERSION bump, it's only needed to force rebuild cache. + boost_alternative_name = "boost-disable-icu" if BUILD_SHARED and BOOST_VERSION == "1.86.0" else None + boost_name = Dependencies.register("boost", BOOST_VERSION, alternative_name=boost_alternative_name) build_dependency( boost_name, mode="bjam", @@ -1475,6 +1477,11 @@ if "boost" in targets: "--with-date_time", "--with-iostreams", "--with-filesystem", + # By default boost will keep ICU enabled, if it manages to find dev ICU dev package on the system. + # Which then creates issues when during our executables packaging. + # E.g. it ends up linking system's `libicudata.so.67`, so then we need to somehow detect and bundle + # along the `libboost_regex.so`. So since we don't use it, better just skip it. + "--disable-icu", f"link={LINK_TYPE}", *toolset, *map(str_concat("cxxflags"), CXXFLAGS.strip().split(" ")),