How To Rebuild Boost-Dependent Ecosystem Gentoo
This morning after updating my Gentoo systems, I received the following message which was mysterious to me. Whilst I understand the overall concept of rebuilding the Boost-dependent ecosystem I did not know offhand the commands I would use to do the rebuild. This post documents my quest to identifiy the steps I will follow should I ever encounter an error message similar that in the message.
* Messages for package dev-libs//boost-1.77.0-r2:
* Boost.Regex is *extremely* ABI sensitive. If you get errors such as
*
* undefined reference to 'boost::re_detail_107700::cpp_regex_traits_implementation
* <char>::transform_primary[abi:cxx11](char const*, char const*) const'
*
* Then you need to recompile Boost and all its reverse dependencies
* using the same toolchain. In general, *every* change of the C++ toolchain
* requires a complete rebuild of the Boost-dependent ecosystem.
*
* See for instance https://bugs.gentoo.org/638138
What does that bug report say?
Since message provided a bug tracking record, 638138, I thought to start by looking at what it had to offer. Unfortunately the bug report is related to the build of media-video/mkvtoolnix package failing with the error. The solution for the bug was to first rebuild dev-libs/boost. Because I got the cautionary message from the install of dev-libs/boost itself, and because rebuilding boost did not meet my imagined vision of rebuilding the boost-dependent ecosystem, moved on to searching the web.
Gentoo Forum Post
The first search result back on ‘rebuild boost dependent ecosystem’ was a Gentoo discussion forum post titled rebuild of the boost-dependent ecosystem [SOLVED]. The title seemed promissing, and the discussion did indeed capture an approach that made sense to me. Specifically the comment by user fedeliallalinea, who suggested using ‘'’equery d boost | awk -F’ ‘ ‘{print “=”$1}’ | xargs emerge -pv’’’ to generate a list of all packages dependent ob boost as rebuild targets.
$ equery d boost | awk -F' ' '{print "="$1}' | xargs emerge -pv
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-block/thin-provisioning-tools-0.9.0::gentoo USE="-static -test" 0 KiB
[ebuild R ] net-libs/nghttp2-1.44.0:0/1.14::gentoo USE="threads -cxx -debug -hpack-tools -jemalloc -static-libs -test -utils -xml" ABI_X86="(64) -32 (-x32)" 0 KiB
Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
$
Switching to root and running the same command with the emerge -p (pretend) switch removed, equery d boost | awk -F' ' '{print "="$1}' | xargs emerge -v
, causes packages tied to the boost-dependent ecosystem to not only be listed, but also rebuilt and installed. Exactly what I would be looking for in the event of a boost related error message.
# equery d boost | awk -F' ' '{print "="$1}' | xargs emerge -v
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-block/thin-provisioning-tools-0.9.0::gentoo USE="-static -test" 0 KiB
[ebuild R ] net-libs/nghttp2-1.44.0:0/1.14::gentoo USE="threads -cxx -debug -hpack-tools -jemalloc -static-libs -test -utils -xml" ABI_X86="(64) -32 (-x32)" 0 KiB
Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB
>>> Verifying ebuild manifests
>>> Emerging (1 of 2) sys-block/thin-provisioning-tools-0.9.0::gentoo
>>> Emerging (2 of 2) net-libs/nghttp2-1.44.0::gentoo
>>> Installing (2 of 2) net-libs/nghttp2-1.44.0::gentoo
>>> Installing (1 of 2) sys-block/thin-provisioning-tools-0.9.0::gentoo
>>> Jobs: 2 of 2 complete Load avg: 9.99, 6.38, 5.65
>>> Auto-cleaning packages...
>>> No outdated packages were found on your system.
* GNU info directory index is up-to-date.
#
And with that, I now have a solution for a problem I have yet to run into.
References
- Bug report: 638138
- Gentoo Forum Post: fedeliallalinea’s Comment