4

There are many similar named packages for libasan (the address sanitizer for gcc and clang):

$ apt-cache search libasan | grep -v dbg | grep -v cross
libasan2 - AddressSanitizer -- a fast memory error detector
libasan3 - AddressSanitizer -- a fast memory error detector
libasan4 - AddressSanitizer -- a fast memory error detector
libasan0 - AddressSanitizer -- a fast memory error detector

(Output is from Ubuntu 17.10. Ubuntu 18.04 also has libasan5.)

  • What is the difference between these packages?
  • Which one should I install?
  • 1
    Have you tried to read the info of those packages?You can check using this apt-cahe show packagename or apt-cache policy packagename – bhordupur Apr 11 '18 at 13:56
  • @bhordupur Thanks, as far as I understand, the difference is that each package corresponds to a different gcc version. libasan0 is for the oldest gcc, and each newer gcc receives a new libasan package. To answer my question, I assume you should install the package that matches the version of gcc that was used to compile the program. – Philipp Claßen Apr 11 '18 at 14:52
  • 1
    Yes that's always the case and if package has the dependency on any of those then package should recommend/throw error that particular version of gcc for example. Well, you have answered your own question in the comment. And it's handy to check the improvement from libasan0 to libasan5. In general we always let the system decide to install the suitable and compatible one unless we specify the particular version with the package itself. – bhordupur Apr 11 '18 at 15:11
2

What is the difference between these packages?

The different packages are for different versions of gcc:

  • libasan0: gcc-4.8
  • libasan2: gcc-5
  • libasan3: gcc-6
  • libasan4: gcc-7
  • libasan5: gcc-8

To find out that information, you can look at the packages details: apt-cache show libsan0

Which one should I install?

The version that matches the gcc version that you used to compile the program.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.