On 64 bit, it compiles fine, but 32 bit gives the error below. As to the output of the pkg_info command is http://pastebin.com/m68c4bca1. The contents of config.log is http://pastebin.com/m58bf3f5c
The 64 bit pkg_info ouput is http://pastebin.com/m22a988e3
The 64 bit contents of config.log file is http://pastebin.com/m55c84b4
My modified version of Makefile is http://pastebin.com/m7e48c846
My modified version of distinfo is http://pastebin.com/m7e2445d5
I was hoping someone could shed light on this one.
In file included from zm_zone.h:27,
from zm_monitor.h:26,
from zmc.cpp:28:
zm_event.h:231: error: 'bool EventStream::loadInitialEventData(int, time_t)' cannot be overloaded
zm_event.h:230: error: with 'bool EventStream::loadInitialEventData(int, int)'
zm_event.h:254: error: 'void EventStream::setStreamStart(int, time_t)' cannot be overloaded
zm_event.h:249: error: with 'void EventStream::setStreamStart(int, int)'
*** Error code 1
Stop in /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.24.2/src.
*** Error code 1
Stop in /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.24.2.
*** Error code 1
Stop in /usr/ports/multimedia/zoneminder/work/ZoneMinder-1.24.2.
*** Error code 1
Stop in /usr/ports/multimedia/zoneminder.
Advance Thanks
Greg
64 bit compiles, but 32 bit gives the following error
-
- Posts: 17
- Joined: Tue Sep 29, 2009 11:19 pm
-
- Posts: 17
- Joined: Tue Sep 29, 2009 11:19 pm
Both of them have this line in /usr/include/time.h
typedef __time_t time_t;
In /usr/include/machine/_types.h
64 bit:
#if defined(lint)
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef __int64_t __time_t;
32 bit:
typedef int __int32_t;
typedef __int32_t __time_t;
So I changed
typedef int __int32_t;
to
typedef long __int32_t;
and it compiled! So instead of changing the /usr/include/machine/_types.h, any way of changing zoneminder code to comply? Then of'course, I'll create the necessary patches of automate the modifications using diff.
typedef __time_t time_t;
In /usr/include/machine/_types.h
64 bit:
#if defined(lint)
/* LONGLONG */
typedef long long __int64_t;
/* LONGLONG */
typedef __int64_t __time_t;
32 bit:
typedef int __int32_t;
typedef __int32_t __time_t;
So I changed
typedef int __int32_t;
to
typedef long __int32_t;
and it compiled! So instead of changing the /usr/include/machine/_types.h, any way of changing zoneminder code to comply? Then of'course, I'll create the necessary patches of automate the modifications using diff.
Opps I was thinking inheritance overriding instead of function overloading. It appears the case is that 32-bit time_t is identical to int. The compiler doesn't like it because it can't distinguish the (int, int) and the (int, time_t) functions.
There might be an elegant solution to this problem like a compiler flag option or something.
If an elegant solution can't be found I can think of two dirty ways off the top of my head:
1) Change time_t to long in the function headers of the functions causing errors. Then, in the body of the functions, cast that long value back into a time_t value. In all the calls to the (int, time_h) functions you'll need to cast time_t, to long.
I assume time_t is interpreted as an unsigned number so the type converstion from time_t to long and vice-versa should work without problems.
-OR-
2) Add another parameter to each one of the functions in each causing the error. (For example, make the (int, time_h) function a (int, time_h, int)). Then add a dummy value for that 3rd parameter in all calls to that function in the Zoneminder code.
There might be an elegant solution to this problem like a compiler flag option or something.
If an elegant solution can't be found I can think of two dirty ways off the top of my head:
1) Change time_t to long in the function headers of the functions causing errors. Then, in the body of the functions, cast that long value back into a time_t value. In all the calls to the (int, time_h) functions you'll need to cast time_t, to long.
I assume time_t is interpreted as an unsigned number so the type converstion from time_t to long and vice-versa should work without problems.
-OR-
2) Add another parameter to each one of the functions in each causing the error. (For example, make the (int, time_h) function a (int, time_h, int)). Then add a dummy value for that 3rd parameter in all calls to that function in the Zoneminder code.
-
- Posts: 17
- Joined: Tue Sep 29, 2009 11:19 pm