Video Screencast Help
Scheduled Maintenance: Symantec Connect is scheduled to be down Saturday, April 19 from 10am to 2pm Pacific Standard Time (GMT: 5pm to 9pm) for server migration and upgrade.
Please accept our apologies in advance for any inconvenience this might cause.

sav savap antivirus for centos 6.2

Created: 16 Feb 2012 | 1 comment

Hi all i've some trouble on compiling savap module for centos 6.2.

my version of sav is1.0.12 and after installing the sav

[root@localhost ap-kernelmodule-1.0.12-8]# cat /etc/redhat-release
CentOS release 6.2 (Final)

kernel version :2.6.32-220.el6.x86_64
uname -a
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
 

[root@localhost ap-kernelmodule-1.0.12-8]# ./build.sh
Kernel release is not set, build the kernel modules for the current kernel release(2.6.32-220.el6.x86_64)
Kernel headers/makefiles directory is not set, use the default /usr/src/kernels/2.6.32-220.el6.x86_64
/tmp/rpm/ap-kernelmodule-1.0.12-8/symev /tmp/rpm/ap-kernelmodule-1.0.12-8
rm -f *.o *.ko *.mod.c .*.cmd modules.order Module.symvers* Module.markers Modules.symvers *.ko.unsigned Makefile.xen
rm -rf .tmp_versions* .build-*
/tmp/rpm/ap-kernelmodule-1.0.12-8
/tmp/rpm/ap-kernelmodule-1.0.12-8/symap /tmp/rpm/ap-kernelmodule-1.0.12-8
rm -f *.o *.ko *.mod.c .*.cmd modules.order Module.symvers* Module.markers Modules.symvers *.ko.unsigned Makefile.xen symap_test
rm -rf ../symev/.tmp_versions* .build-*
/tmp/rpm/ap-kernelmodule-1.0.12-8
/tmp/rpm/ap-kernelmodule-1.0.12-8/symev /tmp/rpm/ap-kernelmodule-1.0.12-8
make -C /usr/src/kernels/2.6.32-220.el6.x86_64 M=/tmp/rpm/ap-kernelmodule-1.0.12-8/symev MODVERDIR=/tmp/rpm/ap-kernelmodule-1.0.12-8/symev/../symev/.tmp_versions-custom-2.6.32-220.el6-x86_64 modules
make[1]: Entering directory `/usr/src/kernels/2.6.32-220.el6.x86_64'
  CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/symev.o
  CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/syscalls.o
  CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/fileops.o
  CC [M]  /tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.o
/tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.c: In function ‘symev_nfsd4_proc_compound’:
/tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.c:1256: error: implicit declaration of function ‘fh_init’
make[2]: *** [/tmp/rpm/ap-kernelmodule-1.0.12-8/symev/hnfs.o] Error 1
make[1]: *** [_module_/tmp/rpm/ap-kernelmodule-1.0.12-8/symev] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32-220.el6.x86_64'
make: *** [custom] Error 2
/tmp/rpm/ap-kernelmodule-1.0.12-8
Build was stopped due to error.

and this is my error.

What's the problem?

[root@localhost ap-kernelmodule-1.0.12-8]# rpm -qa kernel-devel
kernel-devel-2.6.32-220.el6.x86_64
[root@localhost ap-kernelmodule-1.0.12-8]# rpm -qa kernel-headers
kernel-headers-2.6.32-220.el6.x86_64

thanks

Andrea

Comments 1 CommentJump to latest comment

dmaltby's picture

Ironically, I was working on this same issue, and was able to come up with a solution, late yesterday.  I'm not that well-versed in Linux, so if there's a more elegant way to execute this solution, feel free to change/update.

The SAVAP build fails because it calls a function "fh_init", which should exist in the /include/linux/nfsd/nfsfh.h header file.  When checking the one in CentOS 6.2, the file seems to only "half-exist"... the part that defines this function is missing.  Interestingly enough, when looking at the "ap-kernelmodule-1.0.12-8" build folder from Symantec, there is an /include/linux/nfsd/ folder, which contains several .h files--all of which don't exist in the CentOS 6.2 build folders--as well as a nfsfh1.h file.  This file contains the remainder of the complete nfsfh.h file.

I copied all of the .h files from that folder into the CentOS build folder (/usr/src/kernels/2.6.32-220.el6.i686/include/linux/nfsd in my case--I will be testing x86_64 today, but I don't see a reason why this should be different), and copied the contents from the nfsfh1.h file (after the #include <linux/nfsd/nfsfh.h> line and before the final #endif line) into the nfsfh.h file, before the #endif /* __KERNEL__ */ line.  I used http://lxr.free-electrons.com/source/include/linux... as a reference.

After this modification, the build completed successfully, and I have AutoProtect working properly on CentOS 6.2, tested successfully with an EICAR test.

I hope this information helps you in your build.

Darrel