Flex & Bison Are Now Needed To Build The Linux Kernel; Linux 4.16 Can Also Be Snap'ed

Written by Michael Larabel in Linux Kernel on 1 February 2018 at 03:11 PM EST. 3 Comments
LINUX KERNEL
Building the kernel beginning with Linux 4.16 now requires two more dependencies: Bison and Flex.

Kconfig infrastructure work is rarely notable for kernel merge windows, but this time around with Linux 4.16 there are more significant changes. The lexer and parser for Kconfig are now built from sources rather than relying upon pre-generated C files. Because of this, Flex and Bison are added now as requirements for building the Linux kernel.

Fortunately, Flex and Bison are quite common to other projects as build-time dependencies for lexer and parser generator needs, so it's not a real burden to worry about. Just useful for pointing out next time you build the kernel or are currently building the kernel routinely in an unmonitored fashion.

The other Kconfig infrastructure changes are mostly mundane for Linux 4.16 and outlined via the pull request.

The Kbuild changes for Linux 4.16 are also notable and introduce make snap-pkg support for creating a Linux kernel Snap package using the mainline Kbuild infrastructure. This patch produced last year by a Canonical developer makes it easier now to spin up a Snap package of the Linux kernel. The Linux kernel Snap combines the kernel, its modules, and related files. While Snap is normally about application sandboxing, Snap'ing the Linux kernel is done for the creation of a system image such as with Ubuntu Core and for handling system updates in its atomic manner.

Rather than the Linux kernel Snap creation being out-of-tree, it's now mainline with Linux 4.16 to ease the process along the same lines as the Linux kernel's Kbuild setup for RPMs, Debian packages, etc. Fortunately it doesn't add any real bloat with being less than three dozen new lines of code.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week