Mailing List Archive

Errors making perl module File::Scan::ClamAV
Hope this is not too far off-topic, but any help would be much appreciated. Trying to get Perl to link to clamd. (Used to work on my old mail server, but Homebrew has changed locations).

I’ve installed ClamAV using Homebrew on a Mac.

% locate bin/clamd

I’ve edited Makefile.PL to start:

use ExtUtils::MakeMaker;

$ENV{CLAMD_PATH} ||= -e "/opt/homebrew/sbin/clamd" ?
"/opt/homebrew/sbin" : -e "/opt/homebrew/sbin/clamd" ?
"/opt/homebrew/sbin" : -e "/opt/homebrew/sbin/clamd" ?
"/usr/local/bin" : -e "/usr/bin/clamd" ?
"/usr/bin" : "$ENV{HOME}/bin";

my $help = `$ENV{CLAMD_PATH}/clamd --help 2>&1` || '';
if ($help !~ /clam/i) {
die "Cannot find clamd in $ENV{CLAMD_PATH} (or a number of other places)\n - are you sure clamav in installed?\n";

No problems creating the makefile, so it must find clamd:

% perl Makefile.PL
Generating a Unix-style Makefile
Writing Makefile for File::Scan::ClamAV
Writing MYMETA.yml and MYMETA.json

But when I run ‘make’ I get:

% make
Makefile:805: *** target file `Makefile' has both : and :: entries. Stop.

Line 805 of the makefile is (after the comments):

# --- MakeMaker makefile section:
# We take a very conservative approach here, but it's worth it.
# We move Makefile to Makefile.old here to avoid gnu make looping.

Any ideas what I’m doing wrong?

Thanks, James.