Skip Menu |

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

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

People
Owner: SAPER [...] cpan.org
Requestors: corion [...] corion.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.07
Fixed in:
  • 0.08
  • 0.09



Date: Sun, 02 Oct 2005 19:31:26 +0200
From: Max Maischein <corion [...] corion.net>
To: bugs-net-pcap [...] rt.cpan.org
Subject: Net::Pcap 0.07 Makefile.PL overrides CFLAGS
Hello Sébastian, thank you for maintaining Net::Pcap! I'm just trying to get it to compile (and then work) on Win32 and I noticed that the Makefile.PL overrides the CFLAGS MakeMaker macro to '-Wall', which is very wrong when using MSVC, because MSVC doesn't know '-Wall' and it clobbers various #defines that are necessary on Win32. I have so far commented out the line in the Makefile.PL and now get the following compile errors - which is still bad, but a lot better than the 100+ errors before (see below). Thanks again for keeping the distribution current, -max C:\.cpan\build\Net-Pcap-0.07>nmake Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. C:\perl\5.8.5\bin\perl.exe C:\perl\5.8.5\lib\ExtUtils/xsubpp -typemap C:\perl\5.8.5\lib\Ext Utils\typemap -typemap typemap Pcap.xs > Pcap.xsc && C:\perl\5.8.5\bin\perl.exe -MExtUtils::Command -e mv Pcap.xsc Pcap.c cl -c -IC:\Programme\WinPcap\Include -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSO LE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSV CRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.07\" -DXS_VERSION=\"0.07\" "-IC:\perl\5.8.5\lib\ CORE" Pcap.c Pcap.c C:\Programme\Microsoft Visual C++ Toolkit 2003\include\malloc.h(123) : error C2059: syntax error : ' (' C:\Programme\Microsoft Visual C++ Toolkit 2003\include\malloc.h(124) : error C2059: syntax error : ' (' C:\Programme\Microsoft Visual C++ Toolkit 2003\include\malloc.h(125) : error C2059: syntax error : ' (' Pcap.xs(109) : error C2143: syntax error : missing ';' before 'type' Pcap.xs(110) : error C2143: syntax error : missing ';' before 'type' Pcap.xs(111) : error C2065: 'r' : undeclared identifier Pcap.xs(111) : warning C4047: 'function' : 'LPSTR' differs in levels of indirection from 'int' Pcap.xs(111) : error C2065: 'length' : undeclared identifier Pcap.xs(112) : warning C4047: 'function' : 'LPCSTR' differs in levels of indirection from 'int' Pcap.xs(113) : warning C4022: 'Perl_safesysfree' : pointer mismatch for actual parameter 1 Pcap.xs(275) : error C2143: syntax error : missing ';' before 'type' Pcap.xs(276) : error C2275: 'SV' : illegal use of this type as an expression C:\perl\5.8.5\lib\CORE\perl.h(1774) : see declaration of 'SV' Pcap.xs(276) : error C2065: 'err_sv' : undeclared identifier Pcap.xs(278) : error C2065: 'errbuf' : undeclared identifier Pcap.xs(278) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int' Pcap.xs(281) : warning C4047: 'function' : 'SV *' differs in levels of indirection from 'int' Pcap.xs(281) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int ' Pcap.xs(283) : warning C4047: '=' : 'int' differs in levels of indirection from 'SV *' Pcap.xs(286) : warning C4022: 'Perl_safesysfree' : pointer mismatch for actual parameter 1 Pcap.xs(299) : error C2143: syntax error : missing ';' before 'type' Pcap.xs(300) : error C2275: 'SV' : illegal use of this type as an expression C:\perl\5.8.5\lib\CORE\perl.h(1774) : see declaration of 'SV' Pcap.xs(302) : warning C4047: 'function' : 'char *' differs in levels of indirection from 'int' Pcap.xs(305) : warning C4047: 'function' : 'SV *' differs in levels of indirection from 'int' Pcap.xs(305) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int ' Pcap.xs(307) : warning C4047: '=' : 'int' differs in levels of indirection from 'SV *' Pcap.xs(310) : warning C4022: 'Perl_safesysfree' : pointer mismatch for actual parameter 1 Pcap.c(1156) : warning C4047: 'function' : 'PerlIO * ' differs in levels of indirection from 'FILE * ' NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
Date: Mon, 03 Oct 2005 11:48:39 +0200
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
To: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: [cpan #14881] Net::Pcap 0.07 Makefile.PL overrides CFLAGS
RT-Send-Cc:
Max Maischein via RT <bug-Net-Pcap@rt.cpan.org> wrote: Show quoted text
> Hello Sébastian, > > thank you for maintaining Net::Pcap! I'm just trying to get it to > compile (and then work) on Win32 and I noticed that the Makefile.PL > overrides the CFLAGS MakeMaker macro to '-Wall', which is very wrong > when using MSVC, because MSVC doesn't know '-Wall' and it clobbers > various #defines that are necessary on Win32.
Hello Max, Release 0.07 was indeed still very Unix-centric. The next release will include (among loads of bugfixes and new features) an improved detection code in Makefile.PL with several specific fixes for Win32 (ActivePerl and Cygwin) thanks to Jean-Louis Morel. The compatibility with older Perl (5.4, 5.5, 5.6) was also restored. Release 0.08 should happen RSN; we just need to polish a few things here and there and I upload it on CPAN, most probably in a few days. Regards -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
CFLAGS parameters are correctly handled since version 0.08 and version 0.09 provides compatibility with MSVC7. Thanks for your report and your help -- Close the world, txEn eht nepO.