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

I'm trying to install the Joe Marzot's SNMP module for UCD-SNMP, to monitor Cisco gear w/o telnetting, but hit a snag.   Problem appears to be from make not Perl, but I hope a clueful Monk might point me in the right direction.   I'm hopelessly ignorant of make, so forgive me if I'm overlooking something dumb.

Retrieved the SNMP module from CPAN and proceed to perl Makefile.PL.   Works fine.   But then make fails with Error 127 as follows:

sparky# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for SNMP sparky# make mkdir blib mkdir blib/lib mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/SNMP mkdir blib/lib/auto mkdir blib/lib/auto/SNMP cp SNMP.pm blib/lib/SNMP.pm AutoSplitting blib/lib/SNMP.pm (blib/lib/auto/SNMP) /usr/bin/perl -I/usr/lib/perl5/5.005/i386-linux -I/usr/lib/perl5/5.005 + /usr/lib/perl5/5.005/ExtUtils/xsubpp -noprototypes -typemap /usr/lib +/perl5/5.005/ExtUtils/typemap -typemap typemap SNMP.xs >xstmp.c && mv + xstmp.c SNMP.c cc -c -I/usr/include -Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/u +sr/local/include -O2 -DVERSION=\"3.1.0\" -DXS_VERSION=\"3.1.0\" -f +PIC -I/usr/lib/perl5/5.005/i386-linux/CORE SNMP.c make: cc: Command not found make: *** [SNMP.0] Error 127 sparky#
Other details I can think of:
SNMP module 3.1.0
SNMP library 4.1
SNMP developement files 4.1
SNMP apps
Perl 5.005.03
Debian 2.2 x86
    cheers,
    Don (ybiC)
    striving for Perl Adept

Replies are listed 'Best First'.
Re: Problem with PerlmakeSNMP module Error 127
by Fastolfe (Vicar) on Oct 11, 2000 at 21:10 UTC
    You may wish to read your error messages a little more closely:
    make: cc: Command not found make: *** [SNMP.0] Error 127
    You are missing 'cc', which is the C compiler needed to actually compile your stuff. Consider installing GCC or equivalent. Perhaps someone else can give you additional pointers as to where you might find such a thing for your platform.
      On most Debian systems /usr/bin/cc is a symlink to /etc/alternatives/cc, which in turn is a symlink to /usr/bin/gcc.
      If the symlinks are there, then I'm stumped. Maybe try 'apt-get install --reinstall gcc'?
      Wow, thanks for the quick answer, Fastolfe   8^).   I saw that, but didn't make the connection.   Thought GCC was part of the Debian base install, but apparantly not.   Don't understand why prior CPAN modules installs didn't choke on this though.

      After lunch (featherbones - mmm,mmmm) I'll look for that Debian package.
          cheers,
          Don   (ybiC)
          striving for Perl Adept

        Perhaps your earlier modules didn't have C components that needed to be compiled? If you do think you have GCC installed, perhaps your configuration process didn't find it? Usually a 'perl Makefile.PL' will catch stuff like the location and names of your compiler. Try typing 'cc' and/or 'gcc' from the command prompt and see if you get something.
      You were spot-on,   Fastolfe++.   GCC was *not* installed, easily remedied with apt-get update && apt-get install gcc gcc-doc.

      make now completes cleanly.   But now make test doesn't find a couple MIBs where it expects to.   So I'll tweak Makefile.PL to point to Deb's proper directories and start over.   Hmmm... or not. Don't recognise anything there as pointing to MIB files.

      Update: In the Chatterbox, tye suggested that I make install anyway, in spite of make test errors, and it seems to have worked.   Many thanks to Fastolfe, tye, and other fine Monks who replied to my SOPW post.   8^)
          cheers,
          Don   (ybiC)
          striving for Perl Adept

Re: Problem with PerlmakeSNMP module Error 127
by AgentM (Curate) on Oct 11, 2000 at 21:14 UTC
    Debian's default install contains gcc. perhaps you need a symlink from 'cc' in /usr/bin/ or whatever to 'gcc'. You can find its location with 'which gcc'. If someone else gives you better advice, disregard mine. I can't imagine why cc wouldn't be automatically found.
    AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.