# HG changeset patch
# User Rob Landley When something goes wrong, you generally want a verbose, single-processor
-log of the build output. Re-run your build with a couple extra variables, and
-log the output with "tee": When something goes wrong, re-run your build with a couple extra variables,
+and log the output with "tee":Q: How do I get better log output from the build?
-Get a verbose, single-processor log of the build output.
+
+
@@ -259,6 +260,29 @@
you to scroll back quite a ways to find the error. It also shouldn't
interleave the output of multiple parallel commands.BUILD_VERBOSE=1 CPUS=1 ./build.sh 2>&1 | tee out.txt
If you need more logging detail, run more/record-commands.sh, then re-run +the build and look at the output in build/logs.
+ +The record-commands script sets up a wrapper which logs every command (and +all its arguments) run out of $PATH. It populates build/wrapdir with +symlinks for every command name currently in $PATH, all pointing to the +"wrappy" binary (built from sources/toys/wrappy.c). If you run record-commands +before running host-tools.sh it wraps the host $PATH, if you run it after +host-tools.sh it wraps the sanitized $PATH in build/host.
+ +The wrappy binary depends on two environment variables (set up by +sources/include.sh): $WRAPPY_LOGPATH is an absolute path to the current +log file (updated by the "setupfor" function) and $OLDPATH is the $PATH to +exec the real command out of after appending the current command line to +the log.
+ +The script "more/report-recorded-commands.sh" prints out a list of all +commands used by each build stage. (Comparing the host-tools version +to a run without host-tools can be instructive; that's the extra stuff +./configure is picking up out of the host environment.)
+The source code used by package builds lives in several directories, each @@ -271,7 +295,6 @@
build/temp-$ARCH - working copies of the source configured and built for the given architecture.
The list of source URLs is in the script download.sh, along with a list @@ -424,9 +447,7 @@
TODO: - - more/test.sh ARCH build_section thingy - - more/record-commands.sh