[LLVMdev] Can't build clang 3.4.2

Justin Bogner mail at justinbogner.com
Sun Aug 3 15:30:17 PDT 2014


"Rodney M. Bates" <rodney_bates at lcwb.coop> writes:
> I can build llvm 3.4.2 fine, using instructions in GettingStarted.html,
> and making assumptions to account for my using tar files instead of svn.
> Although I had downloaded and extracted both llvm-3.4.2.src.tar.gz and
> cfe-3.4.2.src.tar.gz, giving directories llvm-3.4.2.src and cfe-3.4.2.src,
> clang apparently did not get built.  The only files with names starting
> with "clang" anywhere inside my llvm directory are Ascii text, C source,
> or directories.
>
> If I run ../cfe-3.4.2.src/make, (in my "build" directory, as suggested), I see:
>
> Makefile:42: ../../Makefile.common: No such file or directory
> make: *** No rule to make target `../../Makefile.common'.  Stop.
>
> There is no file by this name anywhere inside cfe-3.4.2.src, nor is there
> one named configure either.  Merging the files in llvm-3.4.2.src and
> cfe-3.4.2.src
> is obviously wrong, since they contain various same-named but different files.
>
> GettingStarted.html, get_started.html, the llvm FAQ, two README.txt
> and one INSTALL.txt
> have not helped me.

The build system wants the clang directory to be nested inside the llvm
directory (under tools). I think the SVN instructions make this fairly
clear, since they tell you where to cd before checking out clang, but I
guess it's not obvious how that translates to source releases.

Given your llvm directory, you need clang to be found under
<llvm-dir>/tools/clang, so you can either extract cfe-3.4.2.src in
tools/ and rename it to clang, or make a symlink to the cfe directory
beside the llvm one (ie, tools/clang -> ../../../cfe-3.4.2.src)

Hope that helps!



More information about the llvm-dev mailing list