Stephan Bergmann sbergman at
Thu Jan 13 08:23:58 UTC 2022

There is an issue with some C++17 functionality that throws certain 
exceptions, most prominent apparently being std::optional::value:  On 
macOS, this functionality is only available in the system libc++ 
starting with macOS 10.13.  That would match our recent baseline (see 
"Bump minimum macOS to 10.13").  But versions of LLVM prior to LLVM 11 
made a mistake and, in the libc++ include files, labelled that 
functionality as only available starting with macOS 10.14 (see 
"[libc++] Fix too stringent availability markup for 
bad_optional_access").  That means that, even though everything should 
work fine at runtime, compiling a use of such functionality with Xcode < 
12.5 would fail (see 
  (And that is apparently what happened for 
<> "do not force pixel 
reading in VclCanvasBitmap ctor", where 
<> successfully built 
that change---introducing uses of std::optional::value---on tb86 with 
Xcode 13.2.1, but later builds of unrelated changes started to fail, 
like <> on tb69 with 
Xcode 11.3.1.)  One option would apparently be to limit LO to building 
with Xcode >= 12.5, but some hardware (like my early 2013 15" Retina 
MacBook Pro) is stuck with macOS 10.15 and thus with Xcode 12.4 (see 
  (For me personally that wouldn't be much of a problem, as I usually 
built against a trunk LLVM libc++ on that machine.  But it would 
presumably be an issue at least for some of the Jenkins machines?)  It 
would apparently also be useful if all Jenkins Gerrit builders used the 
same version of Xcode (ideally the baseline version, so Gerrit changes 
introducing uses of the problematic functionality would reliably fail in 
Jenkins as long as our baseline is Xcode 11.3), but as that is 
presumably not feasible, we need to continue to watch out for this 
gotcha as long as we don't bump our Xcode baseline.

More information about the LibreOffice mailing list