8.5. xz stage 2 5.8.3

Rebuild xz in the final target environment using the autotools configure path via `lbi_configure`.

Input assumption: xz-5.8.3.tar.xz is already present in /sources from the chapter 4 source staging step.

Source URL: https://github.com/tukaani-project/xz/releases/download/v5.8.3/xz-5.8.3.tar.xz

Upstream build note: the upstream INSTALL document describes both configure and CMake options for this release. This section uses the autotools configure flow through lbi_configure.

Licenses:

Dependencies:

xz is a compression toolkit that provides liblzma and .xz/.lzma command-line tools. we need it to provide final stage xz and liblzma tooling in chapter 8.

Extract and Enter the Source Tree

cd /sources
tar -xf xz-5.8.3.tar.xz
cd xz-5.8.3

Configure xz

If configure fails with a CFLAGS contains something that makes -Werror complain error, use the upstream-documented override below.
SKIP_WERROR_CHECK=yes \
lbi_configure \
    --disable-static \
    --enable-shared \
    --disable-nls \
    --docdir=/system/documentation/xz

Build xz

make $LWI_MAKE_FLAGS

Install xz

make install
After this step is complete, you can remove the extracted source directory and source tarball from /sources if you do not plan to rebuild xz again.

Command Explanations