Even to this day, it's not uncommon to find libraries that won't compile with one of GCC, clang, etc. or even the same compiler but Linux vs MacOS.
It was even worse in ye olde times before package managers, I'm assuming.
EDIT: I forgot to mention that System V and BSD are two of the major families.
Both influenced Unix-like OSes far and wide, such as SysV style init scripts in certain Linux distros, MacOS being derived partly from BSD, Solaris being a continuation of SysV IIRC, and more.
There was a rough standardization in where certain things could be found, command line flags, etc.