I use mpt-status to monitor LSI Logic RAID controllers in my Linux hosts. While attempting to build a package for CentOS 5.3, I ran into the following error:
$ gmake
KERNEL_PATH=/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64**
gcc -Iincl -Wall -W -O2
-I/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/drivers/message/fusion
-I/lib/modules/`uname -r`/build/drivers/message/fusion
-I/lib/modules/`uname -r`/source/drivers/message/fusion -o mpt-status
mpt-status.c
In file included from mpt-status.c:38:
mpt-status.h:6:28: error: linux/compiler.h: No such file or directory
It appears that the compiler.h header doesn’t come with the CentOS kernel-headers package (and according to a couple of posts I read, it is no longer a publicly consumable header file), so I removed it from mpt-status.c. This allowed mpt-status.c to build and install correctly:
$ gmake
KERNEL_PATH=/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64**
gcc -Iincl -Wall -W -O2
-I/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/drivers/message/fusion
-I/lib/modules/`uname -r`/build/drivers/message/fusion
-I/lib/modules/`uname -r`/source/driver
s/message/fusion -o mpt-status mpt-status.c
If you are attempting to build mpt-status.c for the first time, make sure you properly install the CentOS Linux kernel source. I received a couple of e-mails from individuals who were trying to get mpt-status working, and in each case the Linux kernel source was not installed properly.