Mark,

>> After updating perl on my netbsd system, I encountered the same issue
>> with amavis indicating that Compress::Zlib was missing.  The error
>> message is somewhat misleading. The module exists, it just fails to load.
> 
> Right. I encountered such problems in the past. My simple attempt
> to produce a more informative diagnostics resulted in two lines
> in sub fetch_modules:

> 
>   printf STDERR ("fetch_modules: error loading module %s :\n%s\n", $_,
>                  join("\n", map {"> $_"} split(/\n/,$eval_stat)));
> 
> (or its variants) which I had to comment out, as it was either
> too chatty or failed to report relevant problem, like a module file
> being too strongly protected, so it was useless.
> 
> The original sin is in a perl's "require", which treats inaccessible
> files the same as missing files.
> 
> To do it right, a better alternative to 'require' is needed.
> 
> So here it is - a patch to amavisd (2.5.2) to produce a more
> meaningful diagnostics in case of compile errors in modules,
> or module files not being accessible. I'd be interested in a
> feedback if this is a viable solution for half-screwed systems -
> - for example in case of having two instances of a module in
> an @INC path and one of them is broken, my solution produces a
> proper diagnostics, while originally the broken module is ignored.

FYI:

I finally had a chance to install and try the patch (into 2.5.3 rather 
than 2.5.2).

The error messages I encountered were:

fetch_modules: error loading required module Compress/Zlib.pm:
   Error in file /usr/pkg/lib/perl5/vendor_perl/5.8.0/Compress/Zlib.pm: 
  is only avaliable with the XS version at 
/usr/pkg/lib/perl5/vendor_perl/5.8.0/Compress/Zlib.pm line 9
   BEGIN failed--compilation aborted at 
/usr/pkg/lib/perl5/vendor_perl/5.8.0/Compress/Zlib.pm line 9.
ERROR: MISSING REQUIRED BASIC MODULES:
   Compress::Zlib
BEGIN failed--compilation aborted at /usr/local/sbin/amavisd line 216.


However the actual problem is on line 9 of Compress/Zlib.pm, which 
happens to be:

    use Scalar::Util qw(dualvar);

It was Scalar::Util that needed to be rebuilt.  Once rebuilt, amavis 
started successfully.

Mike


> 
> 
> Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to