How to install gcov that is compatible with gcc version 10.1?

I'm trying to use CLions interface to gcov but I'm not using the default g++ compiler (for Ubuntu 18.04). Therefore my version of gcov (7.5) is incompatible with my compiler (10.1).

How can I install gcov that works with gcc / g++ 10.1 ?

I've tried:

  • sudo apt install gcov
  • sudo apt install gcov-10
  • sudo apt install gcov-dev
1

2 Answers

I had a similar issue and I found a way to update gcov between gcc 7 and 8 which needed a gcov and gcovr update as well as different versions of python (python 3). see more details here: how-to-update-install-gcovr-to-match-my-updated-compiler-gcc

Hopefully this answers your question if you have not answered it yourself after 6 months :)

1
 sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install -y gcc-10 g++-10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like