'Building GCC from source on Alpine: <asm/param.h> not found

When building GCC from source in a Docker container I get the error

<asm/param.h> no such file or directory.



Solution 1:[1]

You need to install the Linux headers via apk add linux-headers.

Related: asm vs asm-generic in linux headers -- are they same

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Connor Fuhrman