1

I try to install gcov to be able to generate coverage reports. I'm on machine Ubuntu 19.04 and have installed gcov-8, which is working pretty well.

The problem is (as I can understand) that lcov tries to use gcov instead gcov-8. If I install gcc-9, the gcov is going to be installed, but in this case, I'm getting version mismatch problems.

Can anyone help me to figure out what to do to?

arsdever
  • 1,111
  • 1
  • 11
  • 32

2 Answers2

0

On Ubuntu there is a standard approach using update-alternatives command

update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-8 800

Which is basically almost the same as creating a symlink from /usr/bin/gcov to /usr/bin/gcov-8, but has better maintainability

800 is just a random number, "priority" which will make sense only when you have several alternatives

The Godfather
  • 4,235
  • 4
  • 39
  • 61
-1

The problem resolved. Just removed and reinstalled gcc.

arsdever
  • 1,111
  • 1
  • 11
  • 32