1.28.1 for FreeBSD 10.1-RELEASE-p10

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

After 3 days of struggle and tweaking :
zm_event.cpp
zm_local_camera.cpp
zm_thread.h
zm_comms.cpp
zm_event.h
zm_logger.cpp
zm_timer.h
zm_comms.h
zm_ffmpeg_camera.cpp
zm_monitor.cpp
zmc.cpp

and
scripts/ZoneMinder/CMakeLists.txt
scripts/ZoneMinder/CMakeFiles/zmperlmodules.dir/build.make

with cmake cmd as :

cmake -C zm_conf.cmake -DCMAKE_C_COMPILER=gcc48 -DCMAKE_CXX_COMPILER=g++48 -DCMAKE_VERBOSE_MAKEFILE=ON -DHAVE_SENDFILE=OFF -DCMAKE_BUILD_TYPE=Debug .

I finally managed to correctly compile and install zoneminder 1.28.1 on FreeBSD 10.1 with updated packages.

However, it core dumps on zmc, its problem is the inclusion of zm_monitor.h. It core dumps with zm_monitor.h even if the body of main is empty. gdb ./zmc zmc.core shows nothing.

If anyone cares to shed some light into looking into this, that would be great.
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

After hacking zm_image.cpp with :
#define ZM_STRIP_SSE 1


and reverting back to CLANG/LLVM I FINALLY MANAGED TO HAVE STREAMING via zmc!!!!!!

and also reverting back to IPC SSH mem

cmake -C zm_conf.cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DHAVE_SENDFILE=OFF -DCMAKE_BUILD_TYPE=Debug -DZM_NO_MMAP=ON .


stay tuned....
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

Got my first motion detection.

Remarks so far :

- all listed above programs/scripts indeed need editing
- gcc48 g++48 do *NOT* produce a functioning zmc,
- so CLANG/LLVM is a must
- some ASM code will not compile with CLANG, hence the hack with zm_image.cpp
- some perl scripts (/usr/local/lib/perl5/ZoneMinder/General.pm) need tweaking, are broken by default
- for some reason creation of /usr/local/lib/perl5/site_perl/ZoneMinder/Memory.pm (program used by external perl scripts) did not respect -DZM_NO_MMAP=ON , while at the same time /usr/local/lib/perl5/ZoneMinder/Memory.pm seemed ok. Had to manually edit /usr/local/lib/perl5/site_perl/ZoneMinder/Memory.pm to revert back to SYSV IPC SHM, instead of mmap .
- MMAP does not seem to work with FreeBSD, had to revert to IPC SHM.

I cannot promise any port soon. But after I got the whole thing working + the monitoring perl for alarms , I will try to upload somewhere the resulting source tarball, in order to build, one is supposed to follow the instructions posted here, and make it work.

Then someone might pick it up and make a port out of it. Some changes like this one with zm_image.cpp do not seem so innocent to me, and I do not understand their internals, still fail to see where assembly code fits into place, but any way.

If anyone wants to help anyway, it would be great.
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

I tried with FreeBSD's mmap, and using a tmpfs fs for shared mem, but it turned out rather ugly. While I got some results via zmc and zms, the whole system was unstable. Reverted back to IPC SHM.
Hilbe
Posts: 5
Joined: Thu Jul 02, 2015 2:54 pm

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by Hilbe »

Subscribed. Thanks for your effort!
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

Hilbe wrote:Subscribed. Thanks for your effort!
Thanx for your interest.
I will try to make a set of patches against the official tarball, (to be compiled the traditional way as described in this thread, not FreeBSD-port style), and make it available somehow.
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

Hilbe
Posts: 5
Joined: Thu Jul 02, 2015 2:54 pm

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by Hilbe »

Any chance of a FreeBSD port update, I prefer the centralized update management that way too. I'm in no rush, I have a working Zoneminder on CentOS Behyve VM.
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

Hilbe wrote:
Any chance of a FreeBSD port update, I prefer the centralized update management that way too. I'm in no rush, I have a working Zoneminder on CentOS Behyve VM.
well this seems work for you then, get the patches, build a port and submit it to FreeBSD!
or just follow the instructions here.

I had better experiences with zoneminder on FreeBSD than Linux tho.

Also, thanx for sharing your CentOS Behyve setup. Did you make it play well out of the box? Or did it need some tweaking ?
Hilbe
Posts: 5
Joined: Thu Jul 02, 2015 2:54 pm

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by Hilbe »

achix wrote:
Hilbe wrote:
Any chance of a FreeBSD port update, I prefer the centralized update management that way too. I'm in no rush, I have a working Zoneminder on CentOS Behyve VM.
well this seems work for you then, get the patches, build a port and submit it to FreeBSD!
or just follow the instructions here.

I had better experiences with zoneminder on FreeBSD than Linux tho.

Also, thanx for sharing your CentOS Behyve setup. Did you make it play well out of the box? Or did it need some tweaking ?
CentOS and ZM work great. Simple setup using the zmrepo. Hardest part was figuring out behyve and getting it to work properly with CentOS - took some tricks to get it to use Grub2.

Would be cool if someone took over the port on FreeBSD. Prefer the native vs virtualized approach.
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

Hilbe wrote: Would be cool if someone took over the port on FreeBSD. Prefer the native vs virtualized approach.
nothing prevents you from building your native zoneminder executables following the instructions and code from this very thread. I don't think that a port is something to expect any time soon. Since I got my native zoneminder running, I realized I consumed all my time slots devoted to this. There have been some lousy attempts from FreeBSD people to create and submit a port, but since they didn't really have any interest on zoneminder, the results were poor.
chebo
Posts: 29
Joined: Wed Mar 16, 2016 4:38 am

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by chebo »

achix wrote:
Hilbe wrote: Would be cool if someone took over the port on FreeBSD. Prefer the native vs virtualized approach.
nothing prevents you from building your native zoneminder executables following the instructions and code from this very thread. I don't think that a port is something to expect any time soon. Since I got my native zoneminder running, I realized I consumed all my time slots devoted to this. There have been some lousy attempts from FreeBSD people to create and submit a port, but since they didn't really have any interest on zoneminder, the results were poor.

Hello. Do I understand correctly that you can install zoneminder on Freebsd? Please tell me in 2 words how to do it using your patch.
achix
Posts: 146
Joined: Tue Oct 02, 2007 9:38 am
Location: Greece

Re: 1.28.1 for FreeBSD 10.1-RELEASE-p10

Post by achix »

subscribe to some FreeBSD list, grab my patches, ask questions there, come back here if you need further help.
Post Reply