Operating System - HP-UX
1826537 Members
4309 Online
109695 Solutions
New Discussion

Re: Compiling Make errors on HP-UX 11.0 zabbix

 
Andrew Dutton
Frequent Advisor

Compiling Make errors on HP-UX 11.0 zabbix

I am trying to compile the zabbix deamons (not the server processes) on HP-UX 11.0 using the generic C compiler not GCC (you might be telling me to upgrade to gmake and gcc possibily). configure runs fine but then when I go to make it is :

Making all in src/zabbix_agent
Make: line 5: syntax error. Stop.
*** Error exit code 1

Stop.

I belive I am looking at the right Makefile it is compltaining about and run the cc commands by themselves and it works... so is it a problem with HP-UX make? is this common? I haven't did any building on my 11.0 yet so not sure if this is a common issue.

sample make
# Build rules

all:

cc -o ../../bin/zabbix_agent -g -I../../include zabbix_agent.c sysinfo.
c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include
/snprintf.c -Wall -lnsl
cc -o ../../bin/zabbix_agentd -g -I../../include zabbix_agentd.c sysinfo.c stats.c interfaces.c diskdevices.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c -Wall -lnsl

4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Compiling Make errors on HP-UX 11.0 zabbix

I think I know what is wrong but since you didn't attach the makefile, I can't tell for sure.

Make is about the only utility that is very sensitive to tabs as opposed to simply white space of any kind:

This is what your rules need to look like:
$(PROG) : $(OBJECTS} $(LIBS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBES) -o $(PROG)
strip $(PROG)

the leading tabs are essential so make sure your makefile conforms to this.
If it ain't broke, I can fix that.
Andrew Dutton
Frequent Advisor

Re: Compiling Make errors on HP-UX 11.0 zabbix

Thanks Clay... I did a set list in vi and sure enought they are there... I will try to upload the Makefile... see if it works. Not a big deal cause I just complided it out of make but I wanted to know if I should worry about this in the future. I succesfually have compilied zabbix on linux ws 3 and solaris 8 with no issues.
Andrew Dutton
Frequent Advisor

Re: Compiling Make errors on HP-UX 11.0 zabbix

well I thought I attached it... let me try again
Andrew Dutton
Frequent Advisor

Re: Compiling Make errors on HP-UX 11.0 zabbix

sorry seems to not want to attach but I did look at it and they are there.