Compiling LO for lcov/gcov code coverage fails (gb_GCOV=YES)

Maarten Hoes hoes.maarten at
Sun May 15 13:00:34 UTC 2022


On Wed, May 11, 2022 at 9:07 PM Thorsten Behrens <thb at>

> Hi Maarten,
> Maarten Hoes wrote:
> > I personally do not know enough about the build system to figure out how
> to
> > correct this. Any and all help in trying to make this work again would be
> > appreciated.
> >
> Beyond what Lubos suggested, and assuming your error happens fairly
> quickly - you might want to give 'git bisect run' a try to find the
> commit that broke this (assuming you remember a time when it last
> worked).
> Here's a howto:
> HTH,
> -- Thorsten

I thought about giving this a go, but have some questions.

The last known good commit for me, was way back in 2015. It seems to me
that it would literally take weeks if not longer (on my vm, a full
libreoffice build takes about an hour) to find the right commit ? I realize
the process is automatic, but I still would have to keep my PC and VM
running for that time. Am I exaggerating the time it would take to find the
offending commit ?


I guess that 'git bisect run' considers things a 'success' if the build
succeeds (zero exit code), and a 'failure' if the build fails (non zero
exit code). Duh. But I don't get the impression that it matters to git what
it exactly was that made the build fail ?  I mean, what if there were
multiple build breakages between 'good commit' and 'bad commit', but you
are only looking for a specific failure (gcov related), and not possible
others that also broke the build ? I know you can limit the build to
specific build targets, which would make this less likely from occurring,
with 'make -C external Module_foo'. But when I tried this like this :

make clean
./ --enable-python=internal --without-system-libs
verbose=t make --output-sync=target -C external Module_liborcus

I get a build error :

/bin/sh: line 1:
No such file or directory
make: ***
Error 127
make: Leaving directory '/home/maarten/src/libreoffice/core/external'

Presumably because there are some prerequisites that are missing, that
'normally' (when you do a full build) do get build before the external
projects are build, but that are now missing ? Is there a way around this ?
Perhaps there is a specific make target that builds those prereqs, so you
can do 'make -C external Module_foo' on an otherwise 'make clean'ed build ?

Would it be the correct way to run 'git bisect run', if I had a shell
script like this :

$ cat
cd  /home/maarten/src/libreoffice/core
make clean
./ --enable-python=internal --without-system-libs
gb_GCOV=YES verbose=t make --output-sync=target

and I then ran

git bisect start <failing commit> <passing commit>
git bisect run

- Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the LibreOffice mailing list