<div dir="ltr"><div dir="ltr">Thanks.<br><div><br></div><div><br></div>I just noticed: reading back the error more carefully, I noticed it's clang that generated the error, even though I didn't specifically tried to compile with clang. (I had both clang and gcc installed). I uninstalled clang and only left gcc to see if that made any difference, and I still had a similar build error (although at another point in the build: 'skia' seems to build now). Error details listed below.<br><br>The build now fails at building 'liborcus', and using 'verbose=t' shows the flags are indeed missing from the commandline. I tried adding the flags to 'core/workdir/UnpackedTarball/liborcus/src/Makefile' because they were not there, and then running 'make -C external Module_liborcus', but the modifications are lost/overwritten during the build (presumably because './configure' is run again, re-generating the Makefile ?). <br><br><br>PS:<br>I also added '--with-parallelism=1' to ./autogen.sh, to make the output of 'make' a little clearer and easier to read.<br><div><br></div><div><br></div>Sincerely,<br><br><br>Maarten<br><br><br><br>Making all in benchmark<br>make[3]: Entering directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus/benchmark'<br>/bin/sh ../libtool  --tag=CXX   --mode=link g++ -std=c++17  -fvisibility=hidden  -fvisibility=hidden -fvisibility-inlines-hidden -std=c++17 -DBOOST_SYSTEM_NO_DEPRECATED -O2  -I/home/maarten/src/libreoffice/core/external/boost/include -I/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/boost -Wall -pthread -Wshadow -DSIZEOF_VOID_P=8 -O2 -D__ORCUS_ODS -D__ORCUS_XLSX -D__ORCUS_XLS_XML -D__ORCUS_GNUMERIC    -I/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/mdds/include -D__ORCUS_PYTHON_CSV  -Wl,-O1 -Wl,-S -Wl,-z,origin -Wl,-rpath,\$ORIGIN  -o json-parser-test json_parser_test-json_parser.o ../src/parser/<a href="http://liborcus-parser-0.17.la" target="_blank">liborcus-parser-0.17.la</a> -lz -L/home/maarten/src/libreoffice/core/workdir/LinkTarget/StaticLibrary -lboost_system -lboost_iostreams -lboost_filesystem<br>libtool: link: LD_RUN_PATH="/usr/local/lib:" g++ -std=c++17 -fvisibility=hidden -fvisibility=hidden -fvisibility-inlines-hidden -std=c++17 -DBOOST_SYSTEM_NO_DEPRECATED -O2 -I/home/maarten/src/libreoffice/core/external/boost/include -I/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/boost -Wall -pthread -Wshadow -DSIZEOF_VOID_P=8 -O2 -D__ORCUS_ODS -D__ORCUS_XLSX -D__ORCUS_XLS_XML -D__ORCUS_GNUMERIC -I/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/mdds/include -D__ORCUS_PYTHON_CSV -Wl,-O1 -Wl,-S -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -o .libs/json-parser-test json_parser_test-json_parser.o  ../src/parser/.libs/<a href="http://liborcus-parser-0.17.so" target="_blank">liborcus-parser-0.17.so</a> -lz -L/home/maarten/src/libreoffice/core/workdir/LinkTarget/StaticLibrary -lboost_system -lboost_iostreams -lboost_filesystem -pthread<br>/usr/bin/ld: ../src/parser/.libs/<a href="http://liborcus-parser-0.17.so" target="_blank">liborcus-parser-0.17.so</a>: undefined reference to `__gcov_init'<br>/usr/bin/ld: ../src/parser/.libs/<a href="http://liborcus-parser-0.17.so" target="_blank">liborcus-parser-0.17.so</a>: undefined reference to `__gcov_exit'<br>/usr/bin/ld: ../src/parser/.libs/<a href="http://liborcus-parser-0.17.so" target="_blank">liborcus-parser-0.17.so</a>: undefined reference to `__gcov_merge_add'<br>collect2: error: ld returned 1 exit status<br>make[3]: *** [Makefile:407: json-parser-test] Error 1<br>make[3]: Leaving directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus/benchmark'<br>make[2]: *** [Makefile:1283: all-recursive] Error 1<br>make[2]: Leaving directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus'<br>make[1]: *** [Makefile:1192: all] Error 2<br>make[1]: Leaving directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus'<br>make: *** [/home/maarten/src/libreoffice/core/external/liborcus/ExternalProject_liborcus.mk:85: /home/maarten/src/libreoffice/core/workdir/ExternalProject/liborcus/build] Error 2<br>make: Leaving directory '/home/maarten/src/libreoffice/core/external'<br><br><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 11, 2022 at 7:28 PM Luboš Luňák <<a href="mailto:l.lunak@collabora.com" target="_blank">l.lunak@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wednesday 11 of May 2022, Maarten Hoes wrote:<br>
> Hi,<br>
><br>
><br>
> I'm trying to build LibreOffice on Linux (Fedora 36) with the appropriate<br>
> flags set for 'lcov/gcov code coverage' (how many / which lines of the<br>
> codebase get executed by running the test suite 'make check'). Normally you<br>
> would set the appropriate CFLAGS / LDFLAGS (-fprofile-arcs -ftest-coverage)<br>
> to make this work. But if I recall correctly, due to the way the build<br>
> system works, you have to set a certain env var (gb_GCOV=YES make) on the<br>
> commandline in order to get the appropriate flags set. The magic seems to<br>
> be happening in lines 112-117 in 'solenv/gbuild/platform/com_GCC_defs.mk'.<br>
> This used to work (I wrote a shell script that automated the process back<br>
> in 2015 or so).<br>
><br>
> However, at the moment I'm getting build errors (undefined reference to<br>
> '__gcov_init' / '__gcov_exit') that imply the flags are not being set<br>
> (error details at bottom). So I'm guessing that either the way you are<br>
> supposed to do this changed, or something broke the propagation of the<br>
> flags or something ? I ran autogen the following way :<br>
><br>
> ./autogen.sh --enable-python=internal --without-system-libs<br>
> --without-system-headers<br>
><br>
> I personally do not know enough about the build system to figure out how to<br>
> correct this. Any and all help in trying to make this work again would be<br>
> appreciated.<br>
<br>
 You can pass verbose=t to make to see all the commands that are run when <br>
building. And you can do things like 'make -C external Module_skia' to limit <br>
what make runs. That way you can verify if the flags are used.<br>
<br>
 If the flags really are not used, then grep the relevant makefiles for <br>
ldflags (including solenv/gbuild), and try editing them to see where it needs <br>
to be added.<br>
<br>
-- <br>
 Luboš Luňák<br>
 <a href="mailto:l.lunak@collabora.com" target="_blank">l.lunak@collabora.com</a><br>
</blockquote></div></div>