3

I'm trying to build cling on Windows7 following the instructions here:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=[Install Path] ..\src
cmake --build . --config [Release/Debug] --target cling

I notice that the compiler cmake is using being Visual Studio 12 2013 (either with cmake-gui or in cmdline), while I get the following error (full traceback is here):

Constructing LLVMBuild project information
CMake Error: File /cygdrive/e/ABOUT-C++/cling/src/LLVMBuild.txt does not exist.
CMake Error at E:/ABOUT-C++/cling/build/LLVMBuild.cmake:28 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:431 (include)


CMake Error: File /cygdrive/e/ABOUT-C++/cling/src/bindings/LLVMBuild.txt does not exist.
CMake Error at E:/ABOUT-C++/cling/build/LLVMBuild.cmake:30 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:431 (include)

Why is the path prefixed with /cygdrive/e/... but not E:/...? Are those valid paths? (The missing files cmake mention DO exist in the corresponding folder!)

Or is that because llvm / clang / cling should be built with cygwin on windows, while the compiler vc12 I'm using by default is incorrect?

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108

1 Answers1

6

My bet is that your problem lies in your python. Judging on D:/cygwin/bin/python2.7.exe it seems that you use special version of python that prepends /cygdrive/ all over the place.

Try using official binary package for Windows.

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • Exactly! How do you usually tell it by experience? Checking nearest line above where `CMake Error` occurs? – zhangxaochen Sep 19 '15 at 03:39
  • I've cloned CERN's fork of llvm, `git diff`ed `master` branch with `cling-patches` and found that there were no changes to `LLVMBuild.txt` files, `utils/llvm-build` tool and its CMake wrapper. From this i concluded that the problem is with your setup, read the CMake log throughly and spotted `Found PythonInterp: D:/cygwin/bin/python2.7.exe` line. – arrowd Sep 19 '15 at 10:41
  • Is the problem solved yet? If yes, please mark the post as solution. If no, please add details. – Codeguard Sep 21 '15 at 20:38
  • @arrowd thx for your help! cmake problem finally solved, yet build clang & cling on windows is not a good idea right now... SEE: https://github.com/vgvassilev/cling/issues/73 – zhangxaochen Sep 23 '15 at 13:20