Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2007-11-21
4
Medium Priority
?
1,593 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…
Suggested Courses

782 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