Subject: | Net::Pcap 0.16 doesn't build on Win32 with libpcap 1.0 |
Hi,
I'm trying to build Net::Pcap on Win32 with Strawberry Perl 5.10 and dmake, but it fails for me like the attached session. There only is one pcap.h on my machine, the one that belongs to the (one) installed Pcap library. I've copied the include and lib files into C:\Strawberry\c\include resp. C:\Strawberry\c\lib, where they get picked up.
I don't know how to proceed here, as this doesn't look like the "usual" Win32 failures. Could it be that Net::Pcap has a problem with current versions of libpcap?
-max
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>padre Makefile.PL
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>perl Makefile.PL INC=-IC:/Strawberry/C/inc "LIBS=-LC:/Strawberry/C/lib -lwpcap"
socket.h patched... ok
looking for -lwpcap... yes
checking for pcap_lib_version() in -lwpcap... yes
detecting available functions... ok
Writing Makefile for Net::Pcap
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>dmake
gcc -c -IC:/Strawberry/C/inc -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -D
PERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\" "-IC:\strawberry\perl\lib\CORE" -DWINSOCK2_H_REQUEST
ED -DWPCAP -DHAVE_REMOTE -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION Pcap.c
In file included from Pcap.xs:43:
stubs.inc:85:2: warning: #warning "the function pcap_findalldevs() is not available, but will be emulated"
In file included from Pcap.xs:43:
stubs.inc:91: error: redefinition of `struct pcap_if'
stubs.inc:113:2: warning: #warning "the function pcap_breakloop() is not available"
stubs.inc:127:2: warning: #warning "the function pcap_setnonblock() is not available"
stubs.inc:142:2: warning: #warning "the function pcap_getnonblock() is not available"
stubs.inc:157:2: warning: #warning "the function pcap_dump_file() is not available"
stubs.inc:172:2: warning: #warning "the function pcap_dump_flush() is not available"
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks() is not available"
stubs.inc:202:2: warning: #warning "the function pcap_set_datalink() is not available"
stubs.inc:217:2: warning: #warning "the function pcap_datalink_name_to_val() is not available"
stubs.inc:232:2: warning: #warning "the function pcap_datalink_val_to_name() is not available"
stubs.inc:247:2: warning: #warning "the function pcap_datalink_val_to_description() is not available"
stubs.inc:262:2: warning: #warning "the function pcap_compile_nopcap() is not available"
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
c:/strawberry//c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/pcap/pcap.h:319: error: previous declaration of 'pcap_compile_nopc
ap' was here
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
c:/strawberry//c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/pcap/pcap.h:319: error: previous declaration of 'pcap_compile_nopc
ap' was here
stubs.inc:277:2: warning: #warning "the function pcap_get_selectable_fd() is not available"
stubs.inc:292:2: warning: #warning "the function pcap_next_ex() is not available"
stubs.inc:307:2: warning: #warning "the function pcap_sendpacket() is not available"
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is not available"
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is not available"
stubs.inc:352:2: warning: #warning "the function pcap_open() is not available"
stubs.inc:357: error: redefinition of `struct pcap_rmtauth'
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not available"
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is not available"
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not available"
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is not available"
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc() is not available"
stubs.inc:438: error: redefinition of `struct pcap_send_queue'
stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destroy() is not available"
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue() is not available"
stubs.inc:484:2: warning: #warning "the function pcap_sendqueue_transmit() is not available"
stubs.inc:499:2: warning: #warning "the function pcap_event() is not available"
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is not available"
stubs.inc:519: error: redefinition of `struct pcap_samp'
Pcap.c: In function `XS_Net__Pcap_strerror':
Pcap.c:1572: warning: assignment discards qualifiers from pointer target type
dmake: Error code 129, while making 'Pcap.o'
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>
I'm trying to build Net::Pcap on Win32 with Strawberry Perl 5.10 and dmake, but it fails for me like the attached session. There only is one pcap.h on my machine, the one that belongs to the (one) installed Pcap library. I've copied the include and lib files into C:\Strawberry\c\include resp. C:\Strawberry\c\lib, where they get picked up.
I don't know how to proceed here, as this doesn't look like the "usual" Win32 failures. Could it be that Net::Pcap has a problem with current versions of libpcap?
-max
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>padre Makefile.PL
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>perl Makefile.PL INC=-IC:/Strawberry/C/inc "LIBS=-LC:/Strawberry/C/lib -lwpcap"
socket.h patched... ok
looking for -lwpcap... yes
checking for pcap_lib_version() in -lwpcap... yes
detecting available functions... ok
Writing Makefile for Net::Pcap
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>dmake
gcc -c -IC:/Strawberry/C/inc -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -D
PERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\" "-IC:\strawberry\perl\lib\CORE" -DWINSOCK2_H_REQUEST
ED -DWPCAP -DHAVE_REMOTE -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION Pcap.c
In file included from Pcap.xs:43:
stubs.inc:85:2: warning: #warning "the function pcap_findalldevs() is not available, but will be emulated"
In file included from Pcap.xs:43:
stubs.inc:91: error: redefinition of `struct pcap_if'
stubs.inc:113:2: warning: #warning "the function pcap_breakloop() is not available"
stubs.inc:127:2: warning: #warning "the function pcap_setnonblock() is not available"
stubs.inc:142:2: warning: #warning "the function pcap_getnonblock() is not available"
stubs.inc:157:2: warning: #warning "the function pcap_dump_file() is not available"
stubs.inc:172:2: warning: #warning "the function pcap_dump_flush() is not available"
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks() is not available"
stubs.inc:202:2: warning: #warning "the function pcap_set_datalink() is not available"
stubs.inc:217:2: warning: #warning "the function pcap_datalink_name_to_val() is not available"
stubs.inc:232:2: warning: #warning "the function pcap_datalink_val_to_name() is not available"
stubs.inc:247:2: warning: #warning "the function pcap_datalink_val_to_description() is not available"
stubs.inc:262:2: warning: #warning "the function pcap_compile_nopcap() is not available"
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
c:/strawberry//c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/pcap/pcap.h:319: error: previous declaration of 'pcap_compile_nopc
ap' was here
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
c:/strawberry//c/bin/../lib/gcc/mingw32/3.4.5/../../../../include/pcap/pcap.h:319: error: previous declaration of 'pcap_compile_nopc
ap' was here
stubs.inc:277:2: warning: #warning "the function pcap_get_selectable_fd() is not available"
stubs.inc:292:2: warning: #warning "the function pcap_next_ex() is not available"
stubs.inc:307:2: warning: #warning "the function pcap_sendpacket() is not available"
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is not available"
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is not available"
stubs.inc:352:2: warning: #warning "the function pcap_open() is not available"
stubs.inc:357: error: redefinition of `struct pcap_rmtauth'
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not available"
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is not available"
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not available"
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is not available"
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc() is not available"
stubs.inc:438: error: redefinition of `struct pcap_send_queue'
stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destroy() is not available"
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue() is not available"
stubs.inc:484:2: warning: #warning "the function pcap_sendqueue_transmit() is not available"
stubs.inc:499:2: warning: #warning "the function pcap_event() is not available"
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is not available"
stubs.inc:519: error: redefinition of `struct pcap_samp'
Pcap.c: In function `XS_Net__Pcap_strerror':
Pcap.c:1572: warning: assignment discards qualifiers from pointer target type
dmake: Error code 129, while making 'Pcap.o'
C:\strawberry\cpan\build\Net-Pcap-0.16-UsJ4ct>