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

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


Hi,


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

> 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: https://lwn.net/Articles/317154/
>
> HTH,
>
> -- Thorsten
>



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



1.)
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 ?




2.)

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
./autogen.sh --enable-python=internal --without-system-libs
--without-system-headers
verbose=t make --output-sync=target -C external Module_liborcus

I get a build error :

/bin/sh: line 1:
/home/maarten/src/libreoffice/core/workdir/LinkTarget/Executable/concat-deps:
No such file or directory
make: ***
[/home/maarten/src/libreoffice/core/solenv/gbuild/LinkTarget.mk:842:
/home/maarten/src/libreoffice/core/workdir/LinkTarget/StaticLibrary/libboost_filesystem.a]
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 ?



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

$ cat foo.sh
#!/bin/sh
cd  /home/maarten/src/libreoffice/core
make clean
./autogen.sh --enable-python=internal --without-system-libs
--without-system-headers
gb_GCOV=YES verbose=t make --output-sync=target

and I then ran

git bisect start <failing commit> <passing commit>
git bisect run foo.sh




- Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220515/ca72559f/attachment.htm>


More information about the LibreOffice mailing list