From 7755de2532d76ba3998f52a76a986a581d97c852 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Thu, 12 Jun 2014 18:02:32 +0300 Subject: dev-manual: Second draft of make race section. Fixes [YOCTO #6390] Edits to the "Debugging Parallel Make Races" section. Changes originating from trying the procedure. (From yocto-docs rev: 537f5bd8918450e30ea87465025f0069232cb229) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 55 ++++++++++++++++++---- 1 file changed, 45 insertions(+), 10 deletions(-) (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 70cf6adf33..a507dc0efc 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -7328,7 +7328,7 @@ Gateways via their Web Interfaces" And, during the build, BitBake runs into problems and creates the following output. - This example log file has longer lines artifically + This example log file has longer lines artificially broken to make the listing easier to read. If you examine the output or the log file, you see the @@ -7422,7 +7422,7 @@ Gateways via their Web Interfaces" Before you start the build, set the PARALLEL_MAKE variable in your local.conf file to - a high number (e.g. 20). + a high number (e.g. "-j 20"). Using a high value for PARALLEL_MAKE increases the chances of the race condition showing up: @@ -7452,6 +7452,22 @@ Gateways via their Web Interfaces" 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 + $ + @@ -7466,7 +7482,9 @@ Gateways via their Web Interfaces" You can use Quilt to create the patch: $ quilt new parallelmake.patch + Patch patches/parallelmake.patch is now on top $ quilt add Makefile.am + File Makefile.am added to patch patches/parallelmake.patch For more information on using Quilt, see the "Using a Quilt Workflow" @@ -7477,9 +7495,11 @@ Gateways via their Web Interfaces" At this point you need to make the edits to Makefile.am to add the missing dependency. - For our example, you have to add the a - "tools/snep-send.$(OBJEXT): include/near/dbus.h" - line. + For our example, you have to add the following line + to the file: + + tools/snep-send.$(OBJEXT): include/near/dbus.h + @@ -7487,17 +7507,31 @@ Gateways via their Web Interfaces" refresh command to create the patch: $ quilt refresh + Refreshed patch patches/parallelmake.patch Once the patch file exists, you need to add it back to the - originating recipe folder: + originating recipe folder. + Here is an example assuming a top-level + Source Directory + named poky: - $ cp patches/parallemake.patch <location-of-neard-0.14-recipe-folder> + $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard The final thing you need to do to implement the fix in the - build is to add the patch to the + build is to update the "neard" recipe (i.e. + neard-0.14.bb so that the SRC_URI - statement in the "neard" recipe - (neard-0.14.bb). + statement includes the patch file. + The recipe file is in the folder above the patch. + Here is what the edited SRC_URI + statement would look like: + + SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \ + file://neard.in \ + file://neard.service.in \ + file://parallelmake.patch \ + " + @@ -7526,6 +7560,7 @@ Gateways via their Web Interfaces" Now you can open up a devshell again and repeat the clean and make operations as follows: + $ bitbake neard -c devshell $ make clean $ make tools/snep-send.o -- cgit v1.2.3-54-g00ecf