Skip Menu |

This queue is for tickets about the Net-Pcap CPAN distribution.

Report information
The Basics
Id: 21219
Status: resolved
Priority: 0/
Queue: Net-Pcap

People
Owner: Nobody in particular
Requestors: npb [...] yelsew.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.14



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. $
Subject: Re: [rt.cpan.org #21219] OS X Tiger 10.4 Net::Pcap 0.13 build error: no -o in Makefile.PL?
Date: Wed, 30 Aug 2006 19:00:03 +0200
To: bug-Net-Pcap [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> 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") }; > }
Well spotted. The $ppopt affectation is wrong. The following tarball works on my OSX » http://www.maddingue.net/Net-Pcap-0.14_01.tar.gz $ perl -v This is perl, v5.8.6 built for darwin-thread-multi-2level $ perl -V:cc cc='cc'; Can you try it and confirm that it works for you? Thanks for reporting this bug -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #21219] OS X Tiger 10.4 Net::Pcap 0.13 build error: no -o in Makefile.PL?
Date: Wed, 30 Aug 2006 17:06:29 -0400
To: Sébastien Aperghis-Tramoni via RT <bug-Net-Pcap [...] rt.cpan.org>
From: Wesley Darlington <npb [...] yelsew.com>
On Wed, Aug 30, 2006 at 01:00:26PM -0400, Sébastien Aperghis-Tramoni via RT wrote: Show quoted text
> The following tarball works on my OSX > » http://www.maddingue.net/Net-Pcap-0.14_01.tar.gz > Can you try it and confirm that it works for you?
Yes, that worked. Good job. Thanks, Wesley. PS. This is what I typed to test it... perl Makefile.PL INC=-I/sw/include LIBS='-L/sw/lib -lpcap' && \ make && make test (Fink puts stuff under /sw, so that must be fink's pcap. There seems to be some pcap stuff under /Developer/SDKs/MacOSX10.4u.sdk/usr and also under /usr on this machine ... neither of which let Net::Pcap build, so I have to specify the pcap stuff under /sw/.)
Subject: Re: [rt.cpan.org #21219] OS X Tiger 10.4 Net::Pcap 0.13 build error: no -o in Makefile.PL?
Date: Thu, 31 Aug 2006 02:27:15 +0200
To: bug-Net-Pcap [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> Yes, that worked. Good job.
Thank you. Show quoted text
> PS. This is what I typed to test it... > perl Makefile.PL INC=-I/sw/include LIBS='-L/sw/lib -lpcap' && \ > make && make test > (Fink puts stuff under /sw, so that must be fink's pcap. There seems to > be some pcap stuff under /Developer/SDKs/MacOSX10.4u.sdk/usr and > also under /usr on this machine ... neither of which let Net::Pcap > build, so I have to specify the pcap stuff under /sw/.)
If you have a recent OSX, it should work with the system pcap library. Except that it looks like Apple has modified the /usr/include/pcap.h header to include functions like pcap_sendpacket() even though they are actually not provided by the library. I'll try to get this issue sorted for 0.14. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [rt.cpan.org #21219] tiny patch to make Net::Pcap 0.13 work
Date: Thu, 31 Aug 2006 19:57:09 +0200
To: Peter Koch <pk [...] DENIC.DE>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
[ answer CC'd to rt.cpan.org for archive ] Hello, Show quoted text
> thanks for maintaining Net::Pcap. I just downloaded version 0.13. To > "make" it successfully I had to apply the following patch to Makefile.PL > since my cpp (on MacOSX) wouldn't recognize the last argument as a > destnation file:
I was already been made aware of this problem. See ticket #21219: » http://rt.cpan.org/Ticket/Display.html?id=21219 This is a real stupid bug, but as Net::Pcap can't be compiled with the native pcap library from OSX.4, I haven't made a new release yet. I am working on a new way to detect the available functions, suggested by chromatic, that should be more robust. Anyway, thanks for reporting the bug and sending a patch. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [rt.cpan.org #21219] tiny patch to make Net::Pcap 0.13 work
Date: Thu, 31 Aug 2006 19:57:09 +0200
To: Peter Koch <pk [...] DENIC.DE>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
[ answer CC'd to rt.cpan.org for archive ] Hello, Show quoted text
> thanks for maintaining Net::Pcap. I just downloaded version 0.13. To > "make" it successfully I had to apply the following patch to Makefile.PL > since my cpp (on MacOSX) wouldn't recognize the last argument as a > destnation file:
I was already been made aware of this problem. See ticket #21219: » http://rt.cpan.org/Ticket/Display.html?id=21219 This is a real stupid bug, but as Net::Pcap can't be compiled with the native pcap library from OSX.4, I haven't made a new release yet. I am working on a new way to detect the available functions, suggested by chromatic, that should be more robust. Anyway, thanks for reporting the bug and sending a patch. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [rt.cpan.org #21219] Net-Pcap-0.13.tar.gz
Date: Fri, 01 Sep 2006 19:45:34 +0200
To: Christian Angerbjorn <christian [...] corsaire.com>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
[ answer CC'd to rt.cpan.org for archive ] Show quoted text
> just to let you know, it does not build on osx tiger.
I was already been made aware of this problem. See ticket #21219: » http://rt.cpan.org/Ticket/Display.html?id=21219 Thanks for reporting the bug. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [rt.cpan.org #21219] Net::Pcap 0.13 Problems
Date: Tue, 05 Sep 2006 00:45:46 +0200
To: Yuval Yaari <yuval [...] gentoo.org>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> First of all, it seems that Makefile.PL is missing a flag when running > gcc, attached is a patch against the Makefile.PL that comes with the > 0.13 release. Without it it just fails.
I guess that this happens because your gcc is installed as "cc", as it is the case under OSX. See ticket #21219: » http://rt.cpan.org/Ticket/Display.html?id=21219 Show quoted text
> Another thing is that podcover.t fails:
This is a little more surprising. I see no such failure on my Linux or on my OSX systems with Test::Pod::Coverage 1.08 and Pod::Coverage 0.18. Can you give me a little more information about your Perl and {,Test::}Pod::Coverage modules versions? Show quoted text
> Keep me posted, because we want to let Gentoo users install Net::Pcap > 0.13 :-)
Ok, as this seems to affect more than OSX where Net::Pcap is also b0rken because of the header Apple included, I'll release a new version with the corrected Makefile.PL and update this ticket. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [rt.cpan.org #21219] Net::Pcap 0.13 Problems
Date: Tue, 05 Sep 2006 01:50:12 +0200
To: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
From: Yuval Yaari <yuval [...] gentoo.org>
Sébastien Aperghis-Tramoni wrote: Show quoted text
>> First of all, it seems that Makefile.PL is missing a flag when running >> gcc, attached is a patch against the Makefile.PL that comes with the >> 0.13 release. Without it it just fails. >>
> > I guess that this happens because your gcc is installed as "cc", as it > is the case under OSX. See ticket #21219: > » http://rt.cpan.org/Ticket/Display.html?id=21219 >
Not cc, but it runs i686-pc-linux-gnu-gcc. Show quoted text
> This is a little more surprising. I see no such failure on my Linux or > on my OSX systems with Test::Pod::Coverage 1.08 and Pod::Coverage 0.18. > Can you give me a little more information about your Perl and > {,Test::}Pod::Coverage modules versions? >
Upgraded Pod::Coverage from 0.16 to 0.18 and it works now :-) --Yuval
CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [rt.cpan.org #21219] Net::Pcap 0.13 Problems
Date: Tue, 05 Sep 2006 01:17:45 +0200
To: Yuval Yaari <yuval [...] gentoo.org>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Show quoted text
> > I guess that this happens because your gcc is installed as "cc", as it > > is the case under OSX. See ticket #21219:
> > Not cc, but it runs i686-pc-linux-gnu-gcc.
Yes, a gentooist told me that. Show quoted text
> Upgraded Pod::Coverage from 0.16 to 0.18 and it works now :-)
Ok, I bumped the required version up to avoid this problem. Thanks for reporting this bug. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
RT-Send-CC: Yuval Yaari <yuval [...] gentoo.org>, Peter Koch <pk [...] DENIC.DE>, Christian Angerbjorn <christian [...] corsaire.com>
The compilation bug has been resolved with version 0.14, available on the CPAN. The problem related to the inconsistent pcap lib/header on OSX will be addressed in further release. -- Close the world, txEn eht nepO.