Because race conditions are intermittent, they do not manifest themselves every time you do the build. In fact, most times the build will complete without problems even though the potential race condition exists. Thus, once the error surfaces, you need a way to reproduce it.
In this example, compiling the "neard" package is causing
the problem.
So the first thing to do is build "neard" locally.
Before you start the build, set the
PARALLEL_MAKE
variable in your local.conf
file to
a high number (e.g. "-j 20").
Using a high value for PARALLEL_MAKE
increases the chances of the race condition showing up:
$ bitbake neard
Once the local build for "neard" completes, start a
devshell
build:
$ bitbake neard -c devshell
For information on how to use a
devshell
, see the
"Using a Development Shell"
section.
In the devshell
, do the following:
$ make clean $ make tools/snep-send.o
The devshell
commands cause the failure
to clearly be visible.
In this case, a missing dependency exists for the "neard"
Makefile target.
Here is some abbreviated, sample output with the
missing dependency clearly visible at the end:
i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/...... . . . tools/snep-send.c In file included from tools/snep-send.c:16:0: tools/../src/near.h:41:23: fatal error: near/dbus.h: No such file or directory #include <near/dbus.h> ^ compilation terminated. make: *** [tools/snep-send.o] Error 1 $