Page 1 of 2

support for OpenBSD & MacOS X

Posted: Mon May 28, 2007 2:24 pm
by bsdman
+1

thanks
regards

Posted: Thu May 31, 2007 7:16 pm
by Lee Sharp
Talk the the v4l people first. That needs to be ported before zoneminder can even think of working.

Posted: Thu May 31, 2007 8:45 pm
by W.
but there is port for FreeBSD, so maybe it can be adapted for OpenBSD and OSX
http://www.zoneminder.com/forums/viewtopic.php?t=7862

Posted: Fri Jun 01, 2007 11:09 am
by bsdman
i try to use freebsd port but it seems hard and an awful hack.

as for v4l, i will ask but not sure there will be much
freebsd is in the todo:
http://www.linuxtv.org/v4lwiki/index.ph ... main_tasks

an alternative could be bktr(4) which is used on freebsd
and also available on openbsd
http://www.openbsd.org/cgi-bin/man.cgi? ... ormat=html

another discussion about v4l and *bsd on ffmpeg-devel@
http://lists.mplayerhq.hu/pipermail/ffm ... 01382.html

so it seems support out of linux is not possible or a long way ...

Posted: Sat Jun 09, 2007 6:27 pm
by freebsd-guy
bsdman wrote:i try to use freebsd port but it seems hard and an awful hack.
Please elaborate.

It's not much of a hack, and there's nothing particularly hard about it relative to how it works under Linux. ZoneMinder simply has a lot of dependencies on other tools, like apache, mysql, php, perl modules of all sorts. It's not any more complicated in FreeBSD than in Linux since all those other programs/modules must exist either way.

Obviously, one must be aware of how apache, mysql, php, etc. work. We're not talking about a simple one-executable software here, after all.

--rich

Posted: Sun Jun 10, 2007 5:18 am
by bsdman
i don't have anything against your work. it helps me a lot. problem is not about apache & co but about video driver v4l & bktr.

OpenBSD is not very friendly about webcam driver and i don't know it enough to go past the needed driver.
From what i see, i get the impression, these drivers are mostly needed for local webcam but are requirements.
if that's true, why not a configure/compile option to get zoneminder running only for network webcam ... porting would be easier as kernel part is notably less portable.

regards

Posted: Sun Jun 10, 2007 12:23 pm
by freebsd-guy
I agree about the camera drivers. If quadra's previous work on bktr driver interface didn't exist, I would have gone that way as I had no plans to use local camera functionality anyway. But since it was there, I didn't want to just throw it away.

I can't imagine it would be that hard to just get rid of local camera support for a particular build, though.

--rich

Posted: Sun Jul 27, 2008 1:03 pm
by bsdman
openbsd guys add a new driver uvideo to manage local usb camera
http://www.openbsd.org/cgi-bin/man.cgi? ... ormat=html

could it help to support openbsd ?

else i give a try to a build with 1.23.3 but i can't pass configure (openbsd 4.2/i386).
is there a way to build a minimal setup to test only a null camera, or only network camera
i encounter stops on libdl.a, perl modules dependencies (mandatory ???)

comments ?

Posted: Mon Jul 28, 2008 4:41 pm
by achix
Did you try the new 1.23.3 FreeBSD port?

Posted: Mon Jul 28, 2008 5:21 pm
by bsdman
not for now, i will check it when i have time for patches and rules as port system as changed a lot between bsd

but from previous discussions, it seems video subsystem was a lot differents also between bsd ...

Posted: Mon Jul 28, 2008 9:11 pm
by achix
from the man page of bktr of OpenBSD, i can see the meteor
API is supported.
The same holds for FreeBSD, and a lot of the local camera code (bktr) uses
the meteor ioctls.
Nothing special, apart from making things work :D

now that i think about it again, OpenBSD is about "security" right?
So i guess, zoneminder will have a natural tendency to compile and work in OpenBSD! :P

Posted: Mon Jul 28, 2008 9:45 pm
by bsdman
i try it before 4.3-current/4.4 and uvideo and there was nothing to do.

problems were zoneminder wants to support local camera when there were none possible and many mandatory packages, some of which are not in ports for now.
yes, the security aspect makes it a good alliance.
but some multimedia part like video camera are are still in infancy on openbsd ....

Posted: Tue Jul 29, 2008 4:52 am
by achix
problems were zoneminder wants to support local camera when there were none possible
Zoneminder local camera bktr code from FreeBSD should be easily ported.
and many mandatory packages, some of which are not in ports for now.
In which case you are asking in the wrong place.
The OpenBSD camp is the one responsible to do the porting for all those prerequisites,
before somebody starts with Zoneminder on OpenBSD.

BTW, which of these required ports are missing from OpenBSD ports tree?

Posted: Tue Jul 29, 2008 5:19 pm
by bsdman
here an error log for the building of my current port.
for now, i only take videodev.h from freebsd port

Code: Select all

===>  Cleaning for ZoneMinder-1.23.3
===>  ZoneMinder-1.23.3 depends on: php5-core-* - found
===>  ZoneMinder-1.23.3 depends on: p5-DBI-* - found
===>  ZoneMinder-1.23.3 depends on: p5-DBD-mysql-* - found
===>  ZoneMinder-1.23.3 depends on: p5-libwww-* - found
===>  ZoneMinder-1.23.3 depends on: p5-Archive-Zip-* - found
===>  ZoneMinder-1.23.3 depends on: p5-Archive-Tar-* - found
===>  ZoneMinder-1.23.3 depends on: p5-MIME-Lite-* - found
===>  ZoneMinder-1.23.3 depends on: p5-MIME-tools-* - found
===>  ZoneMinder-1.23.3 depends on: metaauto-* - found
===>  ZoneMinder-1.23.3 depends on: autoconf-2.61 - found
===>  ZoneMinder-1.23.3 depends on: gnutls-* - found
===>  ZoneMinder-1.23.3 depends on: pcre-* - found
===>  ZoneMinder-1.23.3 depends on: ffmpeg-* - found
===>  ZoneMinder-1.23.3 depends on: jpeg-* - found
===>  Verifying specs: gnutls pcre avcodec.>=8 avformat.>=8 avutil.>=2 jpeg gnutls pcre avcodec.>=8 avformat.>=8 avutil.>=2 jpeg c c
===>  found gnutls.12.25 pcre.1.1 avcodec.9.0 avformat.9.0 avutil.3.0 jpeg.62.0 c.41.0
===>  Checking files for ZoneMinder-1.23.3
`/path/ports/distfiles/ZoneMinder-1.23.3.tar.gz' is up to date.
>> (SHA256) ZoneMinder-1.23.3.tar.gz: OK
===>  Extracting for ZoneMinder-1.23.3
===>  Patching for ZoneMinder-1.23.3
Running autoconf-2.61 in /path/ports-obj/ZoneMinder-1.23.3/ZoneMinder-1.23.3
Running autoheader-2.61 in /path/ports-obj/ZoneMinder-1.23.3/ZoneMinder-1.23.3
===>  Configuring for ZoneMinder-1.23.3
configure: loading site script /usr/ports/infrastructure/db/config.site
checking for a BSD-compatible install... /usr/bin/install -c -o root -g bin
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... (cached) nawk
checking whether make sets $(MAKE)... (cached) yes
configure: WARNING: You can call configure with the --with-libarch option.
    This tells configure where to find architecture specific libraries.
    The default of 'lib' is usually ok but 64 bit machines may require lib64.
    e.g. --with-libarch=lib or --with-libarch=lib64
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether c++ accepts -g... (cached) yes
checking dependency style of c++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c -o root -g bin
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for size_t... (cached) yes
checking return type of signal handlers... (cached) void
checking for siginfo_t... yes
checking for struct sigcontext... yes
checking for struct sigcontext.eip... no
checking for ucontext_t... yes
checking how to run the C++ preprocessor... c++ -E
checking mysql/mysql.h usability... yes
checking mysql/mysql.h presence... yes
checking for mysql/mysql.h... yes
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking whether round is declared... yes
checking whether strsignal is declared... yes
checking whether MD5 is declared... yes
checking whether backtrace is declared... no
checking for jpeg_start_compress in -ljpeg... yes
checking for compress in -lz... yes
checking for mysql_init in -lmysqlclient... yes
checking for MD5 in -lgnutls-openssl... yes
checking for pcre_compile in -lpcre... yes
checking for ff_gcd in -lavutil... yes
checking for avcodec_init in -lavcodec... yes
checking for av_new_stream in -lavformat... yes
checking for sws_scale in -lswscale... no
checking for perl... (cached) /usr/bin/perl
checking for perl version greater than or equal to 5.6.0... ok
checking for perl module Sys::Syslog... ok
checking for perl module DBI... ok
checking for perl module DBD::mysql... ok
checking for perl module Getopt::Long... ok
checking for perl module Time::HiRes... ok
checking for perl module Date::Manip... ok
checking for perl module LWP::UserAgent... ok
checking for perl module PHP::Serialization... ok
checking for perl module Module::Load... no
configure: WARNING: Module::Load is required for PTZ camera control
checking for perl module Device::SerialPort... no
configure: WARNING: Device::SerialPort is required for RS232/RS485 PTZ camera control
checking for perl module Net::FTP... ok
checking for perl module Archive::Tar... ok
checking for perl module Archive::Zip... ok
checking for perl module Net::SMTP... ok
checking for perl module MIME::Lite... ok
checking for perl module MIME::Entity... ok
checking for perl module X10::ActiveHome... no
configure: WARNING: X10::ActiveHome is required for X.10 support
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating web/graphics/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating config.h
config.status: executing depfiles commands
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating web/graphics/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating zm.conf
config.status: creating src/zm_config.h
config.status: creating web/zm_config.php
config.status: creating scripts/zm
config.status: creating db/zm_create.sql
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating web/graphics/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating zm.conf
config.status: creating src/zm_config.h
config.status: creating web/zm_config.php
config.status: creating scripts/zm
config.status: creating db/zm_create.sql
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Base.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Config.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating web/graphics/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating zm.conf
config.status: creating src/zm_config.h
config.status: creating web/zm_config.php
config.status: creating scripts/zm
config.status: creating db/zm_create.sql
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Base.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Config.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm
config.status: creating scripts/zmdbbackup
config.status: creating scripts/zmdbrestore
config.status: creating scripts/zmeventdump
config.status: creating scripts/zmlogrotate.conf
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
checking for scripts/ZoneMinder/Makefile... no
Checking if your kit is complete...
Looks good
Writing Makefile for ZoneMinder
===>  Building for ZoneMinder-1.23.3
make  all-recursive
Making all in src
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 zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
zmc.cpp:22:20: values.h: No such file or directory
In file included from zmc.cpp:26:
zm_signal.h:24:22: execinfo.h: No such file or directory
In file included from jinclude.h:20,
                 from zm_jpeg.h:22,
                 from zm_image.h:33,
                 from zm_monitor.h:26,
                 from zmc.cpp:27:
/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 zmc.cpp:24:
../config.h:74:1: warning: this is the location of the previous definition
In file included from /usr/local/include/ffmpeg/avformat.h:36,
                 from zm_mpeg.h:29,
                 from zm_stream.h:27,
                 from zm_event.h:36,
                 from zm_zone.h:27,
                 from zm_monitor.h:27,
                 from zmc.cpp:27:
/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_stream.h:27,
                 from zm_event.h:36,
                 from zm_zone.h:27,
                 from zm_monitor.h:27,
                 from zmc.cpp:27:
/usr/local/include/ffmpeg/avformat.h:292: warning: `AVFrac' is deprecated 
   (declared at /usr/local/include/ffmpeg/avformat.h:118)
In file included from zm_zone.h:27,
                 from zm_monitor.h:27,
                 from zmc.cpp:27:
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
zmc.cpp: In function `int main(int, char**)':
zmc.cpp:218: error: `MAXINT' undeclared (first use this function)
zmc.cpp:218: error: (Each undeclared identifier is reported only once for each 
   function it appears in.)
*** Error code 1

Stop in /path/ports-obj/ZoneMinder-1.23.3/ZoneMinder-1.23.3/src.
*** Error code 1

Stop in /path/ports-obj/ZoneMinder-1.23.3/ZoneMinder-1.23.3 (line 330 of Makefile).
*** Error code 1

Stop in /path/ports-obj/ZoneMinder-1.23.3/ZoneMinder-1.23.3 (line 222 of Makefile).
*** Error code 1

Stop in /path/new-ports/zoneminder (line 2063 of /usr/ports/infrastructure/mk/bsd.port.mk).


the only missing package was PHP-Serialization and it's an easy cpan port to do.

Posted: Tue Jul 29, 2008 5:54 pm
by achix
your next problem is libexecinfo.
try copying it (/usr/local/include/execinfo.h) from FreeBSD.