Page 1 of 1

1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 5:17 am
by drookie
Hi.

I'm trying to use ZM on FreeBSD 8.2-RELEASE. I'm aware that most ppl use it on Linux, but since its in FreeBSD ports and especially since it's written on perl I decided to give it a try.

However, I encountered some problems. If they cannot be solved, I will switch to Linux, but at least I should ask first.

I have one ip camera, it's old Trendnet TV-IP100. I added it to ZM and created one monitor.
When I open the one and only monitor, I cannot see picture from camera. In the same time, each time zmwatch.log is starting to filling with records like:

06/22/11 10:49:37.827111 zmwatch[23454].ERR [Shared data size conflict in shared_data for monitor default, expected 328,
got 316]

I think this is not a coincidence.
Is there any way for me to fix this ?

Speaking about errors - I got another one. Shortly after starting zm I got in zmdc.log strings like

06/21/11 19:10:46.419987 zmdc[23419].INF ['zmc -m 1' stopping at 11/06/21 19:10:46]
06/21/11 19:10:46.617004 zmdc[23419].ERR ['zmc -m 1' exited abnormally, exit status 255]

Again, is there any way to debug why it's exiting ?

Thanks.

Re: 1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 7:47 am
by zoneminder
Are you using 32 or 64 bit FreeBSD as that might help me track down your first issue?

As for your second one, as there any other references to zmc in your logs? If not then you could try running it from the command line as

Code: Select all

export ZM_DBG_PRINT=1
/path/to/zmc -m 1
which might give you a better idea of what's happening. This assumes a bash-like shell by the way.

Re: 1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 9:58 am
by drookie
I'm using zm on i386.

I've already found the solution to the memory problem - it is to edit the /usr/local/lib/perl5/site_perl/5.8.9/ZoneMinder/Memory.pm file, and change $arch to 32, and $native to 4. But this may be the freebsd local problem, I hope the maintainer will fix it in later port revisions.

I didnt encounter any other functionality problem this far, except the zmc exiting issue.
I will continue to investigate zmc problem, thanks for your help.

Re: 1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 10:15 am
by zoneminder
Thanks. Can you tell me if the lines you changed were

Code: Select all

our $arch = int(3.2*length(~0));
our $native = $arch/8;
before or did they have other hard coded values in?

Re: 1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 10:19 am
by mastertheknife
A little offtopic but this is exactly the reason why i think a uniform shared memory layout is needed. Same size and offsets across all platforms will prevent problems like this and allow 32bit and 64bit to coexist nicely (e.g. 32bit perl and 64bit zoneminder). So far its working good in my experimental patch.

mastertheknife

Re: 1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 10:27 am
by zoneminder
Yes, I agree. That would make life a whole lot simpler so I don't know why I never did it :oops:

If you have a patch then please feel free to send it to me, or I can set you up with write access to the repo if you prefer. Then I can get it into the full release of 1.25.0.

Re: 1.2.24/FreeBSD

Posted: Wed Jun 22, 2011 10:42 am
by mastertheknife
zoneminder wrote:Yes, I agree. That would make life a whole lot simpler so I don't know why I never did it :oops:

If you have a patch then please feel free to send it to me, or I can set you up with write access to the repo if you prefer. Then I can get it into the full release of 1.25.0.
Sent you a PM :D

Re: 1.2.24/FreeBSD

Posted: Thu Jun 23, 2011 12:10 pm
by drookie
zoneminder wrote:Thanks. Can you tell me if the lines you changed were

Code: Select all

our $arch = int(3.2*length(~0));
our $native = $arch/8;
before or did they have other hard coded values in?
They were exactly same as here.