My mail about having failed to generae LLVM project files?


Sorry to be sending another email about the same thing, but I really need some help on this. I tried to use CMake 3.13.0 to generate VS2017 project files for LLVM, after checking out what I wanted to build from the trunk using SVN, but I couldn’t generate any project files. I’m attaching CMakeError.log and CMakeOutput.log to this message.

I checked out LLVM, Clang, Extra Clang Tools, LLD, Polly Loop Optimizer, Compiler-RT, Libomp, libcxx and libcxxabi.

CMakeError.log (589 KB)

CMakeOutput.log (214 KB)

I generally find that the most useful thing to debug cmake failures is the stdout/stderr output from cmake and the options passed to the cmake invocation itself.

For example:

cmake -G Ninja -DLLVM_ENABLE_PROJECTS=“clang;lld;compiler-rt” 2>&1 | tee output.log

… note that this works on bash and bash-like shells but will not work on the CMD shell. I don’t know an equivalent for that shell, either. Maybe cmake ... > out.log 2>&1 will work there.

In general, the most common things to fail in my experience are the feature tests for the host compiler+toolchain. CMake usually emits a reasonably clear failure message. You may need to scroll back to see it because sometimes it emits so much after the critical failure that you miss it. That’s also why those redirects are handy. If that message from cmake is not explicit enough about the failure, only then do I resort to digging through the CMakeError.log / CMakeOutput.log. Without knowing which tests “should” fail, it’s not obvious which parts of CMakeError.log to care about.