That you can’t distribute the specific compilation of publicly available knowledge is different from recompiling (even all) that same knowledge into your own work.
It’s why you can publish and have copyright over a book of quotes from dead people, but no copyright over the individual quotes themselves (which are in the public domain).
in the usa (and i think in berne convention countries in general) some quotes are long enough to be copyrightable, and the copyright can last decades after the author's death
SDK headers and linker symbols for core system libraries would enjoy very strong fair use protections, though. You can thank Oracle and Google for that.