7.3. Debug

After the work of any all dynamically generated scripts remain. They are stored in reserved directory var/dump/.

It is possible to use the generated scripts manually from command line. In that case we will recieve in current shell session the same environment as has been available to the build process. Interface variables like D or MAKEOPTS become initialised, the build functions of any-api(7) from libraries are callable.

To execute manually the elements of building the package zlib-1.2.11 in configuration default one needs to execute:

# 1
. var/dump/zlib-1.2.11_default/dump.sh
# 2
set +e
# 3
tobuild

Command 1 includes the script with build environment, which any has generated. It does not launch any actions by itself, just sets up the variables and includes functions. The given script is generating during the call of any do.
Command 2 turns off the shell mode "exit on error". The given mode is set up by the engine for correct work and timely diagnostics. The mode will disturb during the debug.
Command 3 moves to the directory with package sources, where the build has taken place.

After the actions above we may manually repeat the build commands, interesting to us: launch anew configure, launch separate tests from configure inners, repeat the compilation strings of particular object files and all the rest, useful to us. The shell environment will be identical to the one, used by the engine during the build, when launch of entire process has been done from command line.

It is possible to launch large functions of the anybuild in one piece, if we want to reach step-by-step more late stages:

# preparation
. var/dump/zlib-1.2.11_default/dump.sh
set +e
tobuild

# repeat
src_config
src_compile
make install DESTDIR=${D}

# new debug actions
...