Lines Matching +full:error +full:- +full:correcting
1 .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
9 working version with examination of the changes and the re-application
18 A useful feature for debugging is the error reporting tool.
20 OpenEmbedded build system to produce error reporting commands as part
22 completes to log error information into a common database, that can
25 ":ref:`dev-manual/error-reporting-tool:using the error reporting tool`"
31 - ":ref:`dev-manual/debugging:viewing logs from failed tasks`" describes
35 - ":ref:`dev-manual/debugging:viewing variable values`" describes how to
36 use the BitBake ``-e`` option to examine variable values after a
39 - ":ref:`dev-manual/debugging:viewing package information with ``oe-pkgdata-util```"
40 describes how to use the ``oe-pkgdata-util`` utility to query
42 display package-related information for built packages.
44 - ":ref:`dev-manual/debugging:viewing dependencies between recipes and tasks`"
45 describes how to use the BitBake ``-g`` option to display recipe
48 - ":ref:`dev-manual/debugging:viewing task variable dependencies`" describes
49 how to use the ``bitbake-dumpsig`` command in conjunction with key
53 - ":ref:`dev-manual/debugging:running specific tasks`" describes
54 how to use several BitBake options (e.g. ``-c``, ``-C``, and ``-f``)
56 tasks "out-of-order" when trying isolate build issues.
58 - ":ref:`dev-manual/debugging:general BitBake problems`" describes how
59 to use BitBake's ``-D`` debug output option to reveal more about what
62 - ":ref:`dev-manual/debugging:building with no dependencies`"
63 describes how to use the BitBake ``-b`` option to build a recipe
66 - ":ref:`dev-manual/debugging:recipe logging mechanisms`"
70 - ":ref:`dev-manual/debugging:debugging parallel make races`"
76 - ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`"
80 - ":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) on the target`"
83 - ":ref:`dev-manual/debugging:other debugging tips`" describes
92 :ref:`ref-tasks-compile` task of the
94 ``tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile``.
111 <bitbake-user-manual/bitbake-user-manual-metadata:modifying existing
114 BitBake's ``-e`` option is used to display variable values after
119 $ bitbake -e
124 $ bitbake -e recipename
138 In the output of ``bitbake -e``, each variable is preceded by a
145 ``export`` in the output of ``bitbake -e``. See the following example::
147 …export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux8…
149 In addition to variable values, the output of the ``bitbake -e`` and
150 ``bitbake -e`` recipe commands includes the following information:
152 - The output starts with a tree listing all configuration files and
155 system (including the behavior of the :ref:`ref-manual/tasks:normal recipe build tasks`) is
156 implemented in the :ref:`ref-classes-base` class and the
159 - After the variable values, all functions appear in the output. For
162 override-style operators like ``:append`` and ``:prepend``, then the
165 Viewing Package Information with ``oe-pkgdata-util``
168 You can use the ``oe-pkgdata-util`` command-line utility to query
170 various package-related information. When you use the utility, you must
173 Here are a few of the available ``oe-pkgdata-util`` subcommands.
180 - ``oe-pkgdata-util list-pkgs [pattern]``: Lists all packages
184 - ``oe-pkgdata-util list-pkg-files package ...``: Lists the
191 ``${``\ :term:`WORKDIR`\ ``}/packages-split``
194 :ref:`ref-tasks-package` task
198 If you want to inspect the ``${WORKDIR}/packages-split``
199 directory, make sure that :ref:`ref-classes-rm-work` is not
202 - ``oe-pkgdata-util find-path path ...``: Lists the names of
205 ``make-doc`` package::
207 $ oe-pkgdata-util find-path /usr/share/man/man1/make.1
208 make-doc: /usr/share/man/man1/make.1
210 - ``oe-pkgdata-util lookup-recipe package ...``: Lists the name
213 For more information on the ``oe-pkgdata-util`` command, use the help
216 $ oe-pkgdata-util --help
217 $ oe-pkgdata-util subcommand --help
229 $ bitbake -g recipename
233 - ``pn-buildlist``: A list of recipes/targets involved in building
240 - ``task-depends.dot``: A graph showing dependencies between tasks.
248 - DOT files use a plain text format. The graphs generated using the
249 ``bitbake -g`` command are often so large as to be difficult to
250 read without special pruning (e.g. with BitBake's ``-I`` option)
255 As an example, the ``task-depends.dot`` file contains lines such
258 "libxslt.do_configure" -> "libxml2.do_populate_sysroot"
261 :ref:`ref-tasks-configure`
263 :ref:`ref-tasks-populate_sysroot`
268 - For an example of how ``.dot`` files can be processed, see the
269 ``scripts/contrib/graph-tool`` Python script, which finds and
275 $ bitbake -g -u taskexp recipename
279 $ bitbake -g -u taskexp_ncurses recipename
281 The ``-u taskdep`` option GUI window from which you can view build-time and
283 ``-u taskexp_ncurses`` option uses ncurses instead of GTK to render the UI.
289 ":ref:`bitbake-user-manual/bitbake-user-manual-execution:checksums (signatures)`"
295 in the ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:variable flags`"
311 :ref:`ref-tasks-fetch` task of the
315 …${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef64…
318 (:ref:`sstate <overview-manual/concepts:shared state cache>`) cache, an
324 #. Run ``bitbake-dumpsig`` on the ``sigdata`` or ``siginfo`` file. Here
327 …$ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222…
341 The output of ``bitbake-dumpsig`` also includes the value each
349 There is a ``bitbake-diffsigs`` command for comparing two
352 call ``bitbake-diffsigs`` with just one file, the command behaves like
353 ``bitbake-dumpsig``.
357 BitBake command-line options::
359 ‐‐dump-signatures=SIGNATURE_HANDLER
360 -S SIGNATURE_HANDLER
371 tasks need to be re-run in situations where that is not expected.
386 ":ref:`dev-manual/debugging:viewing task variable dependencies`" section.
389 ":ref:`overview-manual/concepts:shared state`"
396 :ref:`checksums <overview-manual/concepts:checksums (signatures)>` and
397 :ref:`overview-manual/concepts:shared state` cache to avoid unnecessarily
427 :ref:`ref-tasks-package` or the
442 behavior in most cases is: :ref:`ref-tasks-fetch`, :ref:`ref-tasks-unpack`, :ref:`ref-tasks-patch`,
443 :ref:`ref-tasks-configure`, :ref:`ref-tasks-compile`, :ref:`ref-tasks-install`, :ref:`ref-tasks-pac…
444 :ref:`do_package_write_* <ref-tasks-package_write_deb>`, and :ref:`ref-tasks-build`. The default ta…
445 :ref:`ref-tasks-build` and any tasks on which it depends build first. Some tasks,
446 such as :ref:`ref-tasks-devshell`, are not part of the default build chain. If you
448 use the ``-c`` option in BitBake. Here is an example::
450 $ bitbake matchbox-desktop -c devshell
452 The ``-c`` option respects task dependencies, which means that all other
455 task to run with ``-c``, BitBake will only run the task if it considers
457 ":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
461 If you want to force an up-to-date task to be rerun (e.g. because you
464 out), then you can use the ``-f`` option.
468 The reason ``-f`` is never required when running the
469 :ref:`ref-tasks-devshell` task is because the
470 [\ :ref:`nostamp <bitbake-user-manual/bitbake-user-manual-metadata:variable flags>`\ ]
473 The following example shows one way you can use the ``-f`` option::
475 $ bitbake matchbox-desktop
481 $ bitbake matchbox-desktop -c compile -f
482 $ bitbake matchbox-desktop
484 This sequence first builds and then recompiles ``matchbox-desktop``. The
486 compile. BitBake recognizes that the :ref:`ref-tasks-compile` task was rerun and
490 :ref:`ref-manual/tasks:normal recipe build tasks`
491 that depend on it is to use the ``-C`` option.
495 This option is upper-cased and is separate from the ``-c``
496 option, which is lower-cased.
499 :ref:`ref-tasks-build` task, which is
504 $ bitbake matchbox-desktop -C compile
506 Internally, the ``-f`` and ``-C`` options work by tainting (modifying)
517 .. code-block:: none
519 …WARNING: /home/ulf/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb.do_compile is t…
528 $ bitbake matchbox-desktop -c clean
529 $ bitbake matchbox-desktop
533 :ref:`ref-tasks-listtasks` task as follows::
535 $ bitbake matchbox-desktop -c listtasks
543 You can see debug output from BitBake by using the ``-D`` option. The
545 reason behind it. Each ``-D`` option you use increases the logging
546 level. The most common usage is ``-DDD``.
548 The output from ``bitbake -DDD -v targetname`` can reveal why BitBake
559 $ bitbake -b somepath/somerecipe.bb
579 - ``bb.plain(msg)``: Writes msg as is to the log while also
582 - ``bb.note(msg)``: Writes "NOTE: msg" to the log. Also logs to
583 stdout if BitBake is called with "-v".
585 - ``bb.debug(level, msg)``: Writes "DEBUG: msg" to the log. Also logs to
587 ":ref:`bitbake-user-manual/bitbake-user-manual-intro:usage and syntax`"
590 - ``bb.warn(msg)``: Writes "WARNING: msg" to the log while also
593 - ``bb.error(msg)``: Writes "ERROR: msg" to the log while also
600 - ``bb.fatal(msg)``: This logging function is similar to
601 ``bb.error(msg)`` but also causes the calling task to fail.
610 and ``bbfatal``. The :ref:`ref-classes-logging` class
615 -------------------
624 ":ref:`ref-tasks-listtasks`"
635 bb.error("Hit recoverable_error, you really need to fix this!")
643 -----------------
646 logs, you have the same goals --- informative with minimal console output.
663 bberror "Hit recoverable_error, correcting"
681 presents a real-world example of an error encountered on the Yocto
691 -----------
705 .. code-block:: none
707 …| DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i5…
709 | NOTE: make -j 16
710 | make --no-print-directory all-am
711 | /bin/mkdir -p include/near
712 | /bin/mkdir -p include/near
713 | /bin/mkdir -p include/near
714 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
715 0.14-r0/neard-0.14/include/types.h include/near/types.h
716 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
717 0.14-r0/neard-0.14/include/log.h include/near/log.h
718 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
719 0.14-r0/neard-0.14/include/plugin.h include/near/plugin.h
720 | /bin/mkdir -p include/near
721 | /bin/mkdir -p include/near
722 | /bin/mkdir -p include/near
723 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
724 0.14-r0/neard-0.14/include/tag.h include/near/tag.h
725 | /bin/mkdir -p include/near
726 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
727 0.14-r0/neard-0.14/include/adapter.h include/near/adapter.h
728 | /bin/mkdir -p include/near
729 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
730 0.14-r0/neard-0.14/include/ndef.h include/near/ndef.h
731 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
732 0.14-r0/neard-0.14/include/tlv.h include/near/tlv.h
733 | /bin/mkdir -p include/near
734 | /bin/mkdir -p include/near
735 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
736 0.14-r0/neard-0.14/include/setting.h include/near/setting.h
737 | /bin/mkdir -p include/near
738 | /bin/mkdir -p include/near
739 | /bin/mkdir -p include/near
740 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
741 0.14-r0/neard-0.14/include/device.h include/near/device.h
742 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
743 0.14-r0/neard-0.14/include/nfc_copy.h include/near/nfc_copy.h
744 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
745 0.14-r0/neard-0.14/include/snep.h include/near/snep.h
746 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
747 0.14-r0/neard-0.14/include/version.h include/near/version.h
748 | ln -s /home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
749 0.14-r0/neard-0.14/include/dbus.h include/near/dbus.h
751 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/pokybuild/yocto-autobuilder/nightly-x86/
752 …build/build/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -I. -I./include -I./src -I./gdbus -I/home/pokybu…
753 yocto-autobuilder/nightly-x86/build/build/tmp/sysroots/qemux86/usr/include/glib-2.0
754 -I/home/pokybuild/yocto-autobuilder/nightly-x86/build/build/tmp/sysroots/qemux86/usr/
755 lib/glib-2.0/include -I/home/pokybuild/yocto-autobuilder/nightly-x86/build/build/
756 tmp/sysroots/qemux86/usr/include/dbus-1.0 -I/home/pokybuild/yocto-autobuilder/
757 …nightly-x86/build/build/tmp/sysroots/qemux86/usr/lib/dbus-1.0/include -I/home/pokybuild/yocto-aut…
758 nightly-x86/build/build/tmp/sysroots/qemux86/usr/include/libnl3
759 -DNEAR_PLUGIN_BUILTIN -DPLUGINDIR=\""/usr/lib/near/plugins"\"
760 -DCONFIGDIR=\""/etc/neard\"" -O2 -pipe -g -feliminate-unused-debug-types -c
761 -o tools/snep-send.o tools/snep-send.c
762 | In file included from tools/snep-send.c:16:0:
763 | tools/../src/near.h:41:23: fatal error: near/dbus.h: No such file or directory
767 | make[1]: *** [tools/snep-send.o] Error 1
769 | make: *** [all] Error 2
770 | ERROR: oe_runmake failed
772 Reproducing the Error
773 ---------------------
778 exists. Thus, once the error surfaces, you need a way to reproduce it.
784 in your ``local.conf`` file to a high number (e.g. "-j 20"). Using a
792 $ bitbake neard -c devshell
795 ":ref:`dev-manual/development-shell:using a development shell`" section.
800 $ make tools/snep-send.o
807 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/......
811 tools/snep-send.c
812 In file included from tools/snep-send.c:16:0:
813 tools/../src/near.h:41:23: fatal error: near/dbus.h: No such file or directory
817 make: *** [tools/snep-send.o] Error 1
822 ----------------------------
834 ":ref:`dev-manual/quilt:using quilt in your workflow`" section.
840 tools/snep-send.$(OBJEXT): include/near/dbus.h
849 recipe folder. Here is an example assuming a top-level
852 $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard
855 update the "neard" recipe (i.e. ``neard-0.14.bb``) so that the
860 SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \
872 -----------------
884 $ bitbake neard -c devshell
886 $ make tools/snep-send.o
891 submit the fix for the recipe in OE-Core and upstream so that the
893 ":doc:`../contributor-guide/submit-changes`" section for more information.
899 understand and fix problems. It also allows you to perform post-mortem
902 ":ref:`ref-manual/images:Images`" chapter in the Yocto
908 For best results, install debug (``-dbg``) packages for the applications you
917 names, variable names and values, stack traces and so forth --- even
926 ----------------------------------
936 - Ensure that ``debuginfod`` is present in :term:`DISTRO_FEATURES`
937 (it already is in ``OpenEmbedded-core`` defaults and ``poky`` reference distribution).
945 - Run the following commands to launch the ``debuginfod`` server on the host::
947 $ oe-debuginfod
949 - To use ``debuginfod`` on the target, you need to know the ip:port where
953 root@qemux86-64:~# export DEBUGINFOD_URLS="http://192.168.7.1:8002/"
955 - Then debug info fetching should simply work when running the target ``gdb``,
958 root@qemux86-64:~# gdb /bin/cat
964 - It's also possible to use ``debuginfod-find`` to just query the server::
966 root@qemux86-64:~# debuginfod-find debuginfo /bin/ls
971 --------------------------
975 processes the debugging information that is run on a remote computer -
1015 ``-dbg`` packages.
1026 EXTRA_IMAGE_FEATURES:append = " tools-debug"
1043 $ bitbake -c populate_sdk image
1050 $ bitbake meta-toolchain
1054 $ bitbake gdb-cross-<architecture>
1057 ``cross-gdb`` you can use for debugging during development. While
1059 are better when considering long-term maintenance strategies.
1063 If you run ``bitbake gdb-cross``, the OpenEmbedded build system suggests
1064 the actual image (e.g. ``gdb-cross-i586``). The suggestion is usually the
1073 $ tar xvfj build-dir/tmp/deploy/images/machine/image.rootfs.tar.bz2
1074 $ tar xvfj build-dir/tmp/deploy/images/machine/image-dbg.rootfs.tar.bz2
1083 …`build-dir`\ ``/tmp/sysroots/``\ `host`\ ``/usr/bin/``\ `architecture`\ ``/``\ `architecture`\ ``-…
1099 .. code-block:: shell
1110 $ cd directory-holding-the-debugfs-directory
1111 $ arch-gdb
1113 (gdb) set substitute-path /usr/src/debug debugfs/usr/src/debug
1114 (gdb) target remote IP-of-target:1234
1142 $ bitbake -c devshell bash
1144 $ scp packages-split/bash/bin/bash target:/bin/bash
1145 $ cp -a packages-split/bash-dbg/\* path/debugfs
1159 - Ensure that GDB is on the target. You can do this by making
1162 EXTRA_IMAGE_FEATURES:append = " tools-debug"
1164 - Ensure that debug symbols are present. You can do so by adding the
1165 corresponding ``-dbg`` package to :term:`IMAGE_INSTALL`::
1167 IMAGE_INSTALL:append = " packagename-dbg"
1172 EXTRA_IMAGE_FEATURES:append = " dbg-pkgs"
1179 from :term:`FULL_OPTIMIZATION` of "-O2" to :term:`DEBUG_OPTIMIZATION`
1180 of "-O -fno-omit-frame-pointer"::
1194 Minidebuginfo data allows, on the one side, to retrieve a call-stack using
1196 allows to retrieve a symbolicated call-stack when using ``systemd-coredump`` to manage
1207 - When adding new packages, it is worth watching for undesirable items
1212 - If you want to remove the ``psplash`` boot splashscreen, add
1218 - Removing :term:`TMPDIR` (usually ``tmp/``, within the
1221 will be cached in :term:`SSTATE_DIR` (usually ``sstate-cache/``, which is
1230 - Understanding how a feature is used in practice within existing
1235 recursively search through common recipe-related files, skipping
1240 grep -Ir \
1241 --exclude-dir=.git \
1242 --exclude-dir='build*' \
1243 --include='*.bb*' \
1244 --include='*.inc*' \
1245 --include='*.conf*' \
1246 --include='*.py*' \
1253 $ g -i foo # Search recursively for "foo", ignoring case
1254 $ g -w FOO # Search recursively for "FOO" as a word, ignoring e.g. "FOOBAR"
1264 and the ":doc:`../contributor-guide/report-defect`" section.