PDA

View Full Version : db.c: In function 'zbx_db_vexecute': 'suseconds_t' undeclared (first use in this func


snerge
28-06-2007, 14:51
Hello,

I am trying to compile zabbix 1.4 on hp-ux 11i with gcc 4.2.0

net-snmp is installed and working
mysql is installed and working

First, I had to replace all references to sysinfo.h for unistd.h in the configure script or it would complain and fail compiling zbxcrypto

checking sys/sysinfo.h presence... yes
configure: WARNING: sys/sysinfo.h: present but cannot be compiled
configure: WARNING: sys/sysinfo.h: check for missing prerequisite headers?
configure: WARNING: sys/sysinfo.h: see the Autoconf documentation
configure: WARNING: sys/sysinfo.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result
configure: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence


Configure used : ./configure --prefix=/opt/zabbix --enable-server --with-net-snmp --with-mysql

Once modified for unistd.h, the configure script stoped complaining and all modules compiled up to zbxdb

When I run the make install, it starts compiling then fails at "Making install in zbxdb" with the following ouput :

db.c: In function 'zbx_db_vexecute':
db.c:337: error: 'suseconds_t' undeclared (first use in this function)
db.c:337: error: (Each undeclared identifier is reported only once
db.c:337: error: for each function it appears in.)
db.c:337: error: expected ';' before 'msec'
db.c:348: error: 'msec' undeclared (first use in this function)
db.c: In function 'zbx_db_vselect':
db.c:587: error: 'suseconds_t' undeclared (first use in this function)
db.c:587: error: expected ';' before 'msec'
db.c:598: error: 'msec' undeclared (first use in this function)
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

I'm pretty sure it has something to do with the headers but I really don't know what I could try to fix it.

Any C / HP-UX guru who could give me some lead ?

Regards

snerge

Alexei
28-06-2007, 21:29
Fixed in pre 1.4.1 code. We are releasing ZABBIX 1.4.1 tomorrow.

snerge
28-06-2007, 22:28
thanks Alexei

I'll be testing 1.4.1 asap and reporting to this thread.

Regards

Serge

snerge
03-07-2007, 15:00
I tryed with 1.4.1 and it did not compile but with different error messages, I will be opening a new thread.