Solved

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

Posted on 2007-11-21
4
1,535 Views
Last Modified: 2013-12-27
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
Comment
Question by:sdcox
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 20330501
Any reason you're trying to compile Net-SNMP when it comes standard with Solaris 10?
0
 

Author Comment

by:sdcox
ID: 20330521
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
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 20330577
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
 

Expert Comment

by:on24it
ID: 32700577
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

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question