Compile on redhat 8


I tried to compile asterisk 1.2 on a legacy RH8 system.
kernel 2.4.20-30.8.legacy. I’ve installed all devel packages as well as bison.
There is a symbolic link called “build” in
which points to
and that directory does not exist.

It results in the following error while running the gcc part of make install

/usr/include/linux/modversions.h:1:2: #error Modules should never use kernel-headers system headers, but rather headers from an appropriate kernel-source package. Change -I/usr/src/linux/include (or similar) to -I/lib/modules/$(uname -r)/build/include to build against the currently-running kernel.followed by another zillion errors.
So I included the link specified in the documentation

but that did not change for the better. Which was to be expected because there was a link build -> /usr/src/linux-2.4.20-30.8.legacy

Where am I going wrong?


Have you got the kernel source code installed? If not, it looks like you’ll have to install it.

Why are you using such an old distribution?

I don’t know if the kernel source is installed. most likely not. I never install kernel development packages, when doing a fresh install.
hhmmm, now I have to look for the kernel sources.

I had this system readily available. It is an old (now obsolete) FTP server running RH8. I hoped avoiding a reinstallation of the OS. Besides it is old hardware. Installing FC3 would result in a very slow system. I’m maintaining several RH systems so do not want to switch to slackware or other distri which minimizes the processor overhead.


I doubt it would make any real noticeable difference. So long as the kernel you install is built with as many things in module form as possible - which is the default way, anyway - and you disable everthing but essential services.

What processor is it and how much RAM?

Upgrading to FC3 / 2.6.x kernel would make life easier and should eliminate any problems with building modern software.