8.25. libedit stage 2 20251016-3.1

Rebuild libedit in the final target environment so interactive programs use the completed curses stack.

Input assumption: libedit-20251016-3.1.tar.gz is already present in /sources from the chapter 4 source staging step.

Source URL: https://thrysoee.dk/editline/libedit-20251016-3.1.tar.gz

Upstream build note: the release tarball includes a generated autotools configure script. Upstream documents the normal build flow as ./configure, make, and make install; this section uses that flow through lbi_configure.

Licenses:

Dependencies:

libedit is a BSD editline and history library. we need it to provide final target line-editing and command-history functionality for interactive programs such as the rebuilt shell.

Extract and Enter the Source Tree

cd /sources
rm -rf libedit-20251016-3.1
tar -xf libedit-20251016-3.1.tar.gz
cd libedit-20251016-3.1

Configure libedit

CPPFLAGS="-D__STDC_ISO_10646__=201706L" \
lbi_configure \
    --disable-static \
    --enable-shared \
    --disable-examples

Build libedit

make $LWI_MAKE_FLAGS

Install libedit

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 libedit again.

Command Explanations