0

Libraries compiled using different compiler version might be binary incompatible (Can you mix c++ compiled with different versions of the same compiler).

Is it guaranteed that libraries installed by the OS (e.g. using apt-get) are compiled using the same compiler (thus they are binary compatible)?

user2449761
  • 1,169
  • 13
  • 25
  • Certainly not, since you can register all sorts of repositories to be used by the `apt` tool suite. – arkascha Oct 26 '18 at 13:14
  • how about official repo? – user2449761 Oct 26 '18 at 13:15
  • Probably fine _in general_, but you cannot rely on that, there is no guarantee. At least there is one of the last and annoying gaps in repository based software deployment: when new versions of packages are build for those repositories there typically is a gap when some packages have already been build and published, while others are still queued. That typically happens for bigger upgrades. During such periods you very well can have some packages depend on others that are not ABI compatible, _unless_ all dependencies are painfully correct marked which typically is not the case. – arkascha Oct 26 '18 at 15:31

1 Answers1

0

Is it guaranteed that libraries installed by the OS (e.g. using apt-get) are compiled using the same compiler (thus they are binary compatible)?

Not at all.

You can install GCC-5.5, GCC-6.4, GCC-7.3 and GCC-8.2 on the same system.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362