PDA

View Full Version : FreeBSD Build errors (version 1.3)


Yorick
17-11-2006, 15:56
Hello,

There are a some build errors when building zabbix 1.3 on FreeBSD 6.1

The command I used:

./configure --enable-static --enable-agent --enable-server --with-mysql && make install

Also tried gmake, same problems.
GNU Make 3.81
gcc version 3.4.4 [FreeBSD] 20050518

These are files missing commas:

src/libs/zbxsysinfo/freebsd/cpu.c:152
src/libs/zbxsysinfo/freebsd/diskio.c:181
src/libs/zbxsysinfo/freebsd/diskio.c:192
src/libs/zbxsysinfo/freebsd/diskio.c:268
src/libs/zbxsysinfo/freebsd/diskspace.c:227

And files with inserted tabs between # and define or if

src/common.h - several lines
include/zbxtypes.h - several lines

src/libs/zbxsys/mutexs.c:27
When I fixed this tab problem I still get:
mutexs.c:28: error: redefinition of `union semun'
No problem when I comment this section out.

There is also a problem with the include of common.h, which includes zbxtypes.h:

src/libs/zbxcommon/misc.c:40: undefined reference to `__UINT64_C'

Fixed by putting #define __UINT64_C(x) x
in /include/commond.h. But it shouldn't be necessary there.

I can give you access to a FreeBSD machine if you want, so building and running zabbix on FreeBSD works.

Greetings,

Yorick

darko
11-01-2007, 06:40
Thanks for posting the corrections of those errors, got Zabbix 1.3.2 running on FreeBSD 6.1.

I built with "./configure --enable-server --enable-agent --with-mysql --with-net-snmp"

The only message I did not receive which you have listed above was "src/libs/zbxcommon/misc.c:40: undefined reference to `__UINT64_C'".


*update* I could not get the web interface to work. I went through the installation process, but when I clicked finish at the end, it just sent me back to the first step, even though the config file etc had been written to disk.

Alexei
11-01-2007, 07:40
Thanks for reporting this!

zipitup
11-01-2007, 10:59
Hello,

I got this error now on version 1.3.2 beta.
Would appreciate some help or fix.

Thanks.

Making install in freebsd
if gcc -DHAVE_CONFIG_H -I. -I. -I../../../../include -g -O2 -MT cpu.o -MD -MP -MF ".deps/cpu.Tpo" -c -o cpu.o cpu.c; then mv -f ".deps/cpu.Tpo" ".deps/cpu.Po"; else rm -f ".deps/cpu.Tpo"; exit 1; fi
cpu.c: In function `SYSTEM_CPU_UTIL':
cpu.c:152: error: syntax error before string constant
*** Error code 1

Stop in /root/zabbix-1.3.2/src/libs/zbxsysinfo/freebsd.
*** Error code 1

Stop in /root/zabbix-1.3.2/src/libs/zbxsysinfo/freebsd.
*** Error code 1

Stop in /root/zabbix-1.3.2/src/libs/zbxsysinfo.
*** Error code 1

darko
11-01-2007, 14:24
Zipitup: See the first post in this subject for what you need to edit to fix the various errors. Also, if you can get the web interface to work, I'd love to hear about it.

bene
11-01-2007, 23:27
Thanks for posting the corrections of those errors, got Zabbix 1.3.2 running on FreeBSD 6.1.

Using the fixes above, I also got it running on FreeBSD 6.1 AMD64. Actually I used the same configure line as well.

*update* I could not get the web interface to work. I went through the installation process, but when I clicked finish at the end, it just sent me back to the first step, even though the config file etc had been written to disk.

I had this problem initially also, and I was able to fix it, but I can't recall exactly how. :confused:

I'm fairly certain it was related to my PHP install. What version of PHP are you running? I'm at php5-5.2.0 installed from the ports tree. Looking at my logs, I reinstalled /usr/ports/math/php5-bcmath that day, and my recollection is that resolved the issue.

zipitup
15-01-2007, 11:06
Hey Darko,

I actually don't fully understand what the 1st post is trying to say/means.

My guess is those files listed in the first post has missing comma's, etc..

I'll take a look at it again later. ;)

NOB
30-03-2007, 09:20
Hi,

ZABBIX 1.3.4 compiles and links without any problems under FreeBSD 6.1,
Sparc 64.

configure line used was:

./configure --enable-agent --enable-server --with-pgsql --with-net-snmp --with-libcurl=/usr/local