Q Z via llvm-dev
2015-Oct-14 11:55 UTC
[llvm-dev] ../../../Makefile.common:60:../../../Makefile.config:don't have that file or directory
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 directory ../../../Makefile.common:68:../../../Makefile.rules:don't have that file or directory why? can anyone help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151014/6161a3b5/attachment.html>
Tim Northover via llvm-dev
2015-Oct-14 13:57 UTC
[llvm-dev] [cfe-dev] ../../../Makefile.common:60:../../../Makefile.config:don't have that file or directory
On 14 October 2015 at 04:55, Q Z via cfe-dev <cfe-dev at lists.llvm.org> wrote:> why? can anyone help me?LLVM's Makefiles aren't meant to be used in isolation. You'll probably find LLVMHello.so was already built and installed as part of the normal build process. If you change the source, you'd rebuild it by running make from the overall build directory. Alternatively, for passes you often only needusually only need to use something as simple as"clang `llvm-config --cxxflags --libs --ldflags` -fno-rtti llvm/lib/Transforms/Hello/Hello.cpp -shared -o Hello.so". Cheers. Tim.
Csaba Raduly via llvm-dev
2015-Oct-14 15:06 UTC
[llvm-dev] [cfe-dev] ../../../Makefile.common:60:../../../Makefile.config:don't have that file or directory
Hi, 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 > directory > ../../../Makefile.common:68:../../../Makefile.rules:don't have that file or > directory > > why? > 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: mkdir ../build cd ../build ../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. Csaba -- 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
Chris Bieneman via llvm-dev
2015-Oct-15 16:46 UTC
[llvm-dev] [cfe-dev] ../../../Makefile.common:60:../../../Makefile.config:don't have that file or directory
There is a quick summary of the recommended way to build LLVM using CMake here: http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary <http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary> The autoconf/makefile-based build system is not recommended for people new to the community as we are working on phasing it out. -Chris> On Oct 14, 2015, at 8:06 AM, Csaba Raduly via cfe-dev <cfe-dev at lists.llvm.org> wrote: > > Hi, > > 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 >> directory >> ../../../Makefile.common:68:../../../Makefile.rules:don't have that file or >> directory >> >> why? >> 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: > > mkdir ../build > cd ../build > ../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. > > Csaba > -- > 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 > _______________________________________________ > cfe-dev mailing list > cfe-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151015/e525bb89/attachment.html>