[LLVMdev] Build glitch

Csaba Raduly rcsaba at gmail.com
Mon Oct 3 00:49:28 PDT 2011

Hi all,
there seems to be some some missing dependency in the LLVM build system:

$ make -j8 happiness
Updated to revision 140992.
llvm[2]: ======= Finished Linking Release+Asserts Executable
FileUpdate (without symbols)
make[2]: Leaving directory `/home/ecsardu/LLVM/build-tcclab1/utils/FileUpdate'
llvm[2]: Compiling ClangAttrEmitter.cpp for Release+Asserts build
llvm[2]: ======= Finished Linking Release+Asserts Executable not
(without symbols)
make[2]: Leaving directory `/home/ecsardu/LLVM/build-tcclab1/utils/not'
llvm[2]: Compiling ClangDiagnosticsEmitter.cpp for Release+Asserts build
... 27 lines of "Compiling" omitted ...
llvm[2]: Compiling X86DisassemblerTables.cpp for Release+Asserts build
make[2]: *** No rule to make target
needed by `/home/ecsardu/LLVM/build-tcclab1/Release+Asserts/bin/tblgen'.
make[2]: *** Waiting for unfinished jobs....
llvm[2]: Compiling X86RecognizableInstr.cpp for Release+Asserts build
make[2]: Leaving directory `/home/ecsardu/LLVM/build-tcclab1/utils/TableGen'
make[1]: *** [TableGen/.makeall] Error 2
make[1]: Leaving directory `/home/ecsardu/LLVM/build-tcclab1/utils'

Running the make command again (with j8) proceeds to completion.

This kind of behavior (parallel make fails with "No rule to make ..",
second invocation succeeds) usually means that there is an implicit
dependency which is unknown to make; the missing target is created as
a side-effect but is not explicitly mentioned as the target of a rule
(e.g. is built in a subdir with a rule like

	cd subdir && make

or a side-effect of a phony target).

Ordinary make -j1 always works because the rule with the side-effect
runs before the rule which needs its output; but parallel make might
start the "consumer" rule before the "supplier" had the chance to

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 mailing list