Hi,
I am installing ZoneMinder-0.9.15 in Redhat 6.2 kernel 2.2.19 (with MySQL 4.0.13). While doing make, I got the following error:
===
make all-recursive
make[1]: Entering directory `/home/etc/zm-0.9.15'
Making all in src
make[2]: Entering directory `/home/etc/zm-0.9.15/src'
source='zm_event.cpp' object='zm_event.o' libtool=no \
depfile='.deps/zm_event.Po' tmpdepfile='.deps/zm_event.TPo' \
depmode=gcc /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/mysql/include -g -O2 -c -o zm_e
vent.o `test -f 'zm_event.cpp' || echo './'`zm_event.cpp
In file included from zm_event.cpp:28:
zm_event.h:56: field `start_time' has incomplete type
zm_event.h:57: field `end_time' has incomplete type
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/home/etc/zm-0.9.15/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/etc/zm-0.9.15'
make: *** [all] Error 2
===
I have checked all my database (privilege, tables, etc.), they're all OK. However I noticed the error mentioned "field `start_time' has incomplete type" but I can't find that field ('start_time'), only StartTime and EndTime in table 'events'.
Did I miss anything? Can anybody help me?
Thanks a lot
problem in make ... field has incomplete type
Re: problem in make ... field has incomplete type
Basically that error is telling you that one of the fields in one of the zm_event.h's structs is undefined. Looking at line 56 of zm_event.h we see:
struct timeval start_time;
so start_time is supposed to be a timeval stuct.
Searching through all the header files that were included at the top of zm_event.h, I found the timeval struct defined in /usr/include/time.h (actually it is defined in /usr/include/bits/time.h which /usr/include/time.h includes). I should note that it has been this way as far back as 7.3... it might be defined in a different place, or perhaps, not at all in 6.2.
So you basically need to make sure that /usr/include in in your Makefile's include path.
Even if you do get past this error, I would think you'd have some problems with video 4 linux though since I think that was made for the 2.4 kernel... why are you using such an old distro?
struct timeval start_time;
so start_time is supposed to be a timeval stuct.
Searching through all the header files that were included at the top of zm_event.h, I found the timeval struct defined in /usr/include/time.h (actually it is defined in /usr/include/bits/time.h which /usr/include/time.h includes). I should note that it has been this way as far back as 7.3... it might be defined in a different place, or perhaps, not at all in 6.2.
So you basically need to make sure that /usr/include in in your Makefile's include path.
Even if you do get past this error, I would think you'd have some problems with video 4 linux though since I think that was made for the 2.4 kernel... why are you using such an old distro?
Re: problem in make ... field has incomplete type
The Makefile's include path was OK also.
I removed all the remarks at the top of zm_event.h (lots of includes there) and it's working.
Thanks for the hints.
I removed all the remarks at the top of zm_event.h (lots of includes there) and it's working.
Thanks for the hints.