Solved

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

Posted on 2007-11-21
4
1,529 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
Comment Utility
Any reason you're trying to compile Net-SNMP when it comes standard with Solaris 10?
0
 

Author Comment

by:sdcox
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now