Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

problems with libdnet module

by WalkingZero (Sexton)
on May 31, 2008 at 12:36 UTC ( [id://689417]=perlquestion: print w/replies, xml ) Need Help??

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

Hello Monks, I was trying to install Net::Libdnet from the CPAN Shell and it's giving me problems. From what i can tell this seems to be due to the fact that, in Ubuntu, Libdnet has been renamed to Libdumnet so as not to conflict with the DECnet library. I was wondering if anyone else had encountered this problem and/or could give me advice on correcting it. I can include the output when trying to install the module if it is requested, but I don't wish to flood the thread if I don't need to. Thank you.

UPDATE: Okay, I should have known better so here's the Output
cpan> install Net::Libdnet Running install for module Net::Libdnet Running make for V/VM/VMAN/Net-Libdnet-0.01.tar.gz Checksum for /root/.cpan/sources/authors/id/V/VM/VMAN/Net-Libdnet-0.01 +.tar.gz ok Net-Libdnet-0.01/ Net-Libdnet-0.01/Changes Net-Libdnet-0.01/LICENSE Net-Libdnet-0.01/Libdnet.pm Net-Libdnet-0.01/Libdnet.xs Net-Libdnet-0.01/MANIFEST Net-Libdnet-0.01/Makefile.PL Net-Libdnet-0.01/README Net-Libdnet-0.01/t/ Net-Libdnet-0.01/t/01-module.t Net-Libdnet-0.01/t/02-addr.t Net-Libdnet-0.01/t/03-arp.t Net-Libdnet-0.01/t/04-blob.t Net-Libdnet-0.01/t/05-eth.t Net-Libdnet-0.01/t/06-fw.t Net-Libdnet-0.01/t/07-intf.t Net-Libdnet-0.01/t/08-ip.t Net-Libdnet-0.01/t/09-rand.t Net-Libdnet-0.01/t/10-route.t Removing previously used /root/.cpan/build/Net-Libdnet-0.01 CPAN.pm: Going to build V/VM/VMAN/Net-Libdnet-0.01.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Net::Libdnet cp Libdnet.pm blib/lib/Net/Libdnet.pm AutoSplitting blib/lib/Net/Libdnet.pm (blib/lib/auto/Net/Libdnet) /usr/bin/perl /usr/share/perl5/ExtUtils/xsubpp -typemap /usr/share/pe +rl/5.8/ExtUtils/typemap Libdnet.xs > Libdnet.xsc && mv Libdnet.xsc L +ibdnet.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 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible

Replies are listed 'Best First'.
Re: problems with libdnet module
by tirwhan (Abbot) on May 31, 2008 at 12:55 UTC

    It will be much easier for people to help you with your problem if you posted more information, for example the output you get when trying to install the module. You can put <readmore> tags around such text, that way it won't be seen in Newest Nodes or other lists.

    About the only helpful thing I can say with the information you have given so far is are you sure you have Ubuntu libdumbnet-dev package installed? That contains the libraries you'll need when compiling Net::Libdnet. Also, Net::Libdnet is rather ancient, and automatic CPAN tests show it fails to install on about half of all modern Linux variants, so maybe the module is broken (or broken for recent versions of Libdnet).


    All dogma is stupid.
      Yes, I even tried reloading the libdumnet-dev package. I still get the above output. Is there a good alternative you can recommend to Net::Write::Layer2 for writing frames to the Wire if Net::Libdnet is truly broken? Thanks for your input so far.

      UPDATE: Okaaaay, I'm getting myself confused now. I went back and tried "install Net::Write::Layer2" again and it said it was up to date. When I check CPAN it does not list libdnet as a dependency...I wonder why it was trying to throw libdnet in there earlier. It looks like this is a moot point now though.

        Look at the error you get, specifically Libdnet.xs:35:18: error: dnet.h: No such file or directory. Looking at the contents of libdumbnet-dev (via "dpkg -L libdumbnet-dev") one can see that it does indeed not include dnet.h, but it _does_ include dumbnet.h. Replacing dnet.h with dumbnet.h in Libdnet.xs, and -ldnet with -ldumbnet in Makefile.PL makes the module successfully compile and pass tests on my machine (Kubuntu Gutsy Gibbon). Incidentally, there is a bug report on rt.cpan.org which shows someone else had the same issue. If these changes fix the compile for you then you could add this to the bug report to help others who may have the same problem


        All dogma is stupid.

        I haven't used this, but Net::Pcap has a pcap_sendpacket function which could allow writing raw frames to an interface.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found