11-12-2013 10:54 AM - last edited on 11-13-2013 05:15 PM by Maiko-I
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
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
11-12-2013 01:06 PM
# swlist |grep -i C-ANSI-C
well.. I've found this url:
do you know if it is free?
11-12-2013 01:18 PM
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
11-12-2013 02:03 PM
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: : Execute permission denied.
./configure: "');': A test command parameter is not valid.
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
11-13-2013 02:34 AM - edited 11-13-2013 02:36 AM
>Could someone help me please?
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/snmpNotify
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.
11-13-2013 06:55 PM
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.
11-13-2013 07:35 PM
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/menuite