Subject: | build broken with ClamAV 0.80 (missing/broken #defines) |
I updated ClamAV to 0.80 after the new virus signatures required the new scanning engine. Mail::ClamAV 0.11 does not build against ClamAV 0.80. it builds fine against ClamAV 0.75.1.
This is perl, v5.8.1 built for i386-linux
Linux liz 2.4.26 #2 Sat Jun 26 19:24:28 EST 2004 i686 unknown unknown GNU/Linux
cp ClamAV.pm blib/lib/Mail/ClamAV.pm
/usr/pkg/bin/perl -Mblib -MInline=NOISY,_INSTALL_ -MMail::ClamAV -e1 0.11 blib/arch
Starting Build Prepocess Stage
Finished Build Prepocess Stage
Starting Build Parse Stage
Finished Build Parse Stage
Starting Build Glue 1 Stage
Finished Build Glue 1 Stage
Starting Build Glue 2 Stage
Finished Build Glue 2 Stage
Starting Build Glue 3 Stage
Finished Build Glue 3 Stage
Starting Build Compile Stage
Starting "perl Makefile.PL" Stage
Writing Makefile for Mail::ClamAV
Finished "perl Makefile.PL" Stage
Starting "make" Stage
/usr/pkg/bin/perl /usr/pkg/lib/perl5/5.8.1/ExtUtils/xsubpp -typemap /usr/pkg/lib/perl5/5.8.1/ExtUtils/typemap ClamAV.xs > ClamAV.xsc && mv ClamAV.xsc ClamAV.c
gcc -c -I/work/pkgbuild/mail/p5-Mail-ClamAV/work/Mail-ClamAV-0.11 -I/usr/pkg/include -I/usr/pkg/include -fno-strict-aliasing -I/usr/pkg/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -I/usr/pkg/include -DVERSION=\"0.11\" -DXS_VERSION=\"0.11\" -fpic "-I/usr/pkg/lib/perl5/5.8.1/i386-linux/CORE" ClamAV.c
ClamAV.xs: In function `clamav_perl_constant':
ClamAV.xs:282: `CL_SCAN_ENCRYPTED' undeclared (first use in this function)
ClamAV.xs:282: (Each undeclared identifier is reported only once
ClamAV.xs:282: for each function it appears in.)
ClamAV.xs:284: `CL_NUM_CHILDS' undeclared (first use in this function)
ClamAV.xs:285: `CL_MIN_LENGTH' undeclared (first use in this function)
*** Error code 1
Stop.
make: stopped in /work/pkgbuild/mail/p5-Mail-ClamAV/work/Mail-ClamAV-0.11/_Inline/build/Mail/ClamAV
A problem was encountered while attempting to compile and install your Inline
C code. The command that failed was:
make
The build directory was:
/work/pkgbuild/mail/p5-Mail-ClamAV/work/Mail-ClamAV-0.11/_Inline/build/Mail/ClamAV
To debug the problem, cd to the build directory, and inspect the output files.
at /work/pkgbuild/mail/p5-Mail-ClamAV/work/Mail-ClamAV-0.11/blib/lib/Mail/ClamAV.pm line 159
BEGIN failed--compilation aborted at /work/pkgbuild/mail/p5-Mail-ClamAV/work/Mail-ClamAV-0.11/blib/lib/Mail/ClamAV.pm line 447.
Compilation failed in require.
BEGIN failed--compilation aborted.
*** Error code 1
this is because CL_NUM_CHILDS and CL_MIN_LENGTH are no longer #defined in clamav.h, and there is a typo in the backward compat #define of CL_ENCRYPTED. the real #define is CL_SCAN_BLOCKENCRYPTED.
removing CL_NUM_CHILDS and CL_MIN_LENGTH from ClamAV.pm and fixing the #define CL_ENCRYPTED in clamav.h allows Mail::ClamAV to build against clamav 0.80.