trouble with cmake+ninja

Hi,

I was trying Ninja to build the LLVM sources. I am using cmake version
2.8.8, latest ninja from git and latest LLVM from git.

Here’s what I tried:

$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=…
/path/to/src
$ ninja
$ ninja install

The installation aborted with the message below:

CMake Error at utils/TableGen/cmake_install.cmake:36 (FILE):
file INSTALL cannot find
“/local/home/ssahasra/obj/llvm/utils/TableGen/CMakeFiles/CMakeRelink.dir/llvm-tblgen”.
Call Stack (most recent call first):
cmake_install.cmake:47 (INCLUDE)

ninja: build stopped: subcommand failed.

Is there anything wrong with my setup? I tried to comment out the
offending lines in utils/TableGen/cmake_install.cmake, just to see
what happens. But the error simply moved to another missing
CMakeRelink.dir. Also noticed that an equivalent “make install” using
cmake-generated makefiles first creates CMakeRelink.dir/llvm-tblgen
and many such binaries and shared objects, but apparently “ninja
install” is not doing that.

Sameer.

"Sahasrabuddhe, Sameer" <Sameer.Sahasrabuddhe@amd.com> writes:

I was trying Ninja to build the LLVM sources. I am using cmake version
2.8.8, latest ninja from git and latest LLVM from git.

As cmake and ninja development is not coordinated, it is not a good idea
to mix versions of them separated by several months. Nor is a good idea
to use a development version of ninja. And, finally, 2.8.8 was the first
cmake version to include ninja support (on Linux only, IIRC), so we can
expect some rough edges there.

So first thing upgrade cmake to 2.8.9. If that doesn't work, use the
latest ninja version that was officially released at the time cmake
2.8.9 was released.

[snip]

Thanks for that, Oscar. I did the most sensible thing and installed
cmake from git :wink: It all works now.

Sameer.