Subject: | bug in pcapinfo: undef sub pcap_close @ line 55 |
Date: | Fri, 04 Nov 2016 17:02:29 -0700 |
To: | bug-Net-Pcap [...] rt.cpan.org |
From: | "L.A. Walsh" <perl-diddler [...] tlinx.org> |
Tried latest version (18)...
w/perl 5.16.3.
Show quoted text
> sudo pcapinfo
Host information
----------------
Hostname : Ishtar
Aliases : Bliss ishtar Ishtar.sc.tlinx.org
Pcap version : libpcap version 1.6.2
Devices information
-------------------
Device eth0 (default)
Description : No description available
Undefined subroutine &main::pcap_close called at /usr/bin/pcapinfo line 55.
----
Looking in the module, I see no definition for pcap_close, though it
was mentioned in the documentation... ???
First ran cpan-install as normal user, but noticed most tests
say they need root -- so I tried it as root and the module
failed to install (log follows):
CPAN: CPAN::SQLite loaded ok (v0.204)
Database was generated on Fri, 04 Nov 2016 23:56:39 GMT
CPAN: Module::CoreList loaded ok (v5.20150520)
Running test for module 'Net::Pcap'
CPAN: Digest::SHA loaded ok (v5.95)
CPAN: Compress::Zlib loaded ok (v2.068)
Checksum for
/Share/CPAN/sources/authors/id/S/SA/SAPER/Net-Pcap-0.18.tar.gz ok
CPAN: File::Temp loaded ok (v0.2304)
CPAN: YAML::XS loaded ok (v0.59)
CPAN: CPAN::Meta::Requirements loaded ok (v2.133)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
Configuring S/SA/SAPER/Net-Pcap-0.18.tar.gz with Makefile.PL
CPAN: CPAN::Reporter loaded ok (v1.2014)
looking for -lpcap... yes
checking for pcap_lib_version() in -lpcap... yes
detecting available functions... ok
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::Pcap
Writing MYMETA.yml and MYMETA.json
(/usr/bin/perl Makefile.PL exited with 0)
CPAN::Reporter: Makefile.PL result is 'pass', No errors.
SAPER/Net-Pcap-0.18.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for S/SA/SAPER/Net-Pcap-0.18.tar.gz
"/usr/bin/perl" "/home/perl/perl-5.16.3/lib/site/ExtUtils/xsubpp"
-typemap "/home/perl/perl-5.16.3/lib/ExtUtils/typemap" -typemap
"typemap" Pcap.xs > Pcap.xsc && mv Pcap.xsc Pcap.c
Running Mkbootstrap for Net::Pcap ()
cp bin/pcapinfo blib/script/pcapinfo
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/pcapinfo
chmod 644 "Pcap.bs"
cp Pcap.pm blib/lib/Net/Pcap.pm
gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall
-Wwrite-strings -g -O2 -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\" -fPIC
"-I/home/perl/perl-5.16.3/lib/x86_64-linux-thread-multi-ld/CORE"
-DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_BREAKLOOP
-DHAVE_PCAP_COMPILE_NOPCAP -DHAVE_PCAP_DATALINK_NAME_TO_VAL
-DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION -DHAVE_PCAP_DATALINK_VAL_TO_NAME
-DHAVE_PCAP_DUMP_FILE -DHAVE_PCAP_DUMP_FLUSH -DHAVE_PCAP_FINDALLDEVS
-DHAVE_PCAP_GETNONBLOCK -DHAVE_PCAP_GET_SELECTABLE_FD
-DHAVE_PCAP_LIB_VERSION -DHAVE_PCAP_NEXT_EX -DHAVE_PCAP_OFFLINE_FILTER
-DHAVE_PCAP_OPEN_DEAD -DHAVE_PCAP_SENDPACKET -DHAVE_PCAP_SETNONBLOCK
-DHAVE_PCAP_SET_DATALINK Pcap.c
In file included from Pcap.xs:43:0:
stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks()
is not available" [-Wcpp]
#warning "the function pcap_list_datalinks() is not available"
^
stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() is
not available" [-Wcpp]
#warning "the function pcap_createsrcstr() is not available"
^
stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is
not available" [-Wcpp]
#warning "the function pcap_parsesrcstr() is not available"
^
stubs.inc:352:2: warning: #warning "the function pcap_open() is not
available" [-Wcpp]
#warning "the function pcap_open() is not available"
^
stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not
available" [-Wcpp]
#warning "the function pcap_setbuff() is not available"
^
stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() is
not available" [-Wcpp]
#warning "the function pcap_setuserbuffer() is not available"
^
stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not
available" [-Wcpp]
#warning "the function pcap_setmode() is not available"
^
stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() is
not available" [-Wcpp]
#warning "the function pcap_setmintocopy() is not available"
^
stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc()
is not available" [-Wcpp]
#warning "the function pcap_sendqueue_alloc() is not available"
^
stubs.inc:455:2: warning: #warning "the function
pcap_sendqueue_destroy() is not available" [-Wcpp]
#warning "the function pcap_sendqueue_destroy() is not available"
^
stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue()
is not available" [-Wcpp]
#warning "the function pcap_sendqueue_queue() is not available"
^
stubs.inc:484:2: warning: #warning "the function
pcap_sendqueue_transmit() is not available" [-Wcpp]
#warning "the function pcap_sendqueue_transmit() is not available"
^
stubs.inc:499:2: warning: #warning "the function pcap_event() is not
available" [-Wcpp]
#warning "the function pcap_event() is not available"
^
stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is
not available" [-Wcpp]
#warning "the function pcap_setsampling() is not available"
^
Pcap.c: In function ‘XS_Net__Pcap_strerror’:
Pcap.c:1679:9: warning: assignment discards ‘const’ qualifier from
pointer target type
RETVAL = pcap_strerror(error);
^
Pcap.xs: In function ‘XS_Net__Pcap_getevent’:
Pcap.xs:1038:13: warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
h = (unsigned int) pcap_getevent(p);
^
rm -f blib/arch/auto/Net/Pcap/Pcap.so
LD_RUN_PATH="/usr/lib64" gcc -shared -g -O2 -fstack-protector -fPIC
Pcap.o -o blib/arch/auto/Net/Pcap/Pcap.so \
-lpcap \
chmod 755 blib/arch/auto/Net/Pcap/Pcap.so
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pcap.bs
blib/arch/auto/Net/Pcap/Pcap.bs 644
Manifying 1 pod document
Manifying 1 pod document
(/usr/bin/make -j -j exited with 0)
CPAN::Reporter: make result is 'pass', No errors.
SAPER/Net-Pcap-0.18.tar.gz
/usr/bin/make -j -j -- OK
Running make test
Running Mkbootstrap for Net::Pcap ()
chmod 644 "Pcap.bs"
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM"
"-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
# Testing Net::Pcap 0.18 (libpcap version 1.6.2) under Perl 5.016003
t/00-load.t ................ ok
t/01-api.t ................. ok
t/02-lookup.t .............. ok
t/03-openlive.t ............ ok
t/04-loop.t ................ ok
t/05-dump.t ................ ok
t/06-offline.t ............. ok
t/07-stats.t ............... ok
t/08-filter.t .............. ok
t/09-error.t ............... ok
t/10-fileno.t .............. ok
t/11-snapshot.t ............ ok
t/12-next.t ................ skipped: pcap_next() behaves too strangely
for being tested on random machines
t/13-dispatch.t ............ ok
t/14-datalink.t ............ ok
# This platform has been detected as a little endian architecture
t/15-is_swapped.t .......... ok
t/16-setnonblock.t ......... ok
# libpcap version 1.6.2
t/17-lib_version.t ......... ok
t/18-open_dead.t ........... ok
# Failed test 'half the packets processed'
# at t/19-breakloop.t line 55.
# got: '8'
# expected: '5'
# Looks like you failed 1 test of 5.
t/19-breakloop.t ...........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests
t/20-constants.t ........... ok
t/21-next_ex.t ............. skipped: slowness and random failures...
testing pcap_next_ex() is a PITA
t/22-open.t ................ skipped: pcap_open() is not available
t/23-srcstr.t .............. skipped: pcap_createsrcstr() is not available
t/50-anyevent-pcap.t ....... skipped: AnyEvent::Pcap is not available
t/50-net-pcap-easy.t ....... skipped: Net::Pcap::Easy is not available
t/50-poe-component-pcap.t .. skipped: POE::Component::Pcap is not available
t/distchk.t ................ ok
t/pod.t .................... ok
t/podcover.t ............... skipped: Currently not working for Net::Pcap
t/podspell.t ............... skipped: Pod spelling: for maintainer only
t/portfs.t ................. skipped: Only for the module maintainer
Test Summary Report
-------------------
t/06-offline.t (Wstat: 0 Tests: 403 Failed: 0)
TODO passed: 398
t/07-stats.t (Wstat: 0 Tests: 134 Failed: 0)
TODO passed: 55, 68, 94
t/10-fileno.t (Wstat: 0 Tests: 21 Failed: 0)
TODO passed: 19
t/19-breakloop.t (Wstat: 256 Tests: 5 Failed: 1)
Failed test: 5
Non-zero exit status: 1
Files=32, Tests=1516, 54 wallclock secs ( 0.30 usr 0.08 sys + 1.84
cusr 0.52 csys = 2.74 CPU)
Result: FAIL
Failed 1/32 test programs. 1/1516 subtests failed.
Makefile:1053: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
(/usr/bin/make test exited with 512)
CPAN::Reporter: Test result is 'fail', One or more tests failed.
CPAN::Reporter: preparing a CPAN Testers report for Net-Pcap-0.18
CPAN::Reporter: this appears to be a duplicate report for the test phase:
FAIL Net-Pcap-0.18 x86_64-linux-thread-multi-ld 3.12.0-isht-van
Test report will not be sent.
SAPER/Net-Pcap-0.18.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SAPER/Net-Pcap-0.18.tar.gz