AArch64 build error

Hi,

I'm getting a "random" build failure related to AArch64 when building with cmake. The build is running with -j32 so it seems that there is some dependency issue that causes the build to fail when things build in a certain order.

Is anyone else seeing this problem?

paul

3008 make[2]: *** No rule to make target `lib/Target/AArch64/AArch64GenDAGISel.inc', needed by `lib/Target/AArch64/Utils/CMakeFiles/LLVMAArch64Utils.dir/AArch64BaseInfo.cpp.o'. Stop.
3009 make[2]: Leaving directory `/home/pulseagent/.pulse2-agent/data/agents/109155/recipes/791203/base/build-cmake'
3010 make[1]: *** [lib/Target/AArch64/Utils/CMakeFiles/LLVMAArch64Utils.dir/all] Error 2
3011 make[1]: /home/pulseagent/local/bin/cmake -E cmake_progress_report /home/pulseagent/.pulse2-agent/data/agents/109155/recipes/791203/base/build-cmake/CMakeFiles
3012 *** Waiting for unfinished jobs....

Hi Paul,

I'm getting a "random" build failure related to AArch64 when building with cmake.
The build is running with -j32 so it seems that there is some dependency issue
that causes the build to fail when things build in a certain order.

3008 make[2]: *** No rule to make target `lib/Target/AArch64/AArch64GenDAGISel.inc', needed by

Hmm. That file's generated by TableGen (via some kind of custom make
magic) and included by the "regular" sources, so it's entirely
possible there's a race hiding. I always thought all TableGen commands
were run before the main sources got compiled, but at 32 threads
perhaps that doesn't matter so much.

Has this just started since AArch64 was added, or have you only
recently started building at -j32? As far as I can see AArch64 is
unexceptional in its dependencies, except for being lexicographically
the first target. I'd be interested in your results if AArch64 was
disabled.

There's clearly some issue though. I've only got 4 cores (+ 4 faked)
here so I'm not optimistic about reproducing any races you're seeing,
though I'll keep trying periodic builds. How many cores do you have
and how frequently does this seem to occur? Your host compiler and
configure command-line could be useful for controlling the environment
too.

Tim.

Hi Tim,

Hi Paul,

I'm getting a "random" build failure related to AArch64 when building
with cmake.
The build is running with -j32 so it seems that there is some
dependency issue
that causes the build to fail when things build in a certain order.

3008 make[2]: *** No rule to make target
`lib/Target/AArch64/AArch64GenDAGISel.inc', needed by

Hmm. That file's generated by TableGen (via some kind of custom make
magic) and included by the "regular" sources, so it's entirely
possible there's a race hiding. I always thought all TableGen commands
were run before the main sources got compiled, but at 32 threads
perhaps that doesn't matter so much.

Has this just started since AArch64 was added, or have you only
recently started building at -j32? As far as I can see AArch64 is
unexceptional in its dependencies, except for being lexicographically
the first target. I'd be interested in your results if AArch64 was
disabled.

I can't say for sure if this is a new problem but we've been building on
this machine for a few weeks now.

I commented out AArch64 from LLVM_ALL_TARGETS and rebuilt but I can't
reproduce the error in this case--it appears to be AArch64 specific.

One thing I forgot to mention is that our build machines use ccache. When
I don't use ccache I can't reproduce the error either. However, I don't
think ccache is the problem it just makes the race easier to reproduce.

There's clearly some issue though. I've only got 4 cores (+ 4 faked)
here so I'm not optimistic about reproducing any races you're seeing,
though I'll keep trying periodic builds. How many cores do you have
and how frequently does this seem to occur? Your host compiler and
configure command-line could be useful for controlling the environment
too.

The machine has 16 physical cores each hyper-threaded. I'm just using gcc
4.7.2 from Ubuntu 12.10.

I can reproduce this with the following:

$cmake -DCMAKE_CXX_COMPILER="ccache" -DCMAKE_CXX_COMPILER_ARG1="c++"
../llvm/
$make -j32
$make clean
$make -j32

The second make will fail with the error I pasted before.

paul

Hi Paul,

Thanks for the descriptions, it helped a lot and I did manage to
reproduce and fix the issue. Anything after r182190 should be good;
let me know if you have any more problems.

Cheers.

Tim.