0

like this, when I use cmd like follow:

lcov -c --rc lcov_branch_coverage=1 -d . -b . -o test.info

it will

show GCOV failed error

(click on image for complete path)

genfino: ERROR: GCOV failed for /root/.../d3a CoreCodeunitrpcommondrvd3amakeimptgunitrpdpf.dir/root/One Track/CodeCode/unitrp/common/drv/d3a/src/d3a cam.cpp.gcdata!

My gcov version is 4.7 and my gcc version is 7.1.1

Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
陈玉杰
  • 1
  • 1
  • The `gcov` and `gcc` version should match otherwise the coverage data cannot be extracted cleanly. Which seems to be the case here. Can you provide your OS and development environment details to have a better educated guess? – AmeyaVS Aug 06 '19 at 06:47
  • my OS is Suse Linux version 4.9.125-linuxkit (root@659b6d51c354) (gcc version 6.4.0 (Alpine 6.4.0) ) – 陈玉杰 Aug 06 '19 at 06:52
  • It seems there are multiple version of the GCC compiler toolchain installed on the system. In your questions `gcc:7.1.1` with `gcov:4.7` and in your comments `gcc:6.4.0` version. Probably check where all the gcov binaries are installed on your system and find the correct one which corresponds to the one used to build the code with coverage compilation flags. – AmeyaVS Aug 06 '19 at 06:57
  • my usr/bin like this ; lrwxrwxrwx 1 root root 5 Jul 1 12:36 cc -> gcc-7 ; lrwxrwxrwx 1 root root 5 Jul 1 12:36 gcc -> gcc-7; -rwxr-xr-x 1 root root 755720 Apr 30 13:19 gcc-4.8; -rwxr-xr-x 1 root root 1014264 Jul 7 2017 gcc-7; – 陈玉杰 Aug 06 '19 at 07:34
  • As a side note, your development should not be done as `root`. – Alexis Wilke Aug 18 '19 at 20:39

0 Answers0