#17461 closed defect (fixed)

boost-1.81.0 breaks some of its users, including libreoffice.

Reported by: ken@… Owned by: ken@…
Priority: normal Milestone: 11.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

With boost-1.81.0 some packages using it break, at least with gcc-12.0.

The one I've found is libreoffice-7.4.3.2, trying to link libetonyek:

/usr/bin/ld: ./.libs/libetonyek_internal.a(libetonyek_internal_la-KEY1DivElement.o):(.bss+0x0): multiple definition of `boost::phoenix::placeholders::uarg10'; ./.libs/libetonyek_internal.a(libetonyek_internal_la-IWORKFormula.o):(.bss+0x0): first defined here
(etc)

see https://github.com/boostorg/phoenix/pull/112 Raised as issue 111 there, 112 is a partial revert not yet approved (boost devs apparently are more concerned with not breaking older compilers than with supporting newer ones, if I read the comments there correctly).

Patch found at gentoo, turns out to be a one-line change, a sed should be possible.

I will also mention that gentoo don't run tests, with the follwoing comment in their ebuild:

# the tests will never fail because these are not intended as sanity
# tests at all. They are more a way for upstream to check their own code
# on new compilers. Since they would either be completely unreliable
# (failing for no good reason) or completely useless (never failing)
# there is no point in having them in the ebuild to begin with.
RESTRICT="test"

Apparently, we do offer the option to run tests.

Change History (8)

comment:1 by ken@…, 16 months ago

Another problem in libreoffice, also apparently from boost:

resmgr.cxx:130:39: error: 'char_facet' is not a member of 'boost::locale'

According to the docs at https://www.boost.org/doc/libs/1_59_0/libs/locale/doc/html/namespaceboost_1_1locale.html#ac57b3067a033cb4416098b8c34867aa1 it IS a member of that.

comment:2 by ken@…, 16 months ago

Summary: boost-1.81.0 breaks some of its users.boost-1.81.0 breaks some of its users, including libreoffice.

comment:3 by ken@…, 16 months ago

Upstream patch from libreoffice-7.5 found at gentoo. Now building.

Note that at this point I have not tested the modified boost build, only edited the errant file, /usr/include/boost/phoenix/stl.hpp to remove the include of boost/phoenix/stl/tuple.hpp. For anyone who has already installed boost-1.81.0 that will save rebuilding boost.

comment:4 by Bruce Dubbs, 16 months ago

We have already worked around the problem with libreoffice with --without-system-boost

comment:5 by ken@…, 16 months ago

Surely it is better to use a fixed system bost, which will also solve the build failure on whichever non-BLFS packages are also affected ? Looking at the gentoo bug report, mainly this lib in libreoffice, but also Ceph.

comment:6 by pierre, 16 months ago

I agree we should use system libraries as much as possible. If you mange to build libreoffice with system boost, it is much better than with the bundled one.

comment:7 by ken@…, 16 months ago

Simplifying my sed to

sed -i '/#include.*phoenix.*tuple.hpp.*/d' \
  boost/phoenix/stl.hpp

because the fuller match to the line, with escapes, broke our xml parser:

general/genlib/boost.xml:113: parser error : error parsing attribute name
<screen><userinput>sed -i '/#include <boost\/phoenix\/stl\/tuple.hpp>/d' \
                                           ^
general/genlib/boost.xml:113: parser error : attributes construct error
<screen><userinput>sed -i '/#include <boost\/phoenix\/stl\/tuple.hpp>/d' \
                                           ^
general/genlib/boost.xml:113: parser error : Couldn't find end of Start Tag boost line 113
<screen><userinput>sed -i '/#include <boost\/phoenix\/stl\/tuple.hpp>/d' \
                                           ^
general/genlib/genlib.xml:55: element include: XInclude error : could not load general/genlib/boost.xml, and no fallback was found

Retesting to ensure the installed result is as expected (I think it must be, but if I'm wrong it would not be the first time and boost is such a PITA).

comment:8 by ken@…, 16 months ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.