Can't build SNMP...

G

Greg G

I get the following when trying to install the SNMP-4.2.0 into perl
5.8.2 on a Solaris 7 host. Note that I don't want to use Net::SNMP as I
can't quite decipher the docs and I plan to migrate to SNMP::Multi after
I migrate some old code that's making snmpget system calls.


# perl Makefile.PL
WARNING: MAN3PODS takes a hash reference not a string/number.
Please inform the author.
Checking if your kit is complete...
Looks good
Processing hints file hints/solaris.pl
Can't use string ("SNMP") as a HASH ref while "strict refs" in use at
/usr/local/lib/perl5/5.8.2/ExtUtils/MM_Unix.pm line 503.

Thanks.

-Greg G
 
B

Ben Morrow

Greg G said:
I get the following when trying to install the SNMP-4.2.0 into perl
5.8.2 on a Solaris 7 host. Note that I don't want to use Net::SNMP as I
can't quite decipher the docs and I plan to migrate to SNMP::Multi after
I migrate some old code that's making snmpget system calls.


# perl Makefile.PL
WARNING: MAN3PODS takes a hash reference not a string/number.
Please inform the author.
Checking if your kit is complete...
Looks good
Processing hints file hints/solaris.pl
Can't use string ("SNMP") as a HASH ref while "strict refs" in use at
/usr/local/lib/perl5/5.8.2/ExtUtils/MM_Unix.pm line 503.

This is a bug in the Makefile.PL of SNMP.pm... not a good sign. What
does the line containing MAN3PODS say?

Ben
 
G

Greg G

Ben said:
This is a bug in the Makefile.PL of SNMP.pm... not a good sign. What
does the line containing MAN3PODS say?

my %Params = (
NAME => 'SNMP',
dist => { SUFFIX => "gz", COMPRESS => "gzip -9f"},
MAN3PODS => 'SNMP', # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'SNMP.pm',
realclean => { FILES => 'host' },
);

I would never have correlated that error to this line. Thanks. I've
put curly braces around the 'SNMP' on the MAN3PODS line. That has fixed
the makefile generation. Unforunately, it still doesn't build.

AutoSplitting blib/lib/SNMP.pm (blib/lib/auto/SNMP)
/usr/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp -noprototypes
-typemap /usr/local/lib/perl5/5.8.2/ExtUtils/typemap -typemap typemap
SNMP.xs > SNMP.xsc && mv SNMP.xsc SNMP.c
/opt/SUNWspro/bin/cc -c -I/usr/local/include -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"4.2.0\"
-DXS_VERSION=\"4.2.0\" -KPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" SNMP.c
"SNMP.xs", line 224: invalid token in #define macro parameters: ...
"SNMP.xs", line 824: warning: argument #3 is incompatible with prototype:
prototype: pointer to uint :
"/usr/local/include/ucd-snmp/mib.h", line 274
argument : pointer to int
"SNMP.xs", line 998: warning: argument #4 is incompatible with prototype:
prototype: pointer to int : "SNMP.xs", line 141
argument : pointer to uint
"SNMP.xs", line 1450: undefined symbol: _debugx
"SNMP.xs", line 1451: warning: improper pointer/integer combination: arg #1


and so on.

Wheee! :)

-Greg G
 
B

Ben Morrow

Greg G said:
my %Params = (
NAME => 'SNMP',
dist => { SUFFIX => "gz", COMPRESS => "gzip -9f"},
MAN3PODS => 'SNMP', # Pods will be built by installman.
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'SNMP.pm',
realclean => { FILES => 'host' },
);

I would never have correlated that error to this line. Thanks. I've
put curly braces around the 'SNMP' on the MAN3PODS line.

Better would be to delete both that line and the 'dist' line: both are
imply setting the default options.
That has fixed
the makefile generation. Unforunately, it still doesn't build.

AutoSplitting blib/lib/SNMP.pm (blib/lib/auto/SNMP)
/usr/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp -noprototypes
-typemap /usr/local/lib/perl5/5.8.2/ExtUtils/typemap -typemap typemap
SNMP.xs > SNMP.xsc && mv SNMP.xsc SNMP.c
/opt/SUNWspro/bin/cc -c -I/usr/local/include -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"4.2.0\"
-DXS_VERSION=\"4.2.0\" -KPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" SNMP.c
"SNMP.xs", line 224: invalid token in #define macro parameters: ...
"SNMP.xs", line 824: warning: argument #3 is incompatible with prototype:
prototype: pointer to uint :
"/usr/local/include/ucd-snmp/mib.h", line 274
argument : pointer to int
"SNMP.xs", line 998: warning: argument #4 is incompatible with prototype:
prototype: pointer to int : "SNMP.xs", line 141
argument : pointer to uint
"SNMP.xs", line 1450: undefined symbol: _debugx
"SNMP.xs", line 1451: warning: improper pointer/integer combination: arg #1

Oh dear oh dear oh dear oh dear... I'd recommend using something else
unless you fancy some XS debugging fun. You could try contacting the
author.

Ben
 
G

Greg G

Ben said:
Better would be to delete both that line and the 'dist' line: both are
imply setting the default options.

Understood. I noticed that a lot of other modules don't have either
of these lines either, or if they do, they've got empty sets.
For fun, I went back and checked earlier versions of this, and they
all have the same lines in the Makefile.PL.
I'm somewhat confused as to how this is being built on any system at
all.
Oh dear oh dear oh dear oh dear... I'd recommend using something else
unless you fancy some XS debugging fun. You could try contacting the
author.

Errr. What other options might I have? I'm looking at using
SNMP::Utils and SNMP::Multi, which depend on this. As I said, the docs
for Net::SNMP give me a complete headache, and I can't figure out how to
translate system calls to snmpget.

-Greg G
 
B

Ben Morrow

Greg G said:
Understood. I noticed that a lot of other modules don't have either
of these lines either, or if they do, they've got empty sets.
For fun, I went back and checked earlier versions of this, and they
all have the same lines in the Makefile.PL.
I'm somewhat confused as to how this is being built on any system at
all.

I'm not at all sure it is: search.cpan.pm says it was last updated in
2001, and it has no test results.
Errr. What other options might I have?

None. If you must use this module, you'll either have to fix it yourself
or contact the author and see if he'll fix it for you.
I'm looking at using
SNMP::Utils and SNMP::Multi, which depend on this. As I said, the docs
for Net::SNMP give me a complete headache, and I can't figure out how to
translate system calls to snmpget.

Sorry, knowing nothing about SNMP I can't help you here.

Ben
 
G

Greg G

Ben said:
None. If you must use this module, you'll either have to fix it yourself
or contact the author and see if he'll fix it for you.

Hmmm. It looks like the address given in
http://search.cpan.org/~gsm/ no longer exists.

SNMP::Utils hasn't been updated in forever.

Is there a way to alert CPAN and maybe have these marked as
deprecated or something?
Sorry, knowing nothing about SNMP I can't help you here.

Thanks. You've been helpful anyway.

-Greg G
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top