Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Need help compiling Net::Pcap on Ubuntu 8.04

by bpa (Novice)
on Jul 21, 2008 at 22:10 UTC ( #699169=perlquestion: print w/replies, xml ) Need Help??

bpa has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I have been trying to install the Net::Packet module on Ubuntu 8.04 Hardy Heron with the intent of being able to use this module to create, view, and disect both IPv4 and IPv6 packets. I ran into one small snag with using the module in slackware in that it didn't play nicely with sending an IPv6 packet (maybe because it is BSD based?), so I decided to try Ubuntu. Anyway, I have gone through a recursive series of dependency installs, and I am currently on the module Net::Pcap. I have perl version 5.8.8 and I have the following Ubuntu packages installed:

UPDATE: I now have libpcap0.8-dev installed instead of libpcap0.7-dev. The below pacakages are correct as far as what I have installed now on Ubuntu.

libnet1
libnet1-dev
libpcap0.7
libpcap0.8
libpcap0.8-dev
libnet-pcap-perl

I cannot get past the make stage of installing Net::Pcap0.14, or Net::Pcap0.16 however. Any help will be greatly appreciated. The following is the output from version 0.14 when running "sudo make":

UPDATE: The new output with the libpcap0.8-dev package installed is:

cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-s +trict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE +_OFFSET_BITS=64 -O2 -DVERSION=\"0.14\" -DXS_VERSION=\"0.14\" -fPIC +"-I/usr/lib/perl/5.8/CORE" -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -DHA +VE_PCAP_BREAKLOOP -DHAVE_PCAP_COMPILE_NOPCAP -DHAVE_PCAP_DATALINK_NAM +E_TO_VAL -DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION -DHAVE_PCAP_DATALINK +_VAL_TO_NAME -DHAVE_PCAP_DUMP_FILE -DHAVE_PCAP_DUMP_FLUSH -DHAVE_PCAP +_DUMP_FOPEN -DHAVE_PCAP_DUMP_FTELL -DHAVE_PCAP_FINDALLDEVS -DHAVE_PCA +P_FOPEN_OFFLINE -DHAVE_PCAP_FREEALLDEVS -DHAVE_PCAP_GETNONBLOCK -DHAV +E_PCAP_GET_SELECTABLE_FD -DHAVE_PCAP_INJECT -DHAVE_PCAP_LIB_VERSION - +DHAVE_PCAP_LIST_DATALINKS -DHAVE_PCAP_NEXT_EX -DHAVE_PCAP_OPEN_DEAD - +DHAVE_PCAP_SENDPACKET -DHAVE_PCAP_SETDIRECTION -DHAVE_PCAP_SETNONBLOC +K -DHAVE_PCAP_SET_DATALINK Pcap.c In file included from Pcap.xs:43: stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() i +s 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 av +ailable" 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() i +s not available" stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc( +) is not available" stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destro +y() 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_transm +it() is not available" stubs.inc:499:2: warning: #warning "the function pcap_event() is not a +vailable" stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is + not available" Pcap.c: In function ‘XS_Net__Pcap_strerror’: Pcap.c:1386: warning: assignment discards qualifiers from pointer targ +et type Running Mkbootstrap for Net::Pcap () chmod 644 Pcap.bs rm -f blib/arch/auto/Net/Pcap/Pcap.so cc -shared -L/usr/local/lib Pcap.o -o blib/arch/auto/Net/Pcap/Pcap.s +o \ -lpcap \ chmod 755 blib/arch/auto/Net/Pcap/Pcap.so cp Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs chmod 644 blib/arch/auto/Net/Pcap/Pcap.bs cp bin/pcapinfo blib/script/pcapinfo /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pcapi +nfo Manifying blib/man1/pcapinfo.1p Manifying blib/man3/Net::Pcap.3pm



Old output with libpcap0.7 installed:

Net-Pcap-0.14$ sudo make cp Pcap.pm blib/lib/Net/Pcap.pm AutoSplitting blib/lib/Net/Pcap.pm (blib/lib/auto/Net/Pcap) /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share +/perl/5.8/ExtUtils/typemap -typemap typemap Pcap.xs > Pcap.xsc && mv + Pcap.xsc Pcap.c cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-s +trict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE +_OFFSET_BITS=64 -O2 -DVERSION=\"0.14\" -DXS_VERSION=\"0.14\" -fPIC +"-I/usr/lib/perl/5.8/CORE" -DHAVE_BLANK -DHAVE_PCAP_COMPILE_NOPCAP - +DHAVE_PCAP_FINDALLDEVS -DHAVE_PCAP_FREEALLDEVS -DHAVE_PCAP_GETNONBLOC +K -DHAVE_PCAP_OPEN_DEAD -DHAVE_PCAP_SETNONBLOCK Pcap.c In file included from Pcap.xs:43: stubs.inc:71:2: warning: #warning "the function pcap_lib_version() is +not available, but will be emulated" stubs.inc:113:2: warning: #warning "the function pcap_breakloop() is n +ot available" stubs.inc:157:2: warning: #warning "the function pcap_dump_file() is n +ot 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() i +s 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:277:2: warning: #warning "the function pcap_get_selectable_f +d() 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() i +s 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 av +ailable" 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() i +s not available" stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc( +) is not available" stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destro +y() 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_transm +it() is not available" stubs.inc:499:2: warning: #warning "the function pcap_event() is not a +vailable" stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is + not available" Pcap.xs: In function ‘XS_Net__Pcap_lookupnet’: Pcap.xs:143: warning: passing argument 1 of ‘pcap_lookupnet’ discards +qualifiers from pointer target type Pcap.xs: In function ‘XS_Net__Pcap_open_live’: Pcap.xs:256: warning: passing argument 1 of ‘pcap_open_live’ discards +qualifiers from pointer target type Running Mkbootstrap for Net::Pcap () chmod 644 Pcap.bs rm -f blib/arch/auto/Net/Pcap/Pcap.so cc -shared -L/usr/local/lib Pcap.o -o blib/arch/auto/Net/Pcap/Pcap.s +o \ -lpcap \ chmod 755 blib/arch/auto/Net/Pcap/Pcap.so cp Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs chmod 644 blib/arch/auto/Net/Pcap/Pcap.bs cp bin/pcapinfo blib/script/pcapinfo /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pcapi +nfo Manifying blib/man1/pcapinfo.1p Manifying blib/man3/Net::Pcap.3pm

UPDATE:

To fix the problem with compiling Net-Libdnet-0.01 on Ubuntu, I followed this thread as pointed out by pc88mxer below and it reduced one of the dependencies for Net-Packet-3.26:

http://perlmonks.org/index.pl?node_id=689429

The only dependencies I have left before I can install Net-Packet-3.26 are:

Warning: prerequisite Net::Pcap 0.12 not found. We have 0.04. Warning: prerequisite Net::Write 1.00 not found.


Note that Net::Write-1.03 also depends on Net::Pcap0.12 or higher.

UPDATE: This issue has been resolved. I ignored the warnings on the updated output above (after installing the libpcap0.8 package on advice from alexm), and then got the following when trying to run "make test" for Net-Pcap-0.14:

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load...........# Testing Net::Pcap 0.14 under Perl 5.008008 t/00-load...........ok + t/01-api............ok + t/02-lookup.........ok + t/03-openlive.......ok 1/14 + # Failed test ' - $err must be set: SIOCGIFHWADDR: No such device' # at t/03-openlive.t line 70. # 'SIOCGIFHWADDR: No such device' # doesn't match '/^(?:bind|ioctl): (?:No such device)/' t/03-openlive.......NOK 13# Looks like you failed 1 test of 14. + t/03-openlive.......dubious + Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 13 Failed 1/14 tests, 92.86% okay t/04-loop...........ok 1/195


There are several other forums on this topic that say to ignore the error and do a "force install" but I just ignored it and did a normal "sudo make install". As you can see, the regular expression above isn't looking for 'SIOCGIFHWADDR' at the begining of the string. It is only looking for either 'bind' or 'ioctl', so that is the cause of the failure. After installing the Net-Pcap-0.14, this satisfied the dependencies for Net-Write-1.03 and these two modules together (Net-Write-1.03 and Net-Pcap-0.14) satisfied the final dependencies for Net-Packet-3.26. I was able to successfully run my test packet sniffing script after installing Net-Packet-3.26. I hope this helps someone in the future; I really appreciate all the help I got from pc88mxer and alexm. The information may be somewhat scattered throughout this thread, but I'd be glad to assist anyone in the future who needs some help putting it all together.

Replies are listed 'Best First'.
Re: Need help compiling Net::Pcap on Ubuntu 8.04
by alexm (Chaplain) on Jul 21, 2008 at 22:36 UTC

    libnet-pcap-perl (0.04-3) in hardy depends on libpcap0.7. However you're trying to compile a newer Net::Pcap (0.14), so you most probably need libpcap0.8-dev instead of libpcap0.7-dev.

    Taking a look at pcap.h from libpcap0.8-dev, I could see that it does define pcap_lib_version() and pcap_breakloop(), so I guess it will define the other functions too.

      alexm, Thanks for the advice. I installed the libpcap0.8-dev packages, and that seemed to eliminate some of the functions that it was having trouble finding, however, I still receive the following output:

      cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-s +trict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE +_OFFSET_BITS=64 -O2 -DVERSION=\"0.14\" -DXS_VERSION=\"0.14\" -fPIC +"-I/usr/lib/perl/5.8/CORE" -DHAVE_BLANK -DHAVE_PCAP_LIB_VERSION -DHA +VE_PCAP_BREAKLOOP -DHAVE_PCAP_COMPILE_NOPCAP -DHAVE_PCAP_DATALINK_NAM +E_TO_VAL -DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION -DHAVE_PCAP_DATALINK +_VAL_TO_NAME -DHAVE_PCAP_DUMP_FILE -DHAVE_PCAP_DUMP_FLUSH -DHAVE_PCAP +_DUMP_FOPEN -DHAVE_PCAP_DUMP_FTELL -DHAVE_PCAP_FINDALLDEVS -DHAVE_PCA +P_FOPEN_OFFLINE -DHAVE_PCAP_FREEALLDEVS -DHAVE_PCAP_GETNONBLOCK -DHAV +E_PCAP_GET_SELECTABLE_FD -DHAVE_PCAP_INJECT -DHAVE_PCAP_LIB_VERSION - +DHAVE_PCAP_LIST_DATALINKS -DHAVE_PCAP_NEXT_EX -DHAVE_PCAP_OPEN_DEAD - +DHAVE_PCAP_SENDPACKET -DHAVE_PCAP_SETDIRECTION -DHAVE_PCAP_SETNONBLOC +K -DHAVE_PCAP_SET_DATALINK Pcap.c In file included from Pcap.xs:43: stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() i +s 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 av +ailable" 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() i +s not available" stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc( +) is not available" stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destro +y() 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_transm +it() is not available" stubs.inc:499:2: warning: #warning "the function pcap_event() is not a +vailable" stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is + not available" Pcap.c: In function ‘XS_Net__Pcap_strerror’: Pcap.c:1386: warning: assignment discards qualifiers from pointer targ +et type Running Mkbootstrap for Net::Pcap () chmod 644 Pcap.bs rm -f blib/arch/auto/Net/Pcap/Pcap.so cc -shared -L/usr/local/lib Pcap.o -o blib/arch/auto/Net/Pcap/Pcap.s +o \ -lpcap \ chmod 755 blib/arch/auto/Net/Pcap/Pcap.so cp Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs chmod 644 blib/arch/auto/Net/Pcap/Pcap.bs cp bin/pcapinfo blib/script/pcapinfo /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pcapi +nfo Manifying blib/man1/pcapinfo.1p Manifying blib/man3/Net::Pcap.3pm


      Incidentally, I just tried to compile/install the Net-Libnet-0.01_04 and it seemed to work fine. Earlier this was complaining about Net::Pcap as well, so maybe version 0.8 helped that.

      I do still need Net::Pcap0.14 though, because Net-Write-1.03 requires at least Net::Pcap0.12 from the following output when running "perl Makefile.PL":

      Warning: prerequisite Net::Pcap 0.12 not found. We have 0.04.


      Also, (maybe this will be helpful in that the problem is related) I get the following output when trying to run "perl Makefile.PL" for Net-Libdnet-0.01:

      Checking if your kit is complete... Looks good Note (probably harmless): No library found for -ldnet Writing Makefile for Net::Libdnet


      And when trying to run "sudo make" for the same module:

      cp Libdnet.pm blib/lib/Net/Libdnet.pm AutoSplitting blib/lib/Net/Libdnet.pm (blib/lib/auto/Net/Libdnet) /usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -typemap /usr/share +/perl/5.8/ExtUtils/typemap Libdnet.xs > Libdnet.xsc && mv Libdnet.xs +c Libdnet.c cc -c -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_ +PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARG +EFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.01\" -DXS_VER +SION=\"0.01\" -fPIC "-I/usr/lib/perl/5.8/CORE" Libdnet.c Libdnet.xs:35:18: error: dnet.h: No such file or directory Libdnet.xs:37: warning: ‘struct intf_entry’ declared inside parameter +list Libdnet.xs:37: warning: its scope is only this definition or declarati +on, which is probably not what you want Libdnet.xs: In function ‘intf2hash’: Libdnet.xs:50: error: dereferencing pointer to incomplete type Libdnet.xs:58: error: dereferencing pointer to incomplete type Libdnet.xs:66: error: dereferencing pointer to incomplete type Libdnet.xs:74: error: dereferencing pointer to incomplete type Libdnet.xs:82: error: dereferencing pointer to incomplete type Libdnet.xs:91: error: dereferencing pointer to incomplete type Libdnet.xs:91: warning: assignment makes pointer from integer without +a cast Libdnet.xs:95: error: dereferencing pointer to incomplete type Libdnet.xs:95: warning: passing argument 2 of ‘Perl_newSVpv’ makes poi +nter from integer without a cast Libdnet.xs:105: error: dereferencing pointer to incomplete type Libdnet.xs:105: warning: assignment makes pointer from integer without + a cast Libdnet.xs:109: error: dereferencing pointer to incomplete type Libdnet.xs:109: warning: passing argument 2 of ‘Perl_newSVpv’ makes po +inter from integer without a cast Libdnet.xs:119: error: dereferencing pointer to incomplete type Libdnet.xs:119: warning: assignment makes pointer from integer without + a cast Libdnet.xs:123: error: dereferencing pointer to incomplete type Libdnet.xs:123: warning: passing argument 2 of ‘Perl_newSVpv’ makes po +inter from integer without a cast Libdnet.xs: In function ‘XS_Net__Libdnet_addr_cmp’: Libdnet.xs:144: error: storage size of ‘SadA’ isn’t known Libdnet.xs:144: error: storage size of ‘SadB’ isn’t known Libdnet.xs: In function ‘XS_Net__Libdnet_addr_bcast’: Libdnet.xs:188: error: storage size of ‘SadAd’ isn’t known Libdnet.xs:188: error: storage size of ‘SadBc’ isn’t known Libdnet.xs:208: warning: assignment makes pointer from integer without + a cast Libdnet.xs: In function ‘XS_Net__Libdnet_addr_net’: Libdnet.xs:226: error: storage size of ‘SadAd’ isn’t known Libdnet.xs:226: error: storage size of ‘SadBc’ isn’t known Libdnet.xs:246: warning: assignment makes pointer from integer without + a cast Libdnet.xs: In function ‘XS_Net__Libdnet_arp_add’: Libdnet.xs:264: error: ‘arp_t’ undeclared (first use in this function) Libdnet.xs:264: error: (Each undeclared identifier is reported only on +ce Libdnet.xs:264: error: for each function it appears in.) Libdnet.xs:264: error: ‘AtArp’ undeclared (first use in this function) Libdnet.xs:265: error: storage size of ‘SarEntry’ isn’t known Libdnet.xs:266: error: storage size of ‘SadAddr’ isn’t known Libdnet.xs:293: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs:303: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs: In function ‘XS_Net__Libdnet_arp_delete’: Libdnet.xs:327: error: ‘arp_t’ undeclared (first use in this function) Libdnet.xs:327: error: ‘AtArp’ undeclared (first use in this function) Libdnet.xs:328: error: storage size of ‘SarEntry’ isn’t known Libdnet.xs:329: error: storage size of ‘SadAddr’ isn’t known Libdnet.xs:352: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs: In function ‘XS_Net__Libdnet_arp_get’: Libdnet.xs:376: error: ‘arp_t’ undeclared (first use in this function) Libdnet.xs:376: error: ‘AtArp’ undeclared (first use in this function) Libdnet.xs:377: error: storage size of ‘SarEntry’ isn’t known Libdnet.xs:378: error: storage size of ‘SadAddr’ isn’t known Libdnet.xs:401: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs:410: warning: assignment makes pointer from integer without + a cast Libdnet.xs: In function ‘XS_Net__Libdnet_intf_get’: Libdnet.xs:433: error: ‘intf_t’ undeclared (first use in this function +) Libdnet.xs:433: error: ‘ItIntf’ undeclared (first use in this function +) Libdnet.xs:434: error: storage size of ‘SieEntry’ isn’t known Libdnet.xs:457: error: ‘INTF_NAME_LEN’ undeclared (first use in this f +unction) Libdnet.xs: In function ‘XS_Net__Libdnet_intf_get_src’: Libdnet.xs:478: error: ‘intf_t’ undeclared (first use in this function +) Libdnet.xs:478: error: ‘ItIntf’ undeclared (first use in this function +) Libdnet.xs:479: error: storage size of ‘SieEntry’ isn’t known Libdnet.xs:480: error: storage size of ‘SaAddr’ isn’t known Libdnet.xs: In function ‘XS_Net__Libdnet_intf_get_dst’: Libdnet.xs:529: error: ‘intf_t’ undeclared (first use in this function +) Libdnet.xs:529: error: ‘ItIntf’ undeclared (first use in this function +) Libdnet.xs:530: error: storage size of ‘SieEntry’ isn’t known Libdnet.xs:531: error: storage size of ‘SaAddr’ isn’t known Libdnet.xs: In function ‘XS_Net__Libdnet_route_add’: Libdnet.xs:580: error: ‘route_t’ undeclared (first use in this functio +n) Libdnet.xs:580: error: ‘RtRoute’ undeclared (first use in this functio +n) Libdnet.xs:581: error: storage size of ‘SrtEntry’ isn’t known Libdnet.xs:582: error: storage size of ‘SadAddr’ isn’t known Libdnet.xs:609: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs:619: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs: In function ‘XS_Net__Libdnet_route_delete’: Libdnet.xs:643: error: ‘route_t’ undeclared (first use in this functio +n) Libdnet.xs:643: error: ‘RtRoute’ undeclared (first use in this functio +n) Libdnet.xs:644: error: storage size of ‘SrtEntry’ isn’t known Libdnet.xs:645: error: storage size of ‘SadAddr’ isn’t known Libdnet.xs:668: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs: In function ‘XS_Net__Libdnet_route_get’: Libdnet.xs:692: error: ‘route_t’ undeclared (first use in this functio +n) Libdnet.xs:692: error: ‘RtRoute’ undeclared (first use in this functio +n) Libdnet.xs:693: error: storage size of ‘SrtEntry’ isn’t known Libdnet.xs:694: error: storage size of ‘SadAddr’ isn’t known Libdnet.xs:717: error: invalid application of ‘sizeof’ to incomplete t +ype ‘struct addr’ Libdnet.xs:726: warning: assignment makes pointer from integer without + a cast make: *** [Libdnet.o] Error 1


      All of this starts with the fact that I am trying to install Net-Packet-3.26. When running "perl Makefile.PL" for this module, I receive the following output:

      WARNING: LICENSE is not a known parameter. Warning: prerequisite Net::Libdnet 0 not found. Warning: prerequisite Net::Pcap 0.12 not found. We have 0.04. Warning: prerequisite Net::Write 1.00 not found. 'LICENSE' is not a known MakeMaker parameter name. Writing Makefile for Net::Packet


      Thank you all for your time you are spending on this issue.

      -Barret

        Those warnings above are not errors; they just warn you that some functionality may not be added. If you run make test after make and all tests are successful, then everything should be fine. You can see that the Makefile targets were actually made:

        ... chmod 755 blib/arch/auto/Net/Pcap/Pcap.so cp Pcap.bs blib/arch/auto/Net/Pcap/Pcap.bs chmod 644 blib/arch/auto/Net/Pcap/Pcap.bs cp bin/pcapinfo blib/script/pcapinfo /usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/pcapi +nfo Manifying blib/man1/pcapinfo.1p Manifying blib/man3/Net::Pcap.3pm

        BTW, there's no need to sudo make unless you need to install the Makefile targets, i.e. sudo make install.

Re: Need help compiling Net::Pcap on Ubuntu 8.04
by pc88mxer (Vicar) on Jul 21, 2008 at 22:23 UTC
    Do you really need to recompile it? The package libnet-pcap-perl already contains Net::Pcap.
      Thank you for the reply pc88mxer. It looks like libnet-pcap-perl only has version .04 of Net::Pcap. I need at least version 0.12 because it is a dependency for Net-Write-1.03. When running "perl Makefile.PL" for Net-Write-1.03, I get the following:

      Warning: prerequisite Net::Pcap 0.12 not found. We have 0.04.

      hi all i was trying to install the Net-Libdnet-0.01 fist i download the .gz file uncompress it under root user i make cp /usr/include/dumbnet.h /usr/include/dnet.h just in case then perl Makefile.PL don't make the install here just go to the newly generated Makefile file chmod 777 Makefile vi Makefile change the parameter ldnet to ldumbnet then make make install and it will work

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://699169]
Approved by alexm
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-06-03 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (6 votes). Check out past polls.

    Notices?