Unable to install Net::Pcap

407 views
Skip to first unread message

Bob McConnell

unread,
May 24, 2010, 4:36:44 PM5/24/10
to came...@googlegroups.com
I reinstalled Camelbox this afternoon, and am still unable to install
Net::Pcap, nor will it update cpan. For Pcap, it tells me I don't have
the WinPcap developer pack or don't have it in the standard location.
When I went to get that I downloaded a zip file with no instructions on
where the standard location would be. Where does it go?

For CPAN, I get the test report shown below.

What am I missing?

Bob McConnell


Failed Test Stat Wstat Total Fail List of Failed
------------------------------------------------------------------------
------
t/31sessions.t 1 256 68 1 68
6 tests skipped.
Failed 1/20 test scripts. 1/357 subtests failed.
Files=20, Tests=357, 82 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00
CPU)
Failed 1/20 test programs. 1/357 subtests failed.
dmake.EXE: Error code 255, while making 'test_dynamic'
ANDK/CPAN-1.9402.tar.gz
C:\camelbox\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try:
reports ANDK/CPAN-1.9402.tar.gz
Running make install
make test had returned bad status, won't install without force

--
You received this message because you are subscribed to the Google Groups "camelbox" group.
To post to this group, send email to came...@googlegroups.com.
To unsubscribe from this group, send email to camelbox+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/camelbox?hl=en.

Brian Manning

unread,
May 24, 2010, 5:27:58 PM5/24/10
to came...@googlegroups.com
On Mon, May 24, 2010 at 1:36 PM, Bob McConnell <r...@cbord.com> wrote:
> I reinstalled Camelbox this afternoon, and am still unable to install
> Net::Pcap, nor will it update cpan. For Pcap, it tells me I don't have
> the WinPcap developer pack or don't have it in the standard location.
> When I went to get that I downloaded a zip file with no instructions on
> where the standard location would be. Where does it go?

Did you check the README file for Net::Pcap?

http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/README

Hint: You add flags when you execute 'perl Makefile.PL'.

> For CPAN, I get the test report shown below.
> Failed 1/20 test programs. 1/357 subtests failed.
> dmake.EXE:  Error code 255, while making 'test_dynamic'
>  ANDK/CPAN-1.9402.tar.gz
>  C:\camelbox\bin\dmake.EXE test -- NOT OK

Could you report problems one per e-mail please? Makes it easier for
people (namely me) to find things later on.

I googled "dmake.EXE: Error code 255, while making 'test_dynamic'"
and came up with a lot of hits. If I crank up the debugging in
31sessions.t, the test file with the issue, this is what I get:

t/31sessions...........ok 70/72# Failed test 'cmd[o conf init urllist
# y
# 8
# 4 2
# ]'
# at t/31sessions.t line 363.
# 'Configuration does not allow connecting to the internet.

I don't have any idea why this test would fail on Windows with dmake.
Have you filed a bug on CPAN against it yet?

Thanks,

Brian

Bob McConnell

unread,
May 24, 2010, 6:51:58 PM5/24/10
to came...@googlegroups.com
From: Brian Manning

> On Mon, May 24, 2010 at 1:36 PM, Bob McConnell <r...@cbord.com> wrote:
>> I reinstalled Camelbox this afternoon, and am still unable to install
>> Net::Pcap, nor will it update cpan. For Pcap, it tells me I don't have
>> the WinPcap developer pack or don't have it in the standard location.
>> When I went to get that I downloaded a zip file with no instructions on
>> where the standard location would be. Where does it go?
>
> Did you check the README file for Net::Pcap?
>
> http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/README
>
> Hint: You add flags when you execute 'perl Makefile.PL'.

I hadn't seen that file, and I don't enter that line, I entered 'cpan Net::Pcap' to get that far and I don't believe that will accept any flags. Would there be a problem with Wireshark and its WinPcap already installed?

>> For CPAN, I get the test report shown below.
>> Failed 1/20 test programs. 1/357 subtests failed.
>> dmake.EXE:  Error code 255, while making 'test_dynamic'
>>  ANDK/CPAN-1.9402.tar.gz
>>  C:\camelbox\bin\dmake.EXE test -- NOT OK
>
> Could you report problems one per e-mail please? Makes it easier for
> people (namely me) to find things later on.

Sorry, I was in a hurry. I was supposed to have a utiltiy to read a pair of pcap files working today. But that ain't gonna happen now.

> I googled "dmake.EXE: Error code 255, while making 'test_dynamic'"
> and came up with a lot of hits. If I crank up the debugging in
> 31sessions.t, the test file with the issue, this is what I get:
>
> t/31sessions...........ok 70/72# Failed test 'cmd[o conf init urllist
> # y
> # 8
> # 4 2
> # ]'
> # at t/31sessions.t line 363.
> # 'Configuration does not allow connecting to the internet.
>
> I don't have any idea why this test would fail on Windows with dmake.
> Have you filed a bug on CPAN against it yet?

I'm not convinced that it is a bug. I still suspect a missing dependency. But that looks a lot like one of the errors that flashed by while it was running those tests.

Bob McConnell

Brian Manning

unread,
May 24, 2010, 7:14:03 PM5/24/10
to came...@googlegroups.com
On Mon, May 24, 2010 at 3:51 PM, Bob McConnell <r...@cbord.com> wrote:
> From: Brian Manning
>> Did you check the README file for Net::Pcap?
>>
>> http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/README
>>
>> Hint: You add flags when you execute 'perl Makefile.PL'.
>
> I hadn't seen that file, and I don't enter that line, I entered 'cpan Net::Pcap' to get that far and I don't believe that will accept any flags. Would there be a problem with Wireshark and its WinPcap already installed?

I think compiling Net::Pcap will work if you specify the
library/header directories as per the README file. Note that if you
have any spaces in your paths, you're going to have to do funny things
with quotes to make both the cmd.exe shell and Perl happy.

It might be easier to copy the WinPcap files into the Camelbox tree,
libraries in C:\Camelbox\bin and header files in to
C:\Camelbox\include. But I'll let you make that choice.

>> I don't have any idea why this test would fail on Windows with dmake.
>> Have you filed a bug on CPAN against it yet?
>
> I'm not convinced that it is a bug. I still suspect a missing dependency. But that looks a lot like one of the errors that flashed by while it was running those tests.

What do you think is missing then?

Thanks,

Brian

Bob McConnell

unread,
May 25, 2010, 10:05:00 AM5/25/10
to came...@googlegroups.com
From: Brian Manning
> On Mon, May 24, 2010 at 3:51 PM, Bob McConnell <r...@cbord.com> wrote:
>> From: Brian Manning
>>> Did you check the README file for Net::Pcap?
>>>
>>> http://cpansearch.perl.org/src/SAPER/Net-Pcap-0.16/README
>>>
>>> Hint: You add flags when you execute 'perl Makefile.PL'.
>>
>> I hadn't seen that file, and I don't enter that line, I entered
> 'cpan Net::Pcap' to get that far and I don't believe that will
> accept any flags. Would there be a problem with Wireshark and its
> WinPcap already installed?
>
> I think compiling Net::Pcap will work if you specify the
> library/header directories as per the README file. Note that if you
> have any spaces in your paths, you're going to have to do funny things
> with quotes to make both the cmd.exe shell and Perl happy.
>
> It might be easier to copy the WinPcap files into the Camelbox tree,
> libraries in C:\Camelbox\bin and header files in to
> C:\Camelbox\include. But I'll let you make that choice.

I tried copying those files, but still no joy. Unless I messed up the
parameters. I have tried several variations for both paths, but can't
find anything that works. This version produces the fewest errors, but
it looks like there are several pieces still missing. Sorry about the
broken lines, but this is running in a basic 80x24 DOS window.

-----8<---------------------------------------------------------
C:\camelbox\.cpan\build\Net-Pcap-0.16-SEnu84>perl Makefile.pl
INC=-IC:/camelbox/
include/pcap LIBS="-LC:/camelbox/lib -llibwpcap"
socket.h patched... ok
looking for -lwpcap... yes
checking for pcap_lib_version() in -lwpcap... yes
detecting available functions... ok
Note (probably harmless): No library found for -lmsvcrt
Note (probably harmless): No library found for -lmoldname
Note (probably harmless): No library found for -lkernel32
Note (probably harmless): No library found for -luser32
Note (probably harmless): No library found for -lgdi32
Note (probably harmless): No library found for -lwinspool
Note (probably harmless): No library found for -lcomdlg32
Note (probably harmless): No library found for -ladvapi32
Note (probably harmless): No library found for -lshell32
Note (probably harmless): No library found for -lole32
Note (probably harmless): No library found for -loleaut32
Note (probably harmless): No library found for -lnetapi32
Note (probably harmless): No library found for -luuid
Note (probably harmless): No library found for -lws2_32
Note (probably harmless): No library found for -lmpr
Note (probably harmless): No library found for -lwinmm
Note (probably harmless): No library found for -lversion
Note (probably harmless): No library found for -lodbc32
Note (probably harmless): No library found for -lodbccp32
Writing Makefile for Net::Pcap

C:\camelbox\.cpan\build\Net-Pcap-0.16-SEnu84>dmake
gcc -c -IC:/camelbox/include/pcap -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
-DPERL_
IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing
-DPERL_MSVCRT_READFIX
-s -O2 -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\"
"-IC:\camelbox\lib\CORE"
-DWINSOCK2_H_REQUESTED -DWPCAP -DHAVE_REMOTE -DHAVE_BLANK
-DHAVE_PCAP_LIB_VERSI
ON Pcap.c
In file included from Pcap.xs:43:
stubs.inc:85:2: warning: #warning "the function pcap_findalldevs() is
not availa
ble, but will be emulated"
In file included from Pcap.xs:43:
stubs.inc:90: error: redefinition of typedef 'pcap_if_t'
C:/camelbox/include/pcap/pcap.h:89: error: previous declaration of
'pcap_if_t' w
as here
stubs.inc:91: error: redefinition of `struct pcap_if'
stubs.inc:113:2: warning: #warning "the function pcap_breakloop() is not
availab
le"
stubs.inc:127:2: warning: #warning "the function pcap_setnonblock() is
not avail
able"
stubs.inc:142:2: warning: #warning "the function pcap_getnonblock() is
not avail
able"
stubs.inc:157:2: warning: #warning "the function pcap_dump_file() is not
availab
le"
stubs.inc:172:2: warning: #warning "the function pcap_dump_flush() is
not availa
ble"
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks()
is not av
ailable"
stubs.inc:202:2: warning: #warning "the function pcap_set_datalink() is
not avai
lable"
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_descriptio
n() is not available"
stubs.inc:262:2: warning: #warning "the function pcap_compile_nopcap()
is not av
ailable"
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
C:/camelbox/include/pcap/pcap.h:319: error: previous declaration of
'pcap_compil
e_nopcap' was here
stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
C:/camelbox/include/pcap/pcap.h:319: error: previous declaration of
'pcap_compil
e_nopcap' 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 availa
ble"
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is
not avai
lable"
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is
not avail
able"
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 ava
ilable"
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 avai
lable"
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc()
is not a
vailable"
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 a
vailable"
stubs.inc:484:2: warning: #warning "the function
pcap_sendqueue_transmit() is no
t 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 avail
able"
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'

Brian Manning

unread,
May 29, 2010, 9:23:05 PM5/29/10
to came...@googlegroups.com
On Tue, May 25, 2010 at 7:05 AM, Bob McConnell <r...@cbord.com> wrote:
> From: Brian Manning

These are the problems here:

> stubs.inc:90: error: redefinition of typedef 'pcap_if_t'
> C:/camelbox/include/pcap/pcap.h:89: error: previous declaration of
> 'pcap_if_t' w
> as here
> stubs.inc:91: error: redefinition of `struct pcap_if'

> stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
> C:/camelbox/include/pcap/pcap.h:319: error: previous declaration of
> 'pcap_compil
> e_nopcap' was here
> stubs.inc:267: error: conflicting types for 'pcap_compile_nopcap'
> C:/camelbox/include/pcap/pcap.h:319: error: previous declaration of
> 'pcap_compil
> e_nopcap' was here

> stubs.inc:357: error: redefinition of `struct pcap_rmtauth'

> stubs.inc:438: error: redefinition of `struct pcap_send_queue'

> stubs.inc:519: error: redefinition of `struct pcap_samp'

If you go into stubs.inc and comment out all of the struct definitions
mentioned above, the Net::Pcap XS binary will compile and you'll be
able to use the sample program 'pcapdump' to capture packets. Note
that pcapdump is dependent on a few external modules, one of which,
NetPacket, will need to be force installed as it fails it's tests.

Thanks,

Brian

Reply all
Reply to author
Forward
0 new messages