Problems with sophossavi and Sophos 3.74

Mike Brudenell pmb1 at YORK.AC.UK
Wed Oct 1 17:00:21 IST 2003

Greetings -

Between us the author of the (Perl-SAVI) module and I have managed
to identify the problem, why it occurred for me and not him, and I have had
confirmation and a fix from Sophos.

Here goes...

Sophos have made some extensive changes to their libsavi shared library
between versions 3.73 and 3.74 of Sophos Anti-Virus.  They compile and
build their library using GCC and, unfortunately, made use of a function
called moddi3 in their revised code, which "Returns the remainder after
dividing two signed quads."

'Unfortunately' because this function appears to be GCC specific: it is
provided by the libgcc library, but not the standard C or Maths libraries
(at least not on Solaris 8, which is the platform I've been having problems

This gave rise to my problems: I am using Sun's SUNWSpro C compiler to
build  the module, which is linked against the shared libsavi
library.  When executed this latter attempts to find the code for the
moddi3 function in the libraries available to it, can't, and so errors out
with the 'unreferenced symbol' error message I reported previously.

A simple test to try loading to check this is to fire up your Perl
as follows:

    perl -MSAVI -e exit

This should exit silently and cleanly.  However I was getting a failure
error message instead.

Paul Henson, author of, suggested that simply recompiling
after installing Sophos 3.74 cured the problem.  But this only works if you
are using GCC (as it notices the need for moddi3 and pulls a copy in from
the static libgcc.a library when compiling).  For me recompiling didn't
work, as I was using the SUNWSpro compiler, without libgcc being in the
standard search path.

I have been on the phone to Sophos, who have confirmed the problem and its

There are various solutions you can consider:-

Alternative 1
Use GCC to recompile after installing Sophos Anti-Virus 3.74 with
its updated libsavi shared library.  This should pull in the moddi3
function at compile-time and produce you a working version of

Alternative 2
If you can't/don't want to use GCC but have a copy of libgcc on your system
somewhere add its directory path and a "-l" option to the 'LIBS'
definitions in the Makefile.PL file when you're about to build
For example by adding something like this to its definition string:

    -L/usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2 -lgcc

(Of course you'll have to adjust the directory path to suit the location of
libgcc.a on your own system.)

Alternative 3
Don't use the standard Sophos Anti-Virus 3.74 kit from the web download or
CD.  Instead use the just-released 3.74x version, which apparently includes
a libsavi shared library built in the same manner as the 3.73 version, but
with most/all of the extras included in 3.74 standard.

I've been given the go-ahead to post to the list the URL from where 3.74x
can be downloaded:


I believe releases for other platforms can also be found there using the
usual download filenames at the end of the URL.  If you are using
MajorSophos you can merely change the WEBSITE variable's value.

By installing this version of Sophos Anti-Virus you DON'T need to include
the GCC library's path etc when building (because this version of
libsavi doesn't use the infamous moddi3 function).

Note: I understand that the problem will be resolved in a future monthly
release of Sophos Anti-Virus, so probably treat the above URL as transient
and existing only for the next few weeks.

I was going to go for Alternative 2, but just as I was about to build and
install things I got the e-mail from Sophos about 3.74x.  I've therefore
gone with Alternative 3, which is now running happily.


Mike Brudenell

The Computing Service, University of York, Heslington, York Yo10 5DD, UK
Tel:+44-1904-433811  FAX:+44-1904-433740

* Unsolicited commercial e-mail is NOT welcome at this e-mail address. *

More information about the MailScanner mailing list