[llvm-dev] [cfe-dev] ../../../Makefile.common:60:../../../Makefile.config:don't have that file or directory
Csaba Raduly via llvm-dev
llvm-dev at lists.llvm.org
Wed Oct 14 08:06:51 PDT 2015
On Wed, Oct 14, 2015 at 1:55 PM, Q Z via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> I installed LLVM3.7.0 according to the LLVM document. I can use
> "clang","LLVM-dis"commands ,and so on.
> but when I execute commad "make" at llvm/lib/Transform/Hello directory, the
> error is :
> ../../../Makefile.common:60:../../../Makefile.config:don't have that file or
> ../../../Makefile.common:68:../../../Makefile.rules:don't have that file or
> can anyone help me?
You can't build LLVM/clang inside its source tree like that. The
makefile in Hello
includes Makefile.common, which includes Makefile.config;
that file doesn't exist inside the "llvm" tree.
To build clang, you need to create a separate directory where to build.
For example, in the llvm directory:
../llvm/configure '--enable-optimized' '--enable-assertions'
This will create Makefile.config (among other things) and shadow the
directories in llvm under build,
so there will be a build/lib/Transforms/Hello directory. You can
run make there.
Note: This might not work if you only installed binaries and headers for LLVM.
I have all the sources from LLVM, and clang insde it.
Note: You might want to use cmake instead of autoconf.
cmake also needs a separate build directory.
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds
More information about the llvm-dev