[llvm-dev] Problem of building llvm/clang using CMake

Jeffrey Tan via llvm-dev llvm-dev at lists.llvm.org
Sat Dec 19 20:26:22 PST 2015


I am trying to build llvm/clang on my macbook. But it always failed for me.

First, I git clone the code to /usr/local/llvm-src/ folder:
$ git clone http://llvm.org/git/llvm.git
$ cd llvm/tools
$ git clone http://llvm.org/git/clang.git
$ cd ../projects
$ git clone http://llvm.org/git/compiler-rt.git
$ cd ../tools/clang/tools
$ git clone http://llvm.org/git/clang-tools-extra.git

Then, I generate the Xcode from the /usr/local/llvm-src/build folder and
specify the target install directory of /usr/local/llvm-src/install:
cmake -G Xcode -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-src/install

Finally, I open the generated project file in Xcode, switch the schema to
"Install" and run "Build" from Product menu. But it failed in Xcode with
error below:

CMake Error at projects/compiler-rt/lib/builtins/cmake_install.cmake:31

  file INSTALL cannot find


Call Stack (most recent call first):

  projects/compiler-rt/lib/cmake_install.cmake:32 (include)

  projects/compiler-rt/cmake_install.cmake:33 (include)

  projects/cmake_install.cmake:32 (include)

  cmake_install.cmake:55 (include)

make: *** [install_buildpart_0] Error 1
Command /bin/sh failed with exit code 2

Any ideas?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151220/1325bbe6/attachment.html>

More information about the llvm-dev mailing list