Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Net::Pcap installation help (and not with the library)

by binarygrrl (Novice)
on Jan 10, 2013 at 14:10 UTC ( #1012664=note: print w/ replies, xml ) Need Help??


in reply to Re: Net::Pcap installation help (and not with the library)
in thread Net::Pcap installation help (and not with the library)

Thank you for the walk-thru :) Patches 0002, and 0003 worked fine - but 0004 and 0005 get stuck. (Error Msgs for both) "Assertion failed: hunk, file .\src\patch\2.5.9\patch-2.5.9-src\patch.c, line 354 This application has requested runtime to terminate it in an unusual way. Please contact the application's support team for more information." How does one, unix2dos?


Comment on Re^2: Net::Pcap installation help (and not with the library)
Re^3: Net::Pcap installation help (and not with the library)
by marto (Bishop) on Jan 10, 2013 at 14:24 UTC

    "How does one, unix2dos?"

    See Unix2dos for info, and a link to download an executable (note others may exist).

Re^3: Net::Pcap installation help (and not with the library)
by VinsWorldcom (Priest) on Jan 10, 2013 at 14:24 UTC

    If you don't have a 'unix2dos' executable for Windows, you can just use Perl:

    perl -pi.bak -e "s/\r/\r\n/" 0004_PATCH_FILE_NAME_HERE
Re^3: Net::Pcap installation help (and not with the library)
by binarygrrl (Novice) on Jan 10, 2013 at 14:26 UTC
    So I figured out unix2dos, patches went through - still no luck... :(
      After using the unix2dos both machines applied patches (although no response with patches 0002 & 0003 just moved on to a new command line with no errors). On the desktop the cmd perl Makefile.pl executes correctly with all libraries, but still doesn't dmake. The laptop sees a library, then gives me: "Note <probably harmless>: No library found for -lkernel32" and proceeds to list another 18 libraries it can't find I installed winpcap, I unzipped the developer library into C:\WpdPack, I used the command line to tell it where it is - still no luck.... What am I missing here?
      - ERRORS AFTER PATCHING ON DESKTOP WHEN MAKING -
      C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16>dmake cp Pcap.pm blib\lib\Net\Pcap.pm C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -typemap C:\strawberry\perl\lib\ExtUtils\ typemap -typemap typemap Pcap.xs > Pcap.xsc && C:\strawberry\perl\bin +\perl.exe -MExtUtils::Command -e mv -- Pcap .xsc Pcap.c gcc -c -IC:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Inclu +de -s -O2 -DWIN32 -DPERL_TEXTMODE_SC RIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing + -mms-bitfields -s -O2 -DVERSION=\"0.1 6\" -DXS_VERSION=\"0.16\" "-IC:\strawberry\perl\lib\CORE" -DWINS +OCK2_H_REQUESTED -DWPCAP -DHAVE_REMOTE -DHA VE_BLANK -DHAVE_PCAP_LIB_VERSION Pcap.c In file included from Pcap.xs:43:0: stubs.inc:85:2: warning: #warning "the function pcap_findalldevs() is +not available, but will be emulated" [-Wcpp ] stubs.inc:91:8: error: redefinition of 'struct pcap_if' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/pcap/pc +ap.h:89:16: note: originally defined here stubs.inc:113:2: warning: #warning "the function pcap_breakloop() is n +ot available" [-Wcpp] stubs.inc:127:2: warning: #warning "the function pcap_setnonblock() is + not available" [-Wcpp] stubs.inc:142:2: warning: #warning "the function pcap_getnonblock() is + not available" [-Wcpp] stubs.inc:157:2: warning: #warning "the function pcap_dump_file() is n +ot available" [-Wcpp] stubs.inc:172:2: warning: #warning "the function pcap_dump_flush() is +not available" [-Wcpp] stubs.inc:187:2: warning: #warning "the function pcap_list_datalinks() + is not available" [-Wcpp] stubs.inc:202:2: warning: #warning "the function pcap_set_datalink() i +s not available" [-Wcpp] stubs.inc:217:2: warning: #warning "the function pcap_datalink_name_to +_val() is not available" [-Wcpp] stubs.inc:232:2: warning: #warning "the function pcap_datalink_val_to_ +name() is not available" [-Wcpp] stubs.inc:247:2: warning: #warning "the function pcap_datalink_val_to_ +description() is not available" [-Wcpp] stubs.inc:262:2: warning: #warning "the function pcap_compile_nopcap() + is not available" [-Wcpp] stubs.inc:267:5: error: conflicting types for 'pcap_compile_nopcap' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/pcap/pc +ap.h:318:5: note: previous declaration of ' pcap_compile_nopcap' was here stubs.inc:268:5: error: conflicting types for 'pcap_compile_nopcap' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/pcap/pc +ap.h:318:5: note: previous declaration of ' pcap_compile_nopcap' was here stubs.inc:277:2: warning: #warning "the function pcap_get_selectable_f +d() is not available" [-Wcpp] stubs.inc:292:2: warning: #warning "the function pcap_next_ex() is not + available" [-Wcpp] stubs.inc:307:2: warning: #warning "the function pcap_sendpacket() is +not available" [-Wcpp] stubs.inc:322:2: warning: #warning "the function pcap_createsrcstr() i +s not available" [-Wcpp] stubs.inc:337:2: warning: #warning "the function pcap_parsesrcstr() is + not available" [-Wcpp] stubs.inc:352:2: warning: #warning "the function pcap_open() is not av +ailable" [-Wcpp] stubs.inc:357:8: error: redefinition of 'struct pcap_rmtauth' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/remote- +ext.h:338:8: note: originally defined here stubs.inc:363:10: error: conflicting types for 'pcap_open' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/remote- +ext.h:417:9: note: previous declaration of 'pcap_open' was here stubs.inc:364:10: error: conflicting types for 'pcap_open' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/remote- +ext.h:417:9: note: previous declaration of 'pcap_open' was here stubs.inc:373:2: warning: #warning "the function pcap_setbuff() is not + available" [-Wcpp] stubs.inc:388:2: warning: #warning "the function pcap_setuserbuffer() +is not available" [-Wcpp] stubs.inc:403:2: warning: #warning "the function pcap_setmode() is not + available" [-Wcpp] stubs.inc:418:2: warning: #warning "the function pcap_setmintocopy() i +s not available" [-Wcpp] stubs.inc:433:2: warning: #warning "the function pcap_sendqueue_alloc( +) is not available" [-Wcpp] stubs.inc:438:8: error: redefinition of 'struct pcap_send_queue' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:46:8: note: originally defined here stubs.inc:444:32: error: conflicting types for 'pcap_send_queue' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:53:32: note: previous declarati on of 'pcap_send_queue' was here stubs.inc:446:19: error: conflicting types for 'pcap_sendqueue_alloc' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:85:18: note: previous declarati on of 'pcap_sendqueue_alloc' was here stubs.inc:447:19: error: conflicting types for 'pcap_sendqueue_alloc' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:85:18: note: previous declarati on of 'pcap_sendqueue_alloc' was here stubs.inc:455:2: warning: #warning "the function pcap_sendqueue_destro +y() is not available" [-Wcpp] stubs.inc:460:6: error: conflicting types for 'pcap_sendqueue_destroy' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:87:6: note: previous declaratio n of 'pcap_sendqueue_destroy' was here stubs.inc:461:6: error: conflicting types for 'pcap_sendqueue_destroy' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:87:6: note: previous declaratio n of 'pcap_sendqueue_destroy' was here stubs.inc:469:2: warning: #warning "the function pcap_sendqueue_queue( +) is not available" [-Wcpp] stubs.inc:474:5: error: conflicting types for 'pcap_sendqueue_queue' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:89:5: note: previous declaratio n of 'pcap_sendqueue_queue' was here stubs.inc:475:5: error: conflicting types for 'pcap_sendqueue_queue' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:89:5: note: previous declaratio n of 'pcap_sendqueue_queue' was here stubs.inc:484:2: warning: #warning "the function pcap_sendqueue_transm +it() is not available" [-Wcpp] stubs.inc:489:7: error: conflicting types for 'pcap_sendqueue_transmit +' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:91:7: note: previous declaratio n of 'pcap_sendqueue_transmit' was here stubs.inc:490:7: error: conflicting types for 'pcap_sendqueue_transmit +' C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16\WpdPack\Include/Win32-E +xtensions.h:91:7: note: previous declaratio n of 'pcap_sendqueue_transmit' was here stubs.inc:499:2: warning: #warning "the function pcap_event() is not a +vailable" [-Wcpp] stubs.inc:514:2: warning: #warning "the function pcap_setsampling() is + not available" [-Wcpp] Pcap.c: In function 'XS_Net__Pcap_strerror': Pcap.c:1603:9: warning: assignment discards 'const' qualifier from poi +nter target type [enabled by default] dmake: Error code 129, while making 'Pcap.o'
      -ERRORS ON LAPTOP WHEN TRYING TO MAKEFILE.PL-
      C:\Perl\Net-Pcap-0.16>perl Makefile.PL INC=-IC:\WpdPack\Include "LIBS= +-LC:\WpdPa ck\Lib -lwpcap" Set up gcc environment - gcc.exe (gcc-4.6.3 release with patches [buil +d 20121012 by perlmingw.sf.net]) 4.6.3 Unable to patch socket.h looking for -lwpcap... yes checking for pcap_lib_version() in -lwpcap... yes detecting available functions... ok Checking if your kit is complete... Looks good 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 Note (probably harmless): No library found for -lcomctl32 Note (probably harmless): No library found for -lmsvcrt Writing Makefile for Net::Pcap Writing MYMETA.yml and MYMETA.json

        Please stop ignoring the post formatting advice which is displayed every time you post. See here for example. Consider constructing one sensible response, rather than continually replying to yourself with poorly formatted responses. Again How do I post a question effectively? is worth reading and understanding.

      With the same developer library on both machines - with the desktop I get:

      C:\Perl\Everything.PERL\Packages\Net-Pcap-0.16>perl Makefile.PL INC=-I +C:\Perl\Everything.PERL\Packages\Net-Pcap-0 .16\WpdPack\Include "LIBS=-LC:\Perl\Everything.PERL\Packages\Net-Pcap- +0.16\WpdPack\Lib -lwpcap" socket.h patched... ok looking for -lwpcap... yes checking for pcap_lib_version() in -lwpcap... yes detecting available functions... ok Checking if your kit is complete... Looks good Writing Makefile for Net::Pcap Writing MYMETA.yml and MYMETA.json

      For the perl Makefile.pl command... But the laptop cannot find the same libraries...

        Not finding libraries like "kernel32" are a bigger issue. You said you are using Strawberry? That should have a C compiler and the required Windows libraries.

        • Did you move the Strawberry installation from the default C:\strawberry?
        • Is c:\strawberry\c\bin in your path?
        • Is MSVC++ installed on these machines and potentially conflicting?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2014-12-26 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls