Installation error in CentOS 5.5

Forum for questions and support relating to the 1.24.x releases only.
clipo
Posts: 82
Joined: Sat Sep 06, 2008 9:55 am
Location: Manchester, UK
Contact:

Post by clipo » Wed Feb 09, 2011 7:36 pm

moo wrote:Ah, getting the dreadded mmap errors now! Have come across this with my last working build in the past so will crack on with fixing...however find it slightly odd that I wasn't experiencing this with the .2 install?

Clipo did you experience this error @ compile time by any chance, too?

Code: Select all


configure: error: zm requires Sys::Mmap for mapped memory
Moo, Yes I did come across that error and a few more and solved them with the method described above,

To my knowledge there is still some thing broken inside the CentOS 5.5 release that causes the build process to be difficult and I'm convinced some functions of ZM are not working correct, it seem to be related to ffmpeg but I have tried to compile 0.5 from source and ended up with various errors.

If its of help to the admin I will recreate the problems and post detailed logs.

moo
Posts: 11
Joined: Tue Jun 29, 2010 10:44 am

Post by moo » Thu Feb 10, 2011 10:47 am

seems that way, be interesting to see your logs :)

fixed mmap but again still having issues with ffmpeg when doing make for zoneminder, will try a couple of different [ffmpeg] releases again :)

moo
Posts: 11
Joined: Tue Jun 29, 2010 10:44 am

Post by moo » Thu Feb 10, 2011 11:08 am

Ok, so the error looks different now, this is back to ffmpeg 0.6.1, which looked like a cleaner install than the latest version from their git repo.

Code: Select all

make  all-recursive
make[1]: Entering directory `/ZoneMinder-1.24.3'
Making all in src
make[2]: Entering directory `/ZoneMinder-1.24.3/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include   -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_mpeg.h:23,
                 from zm_stream.h:27,
                 from zm_event.h:39,
                 from zm_zone.h:27,
                 from zm_monitor.h:26,
                 from zmc.cpp:28:
zm_ffmpeg.h:33:2: error: #error "No location for avutils.h found"
zm_ffmpeg.h:40:2: error: #error "No location for avcodec.h found"
zm_ffmpeg.h:47:2: error: #error "No location for avformat.h found"
zm_ffmpeg.h:55:2: error: #error "No location for swscale.h found"
zm_mpeg.h:43: error: use of enum âPixelFormatâ without previous declaration
zm_mpeg.h:44: error: ISO C++ forbids declaration of âAVOutputFormatâ with no type
zm_mpeg.h:44: error: expected â;â before â*â token
zm_mpeg.h:45: error: ISO C++ forbids declaration of âAVFormatContextâ with no type
zm_mpeg.h:45: error: expected â;â before â*â token
zm_mpeg.h:46: error: ISO C++ forbids declaration of âAVStreamâ with no type
zm_mpeg.h:46: error: expected â;â before â*â token
zm_mpeg.h:47: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:47: error: expected â;â before â*â token
zm_mpeg.h:48: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:48: error: expected â;â before â*â token
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/ZoneMinder-1.24.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ZoneMinder-1.24.3'
make: *** [all] Error 2
im a network/IT bod, definitely no programer hehe, however does this look to you guys like it's a problem with swscale again? maybe I'm missing some more libs?

andywright
Posts: 10
Joined: Mon Aug 20, 2007 7:15 pm
Location: Leeds, UK

Post by andywright » Thu Feb 10, 2011 11:11 am

if it's any help to you guys trying to install on CentOS, this is a script I wrote that downloads and installs ZM and its pre-requisites. Works fine for me on Centos 5.5 32bit.

It also installs the files needed for the EyeZM iPhone client and h264 streaming - comment those out if you don't need em.

With 1.24.3 I have problems that I didn't see in 1.24.2, mostly things like missing events and status info in the monitor window. Would be interested if others are having these problems too.

Andy.



#!/bin/bash

rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpm ... f.i386.rpm

yum -y install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel ImageMagick perl-Archive-Tar perl-MIME-Lite perl-MIME-tools perl-Date-Manip perl-LWP-UserAgent-Determined perl-Sys-Mmap perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Module-Load subversion git yasm netpbm netpbm-progs bzip2-devel nasm autoconf automake libtool

cd /root

wget http://www.zoneminder.com/fileadmin/dow ... bozola.jar
#svn co http://svn.zoneminder.com/svn/zm/trunk zm
wget http://www2.zoneminder.com/downloads/Zo ... 4.3.tar.gz
svn co http://libjpeg-turbo.svn.sourceforge.ne ... urbo/trunk libjpeg-turbo
wget http://www.eyezm.com/plugins/zm_xml_p2fs2_r3211.tar.gz
git clone git://git.videolan.org/x264.git
git clone git://git.gitorious.org/ffmpeg/ffmpeg-mt
cd ffmpeg-mt
git clone git://git.mplayerhq.hu/libswscale

#exit

echo
echo "libjpeg-turbo"
sleep 5
cd /root/libjpeg-turbo
autoreconf -fiv
./configure
make
make install prefix=/usr libdir=/usr/lib

echo
echo "x264"
sleep 5
cd /root/x264
./configure
make
make install

echo
echo "ffmpeg-mt"
sleep 5
cd /root/ffmpeg-mt
./configure --prefix=/usr --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libx264 --enable-shared
make
make install
make install-libs
ldconfig

echo
echo "XML Plugin"
sleep 5
cd /root
tar zxvf zm_xml_p2fs2_r3211.tar.gz
cd zm_xml_p2fs2
bunzip2 httpsegmenter.tar.bz2
tar xvf httpsegmenter.tar

echo "Segmenter"
sleep 5
cd httpsegmenter
make
cp segmenter /usr/bin


echo "ZM - Expand"
sleep 5
cd /root
tar zxvf ZoneMinder-1.24.3.tar.gz

#cp /root/zm_xml_p2fs2/zmstreamer.1.24.2.patch /root/ZoneMinder-1.24.2
#cd /root/ZoneMinder-1.24.2
#echo
#echo "Patch ZM"
#sleep 5
#patch -p0 < ./zmstreamer.1.24.2.patch

echo
echo "ZM - ./configure ZM"
sleep 5

cd /root/ZoneMinder-1.24.3
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CXXFLAGS=-D__STDC_CONSTANT_MACROS --enable-mmap --sysconfdir=/etc/zm
make
make install

echo
echo "Install XML Plugin"
sleep 5
cd /root/zm_xml_p2fs2
(echo) | ./install

echo
echo "Create ZM DB"
sleep 5
service mysqld start
(echo "create database zm;") | mysql -u root
(echo "grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to zmuser@localhost;") | mysql -u root
(echo "SET PASSWORD FOR zmuser@localhost=PASSWORD('zmpass');") | mysql -u root
cd /root/ZoneMinder-1.24.3
mysql -u root zm < db/zm_create.sql

cp scripts/zm /etc/init.d/
chmod +x /etc/init.d/zm
cp /root/cambozola.jar /var/www/html/zm/
chown apache:apache /var/www/html/zm/cambozola.jar
mv /usr/local/bin/zmstreamer /usr/bin
ln -s /usr/bin/ffmpeg /usr/local/bin/ffmpeg

chkconfig acpid off
chkconfig apmd off
chkconfig auditd off
chkconfig autofs off
chkconfig avahi-daemon off
chkconfig bluetooth off
chkconfig cpuspeed off
chkconfig cups off
chkconfig gpm off
chkconfig haldaemon off
chkconfig hidd off
chkconfig httpd on
chkconfig ip6tables off
chkconfig iptables off
chkconfig kudzu off
chkconfig mcstrans off
chkconfig mdmonitor off
chkconfig microcode_ctl on
chkconfig mysqld on
chkconfig netfs off
chkconfig nfs off
chkconfig nfslock off
chkconfig ntpd on
chkconfig pcscd off
chkconfig portmap off
chkconfig rawdevices off
chkconfig restorecond off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig sendmail on
chkconfig smartd off
chkconfig xfs off
chkconfig yum-updatesd off
chkconfig zm on

echo
echo "Now Reboot!"

moo
Posts: 11
Joined: Tue Jun 29, 2010 10:44 am

Post by moo » Fri Feb 11, 2011 11:45 am

@andywright

thats handy! I seem to have a problem with sql after running your script, however, it appears the zm.Conf "table" is missing (the web FE reporting this..)

Did you come across this yourself?

moo
Posts: 11
Joined: Tue Jun 29, 2010 10:44 am

Post by moo » Fri Feb 11, 2011 1:27 pm

ignore that lol, friday syndrome :P

fixed! so created db all good, that script is legendary, thanks!!!!!! :D

User avatar
knight-of-ni
Posts: 2275
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni » Tue Feb 15, 2011 2:55 am

Sorry for chiming in late. Thought I'd share my experience as I have been running Zoneminder on 64bit CentOS for over a year now. I have been keeping up with the latest Zoneminder svn so I know the steps below are still relevant.

The following works flawlessly for me:
- Get ffmpeg SVN-r21847
- configure ffmpeg with the following options:

Code: Select all

./configure \
--enable-gpl \
--enable-shared \
--enable-pthreads \
--enable-nonfree \
--cpu=opteron \
--extra-cflags="-O3 -march=opteron -mtune=opteron"
- make, make install, make install-libs
- Now get the latest zoneminder from svn.
- configure zoneminder with the following options:

Code: Select all

./configure \
--with-webdir=/var/www/html/zm \
--with-cgidir=/var/www/cgi-bin \
--with-webuser=apache \
--with-webgroup=apache \
--with-libarch=lib64 \
--with-ffmpeg=/usr/local \
--with-mysql=/usr \
--with-cgidir=/var/www/cgi-bin \
--enable-mmap=yes \
--with-extralibs="-L/usr/lib64 -L/usr/lib64/mysql" \
CFLAGS="-g -O3 -march=opteron -mtune=opteron" \
CXXFLAGS="-g -O3 -march=opteron -mtune=opteron"
- make, make install
- done!

I did not have to edit any of the source code to get it to compile. You will need to delete the cpu specific stuff if you do not have an opteron cpu.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests