Date: Thu, 6 Feb 2003 14:54:18 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: More SpamAssassin questions - it won't run. Message-ID: <20030206145418.GE53194@happy-idiot-talk.infracaninophi> In-Reply-To: <20030206133633.GA9663@keyslapper.org> References: <20030206041925.GA96790@keyslapper.org> <20030206093900.GC53194@happy-idiot-talk.infracaninophi> <20030206133633.GA9663@keyslapper.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 06, 2003 at 08:36:34AM -0500, Louis LeBlanc wrote: > On 02/06/03 09:39 AM, Matthew Seaman sat at the `puter and typed: > > On Wed, Feb 05, 2003 at 11:19:26PM -0500, Louis LeBlanc wrote: > > > > > Here's what I see in the procmail output: > > > procmail: Executing "spamassassin,-a,-P" > > > Can't locate object method "splitpath" via package "File::Spec" at /usr/local/bin/spamassassin line 18. > > > BEGIN failed--compilation aborted at /usr/local/bin/spamassassin line 38. > > > procmail: Program failure (2) of "spamassassin" > > > procmail: Rescue of unfiltered data succeeded > > > > > > I know this is some kind of perl error, but I'm still quite a ways > > > from guru status where that's concerned. I've tried a few things, but > > > I can't get this working. > > > > You're using perl-5.005.03 as bundled with FreeBSD, and consequently > > an older version of the File::Spec module. That's something that > > keeps popping up in various places. > > > > You can tell what version of File::Spec you're using by: > > > > % perl -MFile::Spec -e 'print "$File::Spec::VERSION\n";' > > This tells me that I'm running 0.6, but pkg_info confirms that I have > the 0.82 port installed. The spamassassin port does require the > p5-File-Spec port, but doesn't seem to use it. > > > I can tell you that spamassassin works without complaint using version > > 0.82 (as bundled with perl-5.6.1) or version 0.83 (as bundled with > > perl-5.8.0). > > > > You can install the devel/p5-File-Spec port to get version 0.82 for > > the bundled perl, which should sort things out for you. > > Somehow I don't think that's quite enough. I tried Adrian's > suggestion and modified the use statement as follows: > use File::Spec 0.82; > > But that didn't really help, now I get this: > > procmail: Executing "spamassassin,-a,-P" > File::Spec version 0.82 required--this is only version 0.6 at > /usr/local/bin/spamassassin line 6. > BEGIN failed--compilation aborted at /usr/local/bin/spamassassin line 6. > procmail: [10564] Thu Feb 6 08:26:02 2003 > procmail: Program failure (255) of "spamassassin" > procmail: Rescue of unfiltered data succeeded > > Next, I decided to reinstall the port, and I noticed the following: > > Writing > /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/File/Spec/.packlist > ## Differing version of File/Spec.pm found. You might like to > rm /usr/libdata/perl/5.00503/File/Spec.pm > ## Differing version of File/Spec/Mac.pm found. You might like to > rm /usr/libdata/perl/5.00503/File/Spec/Mac.pm > ## Differing version of File/Spec/OS2.pm found. You might like to > rm /usr/libdata/perl/5.00503/File/Spec/OS2.pm > ## Differing version of File/Spec/Unix.pm found. You might like to > rm /usr/libdata/perl/5.00503/File/Spec/Unix.pm > ## Differing version of File/Spec/VMS.pm found. You might like to > rm /usr/libdata/perl/5.00503/File/Spec/VMS.pm > ## Differing version of File/Spec/Win32.pm found. You might like to > rm /usr/libdata/perl/5.00503/File/Spec/Win32.pm > ## Running 'make install UNINST=1' will unlink all those files for you. > Appending installation info to /usr/local/lib/perllocal.pod > > What's the danger of uninstalling these? Presumably most of what > works with 0.6 should work with 0.82, right? Should UNINST=1 always > be used? Never? If I do remove a perl module that's part of the base > distribution, and something breaks, how would I go about replacing it? UNINST=1 will fix the problem only until the next time you do a {build,install}world, when the bundled File::Spec module will reappear. Plus it's not obvious how to get the port system to apply it when installing a perl module. The problem is that the location of the updated port is lower down perl's library search path than the standard libraries. You can see the search path by: % perl -e 'print join("\n", @INC), "\n";' You can prepend directories to the search path by setting PERL5LIB or PERLLIB in the environment. eg. try: env PERL5LIB=/usr/local/lib/perl5/site_perl/5.005 spamassassin ... and see if that lets you find the up to date File::Spec module before the old one. You can achieve much the same effect from within perl by inserting: BEGIN { unshift @INC, "/usr/local/lib/perl5/site_perl/5.005"; } at the top of the script, before any of the 'use ...' lines. About the only other alternative is to install one of perl ports, which have a sufficiently up to date File::Spec module anyhow. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030206145418.GE53194>