Subject: | OS X Tiger 10.4 Net::Pcap 0.13 build error: no -o in Makefile.PL? |
Date: | Tue, 29 Aug 2006 11:58:27 -0400 |
To: | bug-Net-Pcap [...] rt.cpan.org |
From: | Wesley Darlington <npb [...] yelsew.com> |
Trying to build Net::Pcap 0.13 on OS X Tiger.
$ perl -MConfig -e 'print "$Config{cc}\n"'
cc
$
Makefile.PL, around line 540:
} else { # Unix and Cygwin
my %ppopts = ( default => '-o', gcc => '-o', cc_r => '' );
my $ppopt = $ppopts{ $Config{cc} || 'default' };
eval { xsystem("$Config{cpprun} $options{INC} $options{DEFINE} $Config{cppflags} $header $ppopt $preprocessed") };
}
On my machine, $ppopt ends up empty, so the cc command doesn't make sense:
instead of writing output to $preprocessed, it ends up trying to compile
it. Which fails.
Maybe the %ppopts hash should also have: cc => '-o'
The code is a bit hairy, I'm not sure if that's the answer for the
general case. I just hardcoded a ">" into the eval line...!
eval { xsystem("$Config{cpprun} $options{INC} $options{DEFINE} $Config{cppflags} $header $ppopt > $preprocessed") };
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
Other info:
$ perl -v
This is perl, v5.8.6 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2004, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ uname -a
Darwin orange.local 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53 PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc
$ which perl
/usr/bin/perl
$
$ tar xzf Net-Pcap-0.13.tar.gz
$ cd Net-Pcap-0.13
$ perl Makefile.PL
looking for -lpcap... yes
checking for pcap_lib_version() in -lpcap... yes
trying to detect actually available functions...
error: system call to 'cc -E -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include find-funcs.h cpp-out.h' failed at Makefile.PL line 326.
$