Cannot compile with `-ftest-coverage`
Closed this issue · 4 comments
Mech0n commented
Cannot compile with -ftest-coverage
CC="gcc -fprofile-arcs -ftest-coverage" CXX="g++ -fprofile-arcs -ftest-coverage" cmake ..
make
stuck at building src/CMakeFiles/cmark_static.dir/scanners.c.o
[ 2%] Building C object src/CMakeFiles/cmark_static.dir/scanners.c.o
jgm commented
I can't reproduce this. It builds fine for me with this command.
(Is there something unusual about your system, e.g. low memory?)
Mech0n commented
I have enough memory.
and this is my gcc version, i installed two gcc:
gcc (Ubuntu 7.5.0-6ubuntu2) 7.5.0
gcc-8 (Ubuntu 8.4.0-3ubuntu2) 8.4.0
➜ ~ gcov --version
gcov (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
nwellnhof commented
Probably a GCC bug, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66209 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64928
Mech0n commented
thx @nwellnhof , I build a gcc 12, and build cmark success.