[make] fatal error: 'LibraryDependencies.inc' file not found

I'm trying to build llvm from svn.

I ran ./configure with --enable-debug-runtime, then make -j4, before I
got the following error:

llvm[1]: Building llvm-config script.
make[1]: Leaving directory `/home/vk/opt/llvm/tools/llvm-config'
make[1]: Entering directory `/home/vk/opt/llvm/tools/llvm-config-2'
llvm[1]: Constructing LLVMBuild project information.
Traceback (most recent call last):
  File "/home/vk/opt/llvm/utils/llvm-build/llvm-build", line 3, in <module>
    import llvmbuild
  File "/home/vk/opt/llvm/utils/llvm-build/llvmbuild/__init__.py", line
1, in <module>
    from main import main
ImportError: No module named main
llvm[1]: Compiling llvm-config.cpp for Debug+Asserts build
llvm-config.cpp:46:10: fatal error: 'LibraryDependencies.inc' file not found
#include "LibraryDependencies.inc"
1 error generated.
make[1]: ***
[/home/vk/opt/llvm/tools/llvm-config-2/Debug+Asserts/llvm-config.o] Error 1
make[1]: Leaving directory `/home/vk/opt/llvm/tools/llvm-config-2'
make: *** [all] Error 1

It looks like some other poor soul has had this issue:

How do I go about fixing this issue?


* I've heard there have been some changes to llvm's build system
recently. I looked through a few month's worth of archives to see if
anyone else has had this problem, but I may have missed something.

llvm's build system assumes that PYTHON_EXECUTABLE points to a 2.x
interpreter. On Arch Linux, at least, it points to a 3.x interpreter.

I modified CMakeLists.txt to use "python2" if a 3.x interpreter is detected.

If "python" points to a 3.x interpreter and "python2" doesn't exist,
this workaround will break loudly.


python2.patch (508 Bytes)