3.30.4. Viewing Dependencies Between Recipes and Tasks

Sometimes it can be hard to see why BitBake wants to build other recipes before the one you have specified. Dependency information can help you understand why a recipe is built.

To generate dependency information for a recipe, run the following command:

     $ bitbake -g recipename
                

This command writes the following files in the current directory:

The graphs are in DOT format and can be converted to images (e.g. using the dot tool from Graphviz).

Notes

  • DOT files use a plain text format. The graphs generated using the bitbake -g command are often so large as to be difficult to read without special pruning (e.g. with Bitbake's -I option) and processing. Despite the form and size of the graphs, the corresponding .dot files can still be possible to read and provide useful information.

    As an example, the task-depends.dot file contains lines such as the following:

         "libxslt.do_configure" -> "libxml2.do_populate_sysroot"
                                

    The above example line reveals that the do_configure task in libxslt depends on the do_populate_sysroot task in libxml2, which is a normal DEPENDS dependency between the two recipes.

  • For an example of how .dot files can be processed, see the scripts/contrib/graph-tool Python script, which finds and displays paths between graph nodes.

You can use a different method to view dependency information by using the following command:

     $ bitbake -g -u taskexp recipename
                

This command displays a GUI window from which you can view build-time and runtime dependencies for the recipes involved in building recipename.