Tuesday, May 1, 2012

SCST Build Error: arch/x86/Makefile_32.cpu: No such file or directory

Try to build SCST module on Ubuntu 11(Linux 3.0) and got the following error:
cd scst && make all
make[1]: Entering directory `/home/hui/scst/scst'
cd src && make all
make[2]: Entering directory `/home/hui/scst/scst/src'
make -C /lib/modules/3.0.22-scstcustom/build SUBDIRS=/home/hui/scst/scst/src BUILD_DEV=m
make[3]: Entering directory `/usr/src/linux-headers-3.0.22-scstcustom'
/usr/src/linux-headers-3.0.22-scstcustom/arch/x86/Makefile:39: /usr/src/linux-headers-3.0.22-scstcustom/arch/x86/Makefile_32.cpu: No such file or directory
make[3]: *** No rule to make target `/usr/src/linux-headers-3.0.22-scstcustom/arch/x86/Makefile_32.cpu'.  Stop.
make[3]: Leaving directory `/usr/src/linux-headers-3.0.22-scstcustom'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/hui/scst/scst/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/hui/scst/scst'
make: *** [scst] Error 2
It was caused by incorrect linux-headers. Try to recreate headers for arch/x86 and the problem was fixed:

Go to Linux source directory:
#cd /usr/src/linux-3.0.0/arch
#tar zcvf x86.tgz x86

Put x86.tgz to /usr/src/linux-headers-3.0.22-scstcustom/arch and untar the x86 files
#cd /usr/src/linux-headers-3.0.22-scstcustom/arch/
#tar xvf x86.tgz


No comments:

Post a Comment