[csw-buildfarm] ClamAV 0.96 on Solaris9/10 - Intel

Török Edwin edwin at clamav.net
Wed Mar 31 12:31:24 CEST 2010


Hi Peter,

First of all I found the problem with the broken gcc4 on Solaris9 on the
buildfarm: you have a gcc4 built on Solaris8, and it has fix-includes
from Solaris8 headers!

$ cat >x.c
#include <sys/types.h>
#include <signal.h>

If I include <sys/types.h> it is missing upad128_t needed by signal.h:
$ /opt/csw/gcc4/bin/g++ -E x.c | grep upad128
 upad128_t fx_xmm[8];
 upad128_t __fx_ign2[14];
   upad128_t xmm[8];

However the type is there:
$ /opt/csw/gcc4/bin/g++ -E /usr/include/sys/types.h|grep upad128
} upad128_t;

Then I found that on Solaris9 (current9x) you are using the Solaris8
headers:
/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.3.3/include-fixed/sys/types.h

/opt/csw/gcc4/bin/gcc -v
Using built-in specs.
Target: i386-pc-solaris2.8

So when you built GCC4 on Solaris8, it has run fix-includes on
sys/types.h, and it is using that instead of system's sys/types.h.
That works fine on Solaris8 (I assume), however is wrong for Solaris9
(which has a different sys/types.h header).
Although the gcc4 from Solaris8 is probably binary compatible with
Solaris9, using a header from Solaris8 on Solaris9 is certainly not
compatible.

So you need to build GCC4 on Solaris9, so that it runs fix-includes on
the Solaris9 header.

Once you have a GCC4 built on Solaris9 you should be able to use that to
build ClamAV.

For reference here is the error you get with gcc4 on Solaris9
$ /opt/csw/gcc4/bin/g++ x.c
In file included from
/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.3.3/include-fixed/sys/reg.h:22,
                 from /usr/include/sys/regset.h:24,
                 from /usr/include/sys/ucontext.h:21,
                 from
/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.3.3/include-fixed/sys/signal.h:252,
                 from
/opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.3.3/include-fixed/signal.h:36,
                 from x.c:2:
/usr/include/ia32/sys/reg.h:300: error: 'upad128_t' does not name a type
/usr/include/ia32/sys/reg.h:301: error: 'upad128_t' does not name a type
/usr/include/ia32/sys/reg.h:331: error: 'upad128_t' does not name a type

BTW everything is fine when building on Solaris10/Intel (and everything
is fine on Solaris8,9,10/Sparc):
I tested this:
http://git.clamav.net/gitweb?p=clamav-devel.git;a=snapshot;h=c5fb062ec3a22b2e35fca555cb59d4a5646fef2e;sf=tgz

Solaris10/Intel:

$ export PATH=/usr/bin:/usr/ccs/bin:/opt/csw/bin
$ export LD_LIBRARY_PATH=/opt/csw/gcc4/lib
$ ./configure CC=/opt/csw/gcc4/bin/gcc CXX=/opt/csw/gcc4/bin/g++
--disable-clamav --enable-llvm --enable-check
--with-libcheck-prefix=/home/edwin/checkx
$ gmake -j2
$ gmake check -j2

....
PASS: llvmcheck.sh

==================

All 6 tests passed

==================
....
PASS: check_freshclam.sh
PASS: check_sigtool.sh
SKIP: check_unit_vg.sh
PASS: check1_clamscan.sh
PASS: check_clamav
PASS: check2_clamd.sh
PASS: check3_clamd.sh
SKIP: check5_clamd_vg.sh
SKIP: check6_clamd_vg.sh
SKIP: check7_clamd_hg.sh
SKIP: check8_clamd_hg.sh
PASS: check4_clamd.sh

======================
All 7 tests passed
(5 tests were not run)
======================

Best regards,
--Edwin



More information about the buildfarm mailing list