Solved

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

Posted on 2007-11-21
4
1,532 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
netstat -a in AIX unix 8 37
ovirt 3.6 guest VM support oracle solaris 4 65
Using Grep to Find a file 8 87
AIX    Volume group Auto ON/OFF question 2 90
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

867 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

20 Experts available now in Live!

Get 1:1 Help Now