Page 2 of 2

Posted: Tue Jul 29, 2008 9:34 pm
by bsdman
more problems, it misses
* values.h
to replace with limits.h
* execinfo.h
it seems to be a glibc only file
http://www.gnu.org/software/gnulib/manu ... 002eh.html
do you have a stub for freebsd ?
why it is not tested in configure like
http://osdir.com/ml/network.bit-torrent ... 00021.html
=>
for both, i patch configure.in and related to have #ifdef and it seems ok
* a header with MAXINT defined
not found in limits.h (???)
=>
nothing like this in /usr/include


and c++ errors
zm_event.h:220: error: `bool EventStream::loadInitialEventData(int, int)' and `
bool EventStream::loadInitialEventData(int, int)' cannot be overloaded
zm_event.h:244: error: `void EventStream::setStreamStart(int, int)' and `void
EventStream::setStreamStart(int, int)' cannot be overloaded

=> here i need help from devs ...
$ g++ -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.2/3.3.5/specs
Configured with:
Thread model: single
gcc version 3.3.5 (propolice)


thanks

Posted: Wed Jul 30, 2008 4:52 am
by bsdman
i see after posting, freebsd patches solves c++ errors.
left the MAXINT error.

Posted: Wed Jul 30, 2008 7:01 am
by achix
for libexecinfo, look at the FreeBSD port.
Cant help much here.

For the MAXINT error, just find the max int in your system or find how it is named
and where it is defined, and stick it in.
e.g. in my i386 system it is 0x7fffffff

Posted: Wed Jul 30, 2008 7:21 pm
by bsdman
ok for MAXINT, i defined it from INT_MAX in limits.h

next error is

Code: Select all

c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -I/usr/local/include -Wall -Wno-sign-compare -I/usr/local/include  -Wbounded -Wformat -MT zm_event.o -MD -MP -MF .deps/zm_event.Tpo -c -o zm_event.o zm_event.cpp
In file included from /usr/local/include/ffmpeg/avformat.h:36,
                 from zm_mpeg.h:29,
                 from zm_event.cpp:32:
/usr/local/include/ffmpeg/avcodec.h:2472: warning: `ImgReSampleContext' is  
   deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:2469)
/usr/local/include/ffmpeg/avcodec.h:2479: warning: `ImgReSampleContext' is  
   deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:2469)
/usr/local/include/ffmpeg/avcodec.h:2483: warning: `ImgReSampleContext' is  
   deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:2469)
/usr/local/include/ffmpeg/avcodec.h:2485: warning: `ImgReSampleContext' is  
   deprecated (declared at /usr/local/include/ffmpeg/avcodec.h:2469)
In file included from zm_mpeg.h:29,
                 from zm_event.cpp:32:
/usr/local/include/ffmpeg/avformat.h:292: warning: `AVFrac' is deprecated 
   (declared at /usr/local/include/ffmpeg/avformat.h:118)
In file included from jinclude.h:20,
                 from zm_jpeg.h:22,
                 from zm_image.h:33,
                 from zm_event.h:35,
                 from zm_event.cpp:34:
/usr/local/include/jconfig.h:12:1: warning: "HAVE_STDLIB_H" redefined
In file included from zm_config.h:20,
                 from zm.h:28,
                 from zm_event.cpp:30:
../config.h:83:1: warning: this is the location of the previous definition
zm_event.cpp: In constructor `Event::Event(Monitor*, timeval, const char*,
   const char*)':
zm_event.cpp:58: error: invalid conversion from `long int*' to `const time_t*'
zm_event.cpp: In destructor `Event::~Event()':
zm_event.cpp:168: error: invalid conversion from `long int*' to `const time_t*'
zm_event.cpp: In member function `bool Event::SendFrameImage(const Image*,
   bool)':
zm_event.cpp:298: warning: int format, ssize_t arg (arg 2)
zm_event.cpp:298: warning: int format, ssize_t arg (arg 3)
zm_event.cpp: In member function `bool EventStream::loadInitialEventData_t(int,
   int)':
zm_event.cpp:474: warning: long int format, time_t arg (arg 5)
zm_event.cpp:474: warning: long int format, time_t arg (arg 5)
zm_event.cpp: In member function `virtual void
   EventStream::processCommand(const StreamBase::CmdMsg*)':
zm_event.cpp:897: warning: long int format, time_t arg (arg 4)
*** Error code 1
problem in constructor / destrictor
(like here http://www.zoneminder.com/forums/viewtopic.php?p=44028)

l.58 is

Code: Select all

struct tm *stime = localtime( &start_time.tv_sec );
i changed it to

Code: Select all

struct tm *stime = localtime( (const time_t *)(&start_time.tv_sec) );
same on line 158
=> solved

next, another header problem, need sys/types.h to defined uid_t for ipc.h here
=> include in configure.in

next

Code: Select all

c++ -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include -I/usr/local/include -Wall -Wno-sign-compare -I/usr/include -I/usr/l
ocal/include  -Wbounded -Wformat -MT zm_user.o -MD -MP -MF .deps/zm_user.Tpo -c -o zm_user.o zm_user.cpp
zm_user.cpp: In function `User* zmLoadAuthUser(const char*, bool)':
zm_user.cpp:193: error: `MD5_DIGEST_LENGTH' undeclared (first use this 
   function)
zm_user.cpp:193: error: (Each undeclared identifier is reported only once for 
   each function it appears in.)
zm_user.cpp:213: error: `md5sum' undeclared (first use this function)
*** Error code 1
seems, it comes from openssl/md5.h but from configure and zm_user.h, i work with gnutls.
but there is no MD5_DIGEST_LENGTH in these headers ...
don't understand when HAVE_LIBCRYPTO is defined so openssl/md5.h is included.
=> reorder inclusion

Code: Select all

zm_mpeg.cpp: In destructor `VideoStream::~VideoStream()':
zm_mpeg.cpp:281: error: cannot convert `ByteIOContext' to `ByteIOContext*' for 
   argument `1' to `int url_fclose(ByteIOContext*)'
=> depend on the value of ZM_FFMPEG_SVN in zm_mpeg.h
have
$ pkg_info |grep ffmpeg
ffmpeg-20070501p0
=> comment ifdef to have correct situation.

at the end compiling is ok.
still need to see if it works, but have no supported camera for now.
also, finish a correct install, which will also be hard with chrooted apache.

i will send on the forum the port and patches after a bit of polishing.
It would be great if zoneminder devs could include part/all of them in default distribution.

Posted: Thu Jul 31, 2008 3:40 am
by achix
ok. good.
Do you have a bktr capture card?
i will send on the forum the port and patches after a bit of polishing.
It would be great if zoneminder devs could include part/all of them in default distribution.
That's the job of the OpenBSD port maintainer ... YOU!
Zoneminder releases only one distribution.

Posted: Thu Jul 31, 2008 7:25 pm
by bsdman
no, i don't have bktr card.
though, i planned to buy a network camera, but maybe it will wait some months.

it seems you can't upload file here ...
and i don't find email ...
need to use forum email.

I think it's a devs job to ensure code is clean, portable, secured and fast ...
and part of the patch are useful for linux too.
for example, google says values.h is deprecated on google and have to be replaced by limits.h which is the same header as bsd.

as for maintainer, i do part of initial work but i'm sure, i will not able to follow it year by year.

Posted: Thu Jul 31, 2008 8:00 pm
by achix
We are living in a linux world!, therefore the best we can do
is build tools that suit our communities and help each other in the various BSD camps,
while keeping in touch with the linux guys who lead most of the application development.

P.S.
I never got that close to an OpenBSD system, until with you!, maybe i will install it in a spare
machine of the house, to run squid and firewall maybe!

Posted: Thu Jul 31, 2008 11:03 pm
by cordel
achix wrote:ok. good.
Do you have a bktr capture card?
i will send on the forum the port and patches after a bit of polishing.
It would be great if zoneminder devs could include part/all of them in default distribution.
That's the job of the OpenBSD port maintainer ... YOU!
Zoneminder releases only one distribution.
Not really, If you where to create the configure script to either detect bsd or add a switch like say:
./configure --enable-bsd

and make your patchs such that it don't change a linux build but will change based upon what configure does, or some other proper way, we would likely be glad to add patches to the main trunk. It just has to be a little more thought out :wink:

Posted: Fri Aug 01, 2008 7:28 am
by achix
That would be ideal, but
I dont know to what extent a generic -enable-bsd switch would magically solve all *BSD issues,
taking into account that even between FreeBSD 6.3 and 7.0 there are compilation discrepancies,
therefore a modified port's Makefile is needed for 6.x (more info on that http://www.zoneminder.com/forums/viewto ... 5&start=15)
Taking into account that we have FreeBSD,OpenBSD,NetBSD,DFBSD,OSX,DesktopBSD,PCBSD, etc... the first 5 having different kernels and "world"(official OS userland programs/libs (tar,ls,etc...))
it would be very difficult to support all of them and all their recent versions in just one distribution. (thats why packages exists for linuxes as well, i guess).

One other factor regarding BSDs and specialized (in contrast to commodity) S/W (like zoneminder)
is the lack of people to work on a project, which is very usual in BSD world. It is only after one
individual is personally interested, that an effort begins.

curious if there is any progress on OSX?

Posted: Thu Aug 14, 2008 11:15 am
by madmanzero
i read the forum sometime ago there is this italian guy did some work. i have try to contact him.. but he have not reply. wonder if anybody see anything? it will seem there is decent driver for osx with USB CAM?