I managed to get Ceph built this afternoon using the include-what-you-use tool that attempts to optimize #includes. The results are in the gist below. There is a lot of noise... https://gist.github.com/noahdesu/92e36c85658d29d4a45542e86127915f ... but sifting through, there seems to be some good stuff. Here is an example where it notices that only a forward declaration is needed for bufferlist: /home/nwatkins/src/ceph-iwyu/src/common/DecayCounter.h should add these lines: #include <string> // for operator<< #include "include/buffer_fwd.h" // for bufferlist namespace ceph { class Formatter; } /home/nwatkins/src/ceph-iwyu/src/common/DecayCounter.h should remove these lines: - #include "common/Formatter.h" // lines 19-19 - #include "include/buffer.h" // lines 18-18