Eugene.Zelenko added a comment. Looks like CMake is not checking for external dependencies properly. I got build error on RHEL 6 because of missing perfmon/perf_event.h. Most likely perfmon version is too old on RHEL6. Repository: rL LLVM https://reviews.llvm.org/D44519