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

Hallo Monks, I posted the following question in a linux forum and a great friend advised me to seek wisdom here. Now my concern is that i have a perl script that requires the NetAddr module. Am running fedora 7 But upon typing the Makefile command, all i get is a really huge list of errors... For brevity's sake let me just post a snippet of the errors:
Bareword found where operator expected at Makefile line 31, near "/usr +/lib" (Missing operator before lib?) Bareword found where operator expected at Makefile line 36, near "LDFL +AGS = -L/usr" (Might be a runaway multi-line // string starting on line 35) (Do you need to predeclare LDFLAGS?) Bareword found where operator expected at Makefile line 37, near "LIBC + = /lib" (Might be a runaway multi-line // string starting on line 36) (Do you need to predeclare LIBC?) Bareword found where operator expected at Makefile line 41, near "25.e +lsmp" (Missing operator before elsmp?) Bareword found where operator expected at Makefile line 43, near "/usr +/lib" (Missing operator before lib?) Semicolon seems to be missing at Makefile line 43. Bareword found where operator expected at Makefile line 44, near "/usr +/lib" (Missing operator before lib?) Bareword found where operator expected at Makefile line 47, near "/usr +/bin" (Missing operator before bin?) Bareword found where operator expected at Makefile line 48, near "/usr +/lib" (Missing operator before lib?) Bareword found where operator expected at Makefile line 49, near "/usr +/lib" (Missing operator before lib?) Semicolon seems to be missing at Makefile line 52. Bareword found where operator expected at Makefile line 64, near "INST +_ARCHLIB = blib/arch" (Might be a runaway multi-line // string starting on line 54) (Do you need to predeclare INST_ARCHLIB?) Semicolon seems to be missing at Makefile line 70. Bareword found where operator expected at Makefile line 71, near "3pm" (Missing operator before pm?) Bareword found where operator expected at Makefile line 76, near "SITE +PREFIX = /usr" (Might be a runaway multi-line // string starting on line 75) (Do you need to predeclare SITEPREFIX?) Bareword found where operator expected at Makefile line 78, near "INST +ALLPRIVLIB = $(PERLPREFIX)/lib" (Might be a runaway multi-line // string starting on line 77) (Do you need to predeclare INSTALLPRIVLIB?) Semicolon seems to be missing at Makefile line 78. Bareword found where operator expected at Makefile line 79, near "$(DE +STDIR" (Missing operator before DESTDIR?) Scalar found where operator expected at Makefile line 79, near ")$(" (Missing operator before $(?) Bareword found where operator expected at Makefile line 79, near "$(IN +STALLPRIVLIB" (Missing operator before INSTALLPRIVLIB?) Semicolon seems to be missing at Makefile line 79. Bareword found where operator expected at Makefile line 80, near "$(SI +TEPREFIX" (Missing operator before SITEPREFIX?) Semicolon seems to be missing at Makefile line 80. Bareword found where operator expected at Makefile line 81, near "$(DE +STDIR" (Missing operator before DESTDIR?) Scalar found where operator expected at Makefile line 81, near ")$("

Replies are listed 'Best First'.
Re: NetAddr-IP-4.007 compilation in Fedora fails miserably
by Corion (Patriarch) on Oct 11, 2007 at 06:28 UTC

    You don't show us what exactly you are doing, but somehow, you are using Perl to run your Makefile:

    Bareword found where operator expected at Makefile line 31

    Makefile is a program to be run by the make command and not by Perl. The usual sequence for installing a module in Perl is to do

    cpan IP::NetAddr

    ... or, if you have already downloaded and unpacked the distribution from CPAN yourself:

    perl -w Makefile.PL make make test make install

    See also the Tutorials section on installing modules.

      ok you are right. I left out the details. I did the perl -w Makefile.pl inside the Net-Addr file. It does everything ok but the make test fails and has only a 9.02% success. here is a full error report and am really hoping it helps.
      Test returned status 2 (wstat 512, 0x200) Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/imhoff.t 255 65280 3 6 200.00% 1-3 t/loops.t 255 65280 21 41 195.24% 1-21 t/masklen.t 2 512 ?? ?? % ?? t/new-store.t 1 256 7 3 42.86% 2 8-9 t/old-store.t 1 256 7 3 42.86% 2 8-9 t/over-arr.t 2 512 ?? ?? % ?? t/over-qq.t 2 512 ?? ?? % ?? t/relops.t 2 512 ?? ?? % ?? t/short.t 1 256 19 1 5.26% 1 t/v4-coalesce.t 255 65280 21 41 195.24% 1-21 t/v4-compact.t 2 512 ?? ?? % ?? t/v4-compplus.t 2 512 ?? ?? % ?? t/v4-hostenum.t 2 512 ?? ?? % ?? t/v4-re.t 255 65280 299 597 199.67% 1-299 t/v4-split-bulk.t 255 65280 ?? ?? % ?? t/v4-split-list.t 2 512 ?? ?? % ?? t/v4-sprefix.t 2 512 ?? ?? % ?? t/v4-xprefix.t 2 512 ?? ?? % ?? t/v6-re.t 255 65280 ?? ?? % ?? t/v6-split-bulk.t 255 65280 ?? ?? % ?? t/wildcard.t 2 512 ?? ?? % ?? 32 subtests skipped. Failed 21/21 test scripts, 0.00% okay. 343/377 subtests failed, 9.02% +okay. make: *** [test_dynamic] Error 2

        This looks pretty abysmal and doesn't match up with the CPAN Testers results for NetAddr::IP 4.007. Please make sure you have all prerequisites installed:

        perl Makefile.PL

        will list all modules which NetAddr::IP needs that are missing in your Perl distribution. You need to install these as well. The cpan tool will do that autmatically for you.

        If you are sure that you have all the right prerequisites installed already, you can run the tests in isolation or in verbose mode to see why they are failing:

        perl -Ilib -w t/wildcard.t

        will run a test stand-alone and

        make test TEST_VERBOSE=1

        will show you all tests and how they fail. Post the output of at least one of the two, preferrably only of one test program, because likely there is some fundamental failure with one of the underlying Perl modules.

Re: NetAddr-IP-4.007 compilation in Fedora fails miserably
by Krambambuli (Curate) on Oct 11, 2007 at 08:01 UTC
    Just FYI, I've checked if I can install the module on my Fedora 7 WS; works great, no problem:
    All tests successful.
    Files=23, Tests=591,  1 wallclock secs ( 0.56 cusr +  0.19 csys =  0.75 CPU)
    make2: Leaving directory `/root/.cpanplus/5.8.8/build/NetAddr-IP-4.007/Lite/Util'
    make1: Leaving directory `/root/.cpanplus/5.8.8/build/NetAddr-IP-4.007/Lite'
    *** Install log written to:
      /root/.cpanplus/install-logs/NetAddr-IP-4.007-1192089244.log
    
    Module 'NetAddr::IP' tested successfully
    No errors testing all modules
    
    You might start from the _very_ first error/warning message. You do use the CPAN or CPANPLUS module to keep your install in sync ?

    Try running

    perl -MCPANPLUS -e shell;

    Hth.
      Thanks all for your advice but honestly nothngs seems to work especially on the make test. Its still returns the original error sating that .Can't locate NetAddr/IP.pm in @INC