Operating System - HP-UX
1748104 Members
4706 Online
108758 Solutions
New Discussion

net-snmp compilation issue

 
Fefers
Frequent Advisor

net-snmp compilation issue

Hello experts, I hope you're doing great :D

 

I need to compile net-snmp on some HP-UX (PA-RISC and IA64) servers and I had an issue during the compilation.

 

 

HP-UX hostname B.11.31 U 9000/800 

net-snmp-5.7.2

 

The output and log file is attached.

 

Could someone help me please?

 

 

thanks in advance

 

 

P.S. This thread has been moved from HP-UX > General to HP-UX > languages. - HP Forum Moderatir

7 REPLIES 7
RudyW
Occasional Advisor

Re: net-snmp compilation issue

Hello Fefers--

 

   I am curious if you have a full version of an ANSI C compiler. Can you show the output of "swlist"?

 

Rudy

 

Fefers
Frequent Advisor

Re: net-snmp compilation issue

Hi Rudy..

 

# swlist |grep -i C-ANSI-C
#

 

well.. I've found this url:

http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=8508078442f02110078442f02110275d6e10RCRD

 

do you know if it is free?

 

RudyW
Occasional Advisor

Re: net-snmp compilation issue

Hi Fefers--

 

   OK, so you don't have HP's ANSI C compiler. It is free for HP partners, not for end users.

 

   You can always try the GNU C compiler. http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/

 

Rudy

Fefers
Frequent Advisor

Re: net-snmp compilation issue

Rudy,

 

I've already tried to compile using gcc.

 

# swlist |grep -i gcc
gcc 4.2.3 gcc
libgcc 4.2.3 libgcc

 

 

./configure will avoid this prompt.

Location to write persistent information (/var/net-snmp):
setting Location to write persistent information to... /var/net-snmp
checking if I need to feed myself to ksh... no
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for a BSD-compatible install... ./install-sh -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for file... file
checking for find... find
checking for whoami... whoami
checking for autoconf... no
checking for autoheader... no
checking for perl... /usr/bin/perl
checking for ps... /usr/bin/ps
checking for python... no
checking for uname... /usr/bin/uname
checking whether the Perl function system() invokes a POSIX shell... syntax error at -e line 1, at EOF
Execution of -e aborted due to compilation errors.
./configure[6503]: : Execute permission denied.
./configure[6503]: "');': A test command parameter is not valid.
yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/net-snmp-5.7.2':
configure: error: C compiler cannot create executables
See `config.log' for more details

 

 

the log is attached

Dennis Handly
Acclaimed Contributor

Re: net-snmp compilation issue

>Could someone help me please?

 

in config.log:

configure:6836: cc --version >&5
(Bundled) cc: warning 422: Unknown option "-" ignored.

You're not going to be able to use the bundled C compiler to build this.  You'll need to use gcc.

 

You're going to have to look at your files where the errors are:

target/target_counters_5_5 target/snmpTargetAddrEntrycpp: "./agent/mibgroup/target/snmpTargetParamsEntry.h", line 75: error 4029: #endif without matching #if.

 

ucd-snmp/pass_common hardware/memory hardware/cpu header_complexcpp: "./agent/mibgroup/snmp-notification-mib/snmpNotifyFilterTable/snmpNotifyFilterTable.h", line 32: error 4036: Can't open include file 'snmpNotifyFilterTable_constants.h'.

 

And a whole bunch more with other .h files.  This could be due to a missing -I?

 

And before those errors is:

checking for and configuring mib modules to use... default_modules. default_modules snmpv3mibs mibII ucd_snmp notification notification-log-mib target agent_mibs agentx disman/event

 

I don't see the gcc compile line??  It appears to be using the C compiler to compile C++??

 

>I've already tried to compile using gcc.

 

gcc doesn't seem to be in your PATH.

SoumitraC
Frequent Advisor

Re: net-snmp compilation issue

As already pointed out, you must use the right compiler for the build. If it can't find gcc by default, use the environment variable 'CC' to point to the compiler. Use "./configure --help" for instructions.

 

I assume you have installed net-snmp in the default location? If not, you'll need to pass in the right set of -I and -L to help pick up the required headers and libraries.

 

It seems that the missing header "snmpNotifyFilterTable_constants.h" has been previously reported on other platforms. You may want to research a little on that to check if a patch or workaround is available. You may even want to reinstall net-snmp afresh and ensure the missing headers are indeed available on the system.

 

 

Soumitra C
HP-UX Compilers

Re: net-snmp compilation issue

 

The latest HP-UX GNU C/C++compiler is 4.7.1. You can download it from www.hp.com/go/gcc. Direct link for downloading the depot is  http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2a08725cc2f02110725cc2f02110275d6e10RCRD. For any queries related to HP-UX GNU C/C++ compiler tool chain please write to gcc-help@lists.hp.com.

 

Regards,

Kannan