Thanks.
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. 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 ?). PS: I also added '--with-parallelism=1' to ./autogen.sh, to make the output of 'make' a little clearer and easier to read. Sincerely, Maarten Making all in benchmark make[3]: Entering directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus/benchmark' /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/ liborcus-parser-0.17.la -lz -L/home/maarten/src/libreoffice/core/workdir/LinkTarget/StaticLibrary -lboost_system -lboost_iostreams -lboost_filesystem 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/liborcus-parser-0.17.so -lz -L/home/maarten/src/libreoffice/core/workdir/LinkTarget/StaticLibrary -lboost_system -lboost_iostreams -lboost_filesystem -pthread /usr/bin/ld: ../src/parser/.libs/liborcus-parser-0.17.so: undefined reference to `__gcov_init' /usr/bin/ld: ../src/parser/.libs/liborcus-parser-0.17.so: undefined reference to `__gcov_exit' /usr/bin/ld: ../src/parser/.libs/liborcus-parser-0.17.so: undefined reference to `__gcov_merge_add' collect2: error: ld returned 1 exit status make[3]: *** [Makefile:407: json-parser-test] Error 1 make[3]: Leaving directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus/benchmark' make[2]: *** [Makefile:1283: all-recursive] Error 1 make[2]: Leaving directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus' make[1]: *** [Makefile:1192: all] Error 2 make[1]: Leaving directory '/home/maarten/src/libreoffice/core/workdir/UnpackedTarball/liborcus' make: *** [/home/maarten/src/libreoffice/core/external/liborcus/ExternalProject_liborcus.mk:85: /home/maarten/src/libreoffice/core/workdir/ExternalProject/liborcus/build] Error 2 make: Leaving directory '/home/maarten/src/libreoffice/core/external' On Wed, May 11, 2022 at 7:28 PM Luboš Luňák <l.lu...@collabora.com> wrote: > On Wednesday 11 of May 2022, Maarten Hoes wrote: > > Hi, > > > > > > I'm trying to build LibreOffice on Linux (Fedora 36) with the appropriate > > flags set for 'lcov/gcov code coverage' (how many / which lines of the > > codebase get executed by running the test suite 'make check'). Normally > you > > would set the appropriate CFLAGS / LDFLAGS (-fprofile-arcs > -ftest-coverage) > > to make this work. But if I recall correctly, due to the way the build > > system works, you have to set a certain env var (gb_GCOV=YES make) on the > > commandline in order to get the appropriate flags set. The magic seems to > > be happening in lines 112-117 in > 'solenv/gbuild/platform/com_GCC_defs.mk'. > > This used to work (I wrote a shell script that automated the process back > > in 2015 or so). > > > > However, at the moment I'm getting build errors (undefined reference to > > '__gcov_init' / '__gcov_exit') that imply the flags are not being set > > (error details at bottom). So I'm guessing that either the way you are > > supposed to do this changed, or something broke the propagation of the > > flags or something ? I ran autogen the following way : > > > > ./autogen.sh --enable-python=internal --without-system-libs > > --without-system-headers > > > > 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. > > You can pass verbose=t to make to see all the commands that are run when > building. And you can do things like 'make -C external Module_skia' to > limit > what make runs. That way you can verify if the flags are used. > > If the flags really are not used, then grep the relevant makefiles for > ldflags (including solenv/gbuild), and try editing them to see where it > needs > to be added. > > -- > Luboš Luňák > l.lu...@collabora.com >