commonmark/cmark

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.

thx @nwellnhof , I build a gcc 12, and build cmark success.