The exact method for debugging build failures depends on the nature of the problem and on the system's area from which the bug originates. Standard debugging practices such as comparison against the last known working version with examination of the changes and the re-application of steps to identify the one causing the problem are valid for the Yocto Project just as they are for any other system. Even though it is impossible to detail every possible potential failure, this section provides some general tips to aid in debugging given a variety of situations.
The following list shows the debugging topics in the remainder of this section:
"Viewing Logs from Failed Tasks" describes how to find and view logs from tasks that failed during the build process.
"Viewing Variable Values"
describes how to use the BitBake -e
option to examine variable values after a recipe has been
parsed.
"Viewing Package Information with oe-pkgdata-util
"
describes how to use the
oe-pkgdata-util
utility to query
PKGDATA_DIR
and display package-related information for built
packages.
"Viewing Dependencies Between Recipes and Tasks"
describes how to use the BitBake -g
option to display recipe dependency information used
during the build.
"Viewing Task Variable Dependencies"
describes how to use the
bitbake-dumpsig
command in
conjunction with key subdirectories in the
Build Directory
to determine variable dependencies.
"Running Specific Tasks"
describes how to use several BitBake options (e.g.
-c
, -C
, and
-f
) to run specific tasks in the
build chain.
It can be useful to run tasks "out-of-order" when trying
isolate build issues.
"General BitBake Problems"
describes how to use BitBake's -D
debug output option to reveal more about what BitBake is
doing during the build.
"Building with No Dependencies"
describes how to use the BitBake -b
option to build a recipe while ignoring dependencies.
"Recipe Logging Mechanisms" describes how to use the many recipe logging functions to produce debugging output and report errors and warnings.
"Debugging Parallel Make Races" describes how to debug situations where the build consists of several parts that are run simultaneously and when the output or result of one part is not ready for use with a different part of the build that depends on that output.
"Debugging With the GNU Project Debugger (GDB) Remotely" describes how to use GDB to allow you to examine running programs, which can help you fix problems.
"Debugging with the GNU Project Debugger (GDB) on the Target" describes how to use GDB directly on target hardware for debugging.
"Other Debugging Tips" describes miscellaneous debugging tips that can be useful.
For debugging information within the popular Eclipse™ IDE, see the "Working within Eclipse" section in the Yocto Project Application Development and the Extensible Software Development Kit (eSDK) manual.