8.12. byacc stage 2 20260126
Rebuild byacc in the final target environment so the yacc-compatible parser generator matches the completed userspace.
Input assumption: byacc-20260126.tgz is already present in /sources from the chapter 4 source staging step.
Source URL: https://invisible-island.net/archives/byacc/byacc-20260126.tgz
Upstream build note: upstream provides a configure script with standard installation directory options, followed by make and make install. The generated makefile installs the program as yacc.
Licenses:
- Public domain
- Permissive notices for selected build-support files
Dependencies:
- musl (libc)
- make
byacc is a portable Berkeley yacc-compatible parser generator. we need it to provide the final target yacc command for package builds that expect traditional yacc behavior.
Extract and Enter the Source Tree
cd /sources
rm -rf byacc-20260126
tar -xf byacc-20260126.tgz
cd byacc-20260126
Configure byacc
lbi_configure --with-manpage-format=normal
Build byacc
make $LWI_MAKE_FLAGS
Install byacc
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 byacc again.
Command Explanations
rm -rf byacc-...: Removes any previous byacc source tree before rebuilding.tar -xf byacc-20260126.tgz: Extracts the staged byacc archive.lbi_configure --with-manpage-format=normal: Configures byacc for the book's layout with normal man pages.make $LWI_MAKE_FLAGSandmake install: Build and install byacc in the final target environment.