Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1631
  • Last Modified:

Solaris 10 & Net-SNMP: fatal errors in make! Help?

Hi everyone
I am trying to install net-snmp on my solaris 10 box. I have downloaded the most recent stable source and extracted. Zlib, gcc, and openssl are installed. I am getting fatal errors on make, and really need help figuring out what's going wrong here. I appreciate any help you can give me!

I am running on x86 hardware, Solaris 10.

I ran configure and it was fine.The  command was:
./configure --with-mib-modules="ucd-snmp/lmSensors ucd-snmp/diskio" --with-cc=gcc
I also tried just ./configure with no options

Then when I ran make i got some errors. I attached the text i get after issuing make as a code snippet. Hope that helps!

I am terrible about figuring these things out. I could really use a gurus help! thanks so much!

making all in /usr/local/src/net-snmp-5.4.1/snmplib
making all in /usr/local/src/net-snmp-5.4.1/agent
/bin/sh ../libtool --mode=compile gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -g -O2 -Usolaris2 -Dsolaris2=solaris2 -c -o snmp_vars.lo snmp_vars.c
s2 -c -o snmp_vars.lo snmp_vars.c
 gcc -I. -I../agent -I../agent/mibgroup -I../snmplib -g -O2 -Usolaris2 -Dsolaris2=solaris2 -c snmp_vars.c -fPIC -DPIC -o.libs/snmp_vars.0
In file included from snmp_vars.c:133:
/usr/include/netinet/in_pcb.h:40: error: field `inp_route' has incomplete type
In file included from ./mibgroup/kernel_sunos5.h:16,
                        from ../agent/mibgroup/mib_module_includes.h:91,
                        from snmp_vars.c:150;
/usr/include/inet/mib2.h:12:47: sys/tsol/label.h: No such file or directory
/usr/include/inet/mib2.h:13:53: sys/tsol/label_macro.h: No such file or directory
In file included from ./mibgroup/kernel_sunos5.h:16,
                 from ../agent/mibgroup/mib_module_includes.h:91,
                 from snmp_vars.c:150:
/usr/include/inet/mib2.h:589: error: syntax error before "brange_t"
/usr/include/inet/mib2.h:714: error: syntax error before "bslabel_t"
*** Error code 1
make: Fatal error: Command failed for targe `snmp_vars.lo'
Current working directory /usr/local/src/net-snmp-5.4.1/agent
*** Error code 1
The following command caused the error:
if test "snmplib agent apps man local mibs" != ""; then \
           it="snmplib agent apps man local mibs" ; \
           for i in $it ; do \
                     echo "making all in `pwd`/$i"; \
                     ( cd $i ; make 0 ; \
                     if test $? != 0 ; then \
                                exit 1 ; \
                     fi \
           done \
fi
make: Fatal error: Command failed for target `subdirs'

Open in new window

0
sdcox
Asked:
sdcox
  • 2
1 Solution
 
TintinCommented:
Any reason you're trying to compile Net-SNMP when it comes standard with Solaris 10?
0
 
sdcoxAuthor Commented:
Hey Tintin


Well, yeah, a couple of reasons. I was having trouble getting the included version to work--I did some research and someone on the net said they compiled the new version and it fixed his issue. I wanted to have the updated version, and it's a good learning experience, too.

Or it was supposed to be. :)
0
 
TintinCommented:
What trouble were you having with the default Solaris version?  I have it running on a number of Solaris 10 boxes and have never had any problems.

Looking at the notes for net-snmp on sunfreeware.com, it says:

Compiled with:

./configure --with-mib-modules=host disman/event-mib ucd-snmp/diskio smux agentx mibII/mta_sendmail --with-cc=gcc.

It is important to read the README.solaris file in /usr/local/doc/net-snmp for some details on installation and potential problems with net-snmp and Solaris.
0
 
on24itCommented:
I had to compile net-snmp on Solaris 10 from source (in order to install mod-apache-snmp) and had similar errors.

Using GNU gcc fixed the problem. Download the latest GNU gcc (and prerequisite libiconv) from http://www.sunfreeware.com/. Make sure to update PATH and LD_LIBRARY_PATH so that /usr/local/bin and /usr/local/lib appear before /usr/sfw/bin and /usr/sfw/lib, respectively.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now