NEED HELP to install ZoneMinder - compilation fails !!!

Forum for questions and support relating to the 1.24.x releases only.
Post Reply
magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

NEED HELP to install ZoneMinder - compilation fails !!!

Post by magix_ch » Tue Aug 03, 2010 11:30 am

Dear all,

After unsucessful attempts to make ZoneMinder work on our main server (it was always crashing), we ordered a virtual server, dedicated for Zoneminder. But I cannot install it, I get errors while compiling :

I followed the following tutorial :
http://www.zoneminder.com/wiki/index.php/CentOS

but when I am in ZoneMinder-1.24.2 directory and type "make" I get many errors :
make[2]: Entering directory `/root/ZM/ZoneMinder-1.24.2/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -frepo -g -O2 -MT zm_local_camera.o -MD -MP -MF ".deps/zm_local_camera.Tpo" -c -o zm_local_camera.o zm_local_camera.cpp; \
then mv -f ".deps/zm_local_camera.Tpo" ".deps/zm_local_camera.Po"; else rm -f ".deps/zm_local_camera.Tpo"; exit 1; fi
zm_local_camera.h:96: error: 'PixelFormat' does not name a type
zm_local_camera.h:97: error: 'PixelFormat' does not name a type
zm_local_camera.h:98: error: ISO C++ forbids declaration of 'AVFrame' with no type
zm_local_camera.h:98: error: expected ';' before '*' token
zm_local_camera.cpp:40: error: 'PixelFormat' does not name a type
zm_local_camera.cpp:252: error: expected constructor, destructor, or type conversion before '*' token
zm_local_camera.cpp: In constructor 'LocalCamera::LocalCamera(int, const std::string&, int, int, const std::string&, int, int, int, int, int, int, int, bool)':
zm_local_camera.cpp:319: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:319: error: 'PIX_FMT_GRAY8' was not declared in this scope
zm_local_camera.cpp:319: error: 'PIX_FMT_RGB24' was not declared in this scope
zm_local_camera.cpp:320: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:320: error: 'getFfPixFormatFromV4lPalette' was not declared in this scope
zm_local_camera.cpp: In member function 'void LocalCamera::Initialise()':
zm_local_camera.cpp:336: error: 'AV_LOG_DEBUG' was not declared in this scope
zm_local_camera.cpp:336: error: 'av_log_set_level' was not declared in this scope
zm_local_camera.cpp:338: error: 'AV_LOG_QUIET' was not declared in this scope
zm_local_camera.cpp:338: error: 'av_log_set_level' was not declared in this scope
zm_local_camera.cpp:431: error: 'capturePictures' was not declared in this scope
zm_local_camera.cpp:431: error: expected type-specifier before 'AVFrame'
zm_local_camera.cpp:431: error: expected `;' before 'AVFrame'
zm_local_camera.cpp:455: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:455: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:457: error: 'avcodec_alloc_frame' was not declared in this scope
zm_local_camera.cpp:460: error: 'AVPicture' was not declared in this scope
zm_local_camera.cpp:460: error: expected primary-expression before ')' token
zm_local_camera.cpp:460: error: 'avpicture_fill' was not declared in this scope
zm_local_camera.cpp:594: error: 'capturePictures' was not declared in this scope
zm_local_camera.cpp:594: error: expected type-specifier before 'AVFrame'
zm_local_camera.cpp:594: error: expected `;' before 'AVFrame'
zm_local_camera.cpp:602: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:602: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:604: error: 'avcodec_alloc_frame' was not declared in this scope
zm_local_camera.cpp:607: error: 'AVPicture' was not declared in this scope
zm_local_camera.cpp:607: error: expected primary-expression before ')' token
zm_local_camera.cpp:607: error: 'avpicture_fill' was not declared in this scope
zm_local_camera.cpp: In member function 'virtual int LocalCamera::Capture(Image&)':
zm_local_camera.cpp:1576: error: expected initializer before '*' token
zm_local_camera.cpp:1578: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:1578: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:1582: error: 'SWS_BICUBIC' was not declared in this scope
zm_local_camera.cpp:1582: error: 'sws_getContext' was not declared in this scope
zm_local_camera.cpp:1586: error: 'tmpPicture' was not declared in this scope
zm_local_camera.cpp:1586: error: 'avcodec_alloc_frame' was not declared in this scope
zm_local_camera.cpp:1589: error: 'avpicture_get_size' was not declared in this scope
zm_local_camera.cpp:1590: error: 'av_malloc' was not declared in this scope
zm_local_camera.cpp:1593: error: 'AVPicture' was not declared in this scope
zm_local_camera.cpp:1593: error: expected primary-expression before ')' token
zm_local_camera.cpp:1593: error: 'avpicture_fill' was not declared in this scope
zm_local_camera.cpp:1595: error: 'capturePictures' was not declared in this scope
zm_local_camera.cpp:1595: error: 'tmpPicture' was not declared in this scope
zm_local_camera.cpp:1595: error: 'sws_scale' was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1
make[2]: Leaving directory `/root/ZM/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZM/ZoneMinder-1.24.2'
make: *** [all] Error 2
Any help would be VERY APPRECIATED...

Details on the server :
# uname -a
Linux (host) 2.6.9-023stab051.3-smp #1 SMP Wed Nov 4 18:36:34 MSK 2009 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
CentOS release 5.5 (Final)

Denis

Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ » Wed Aug 04, 2010 7:21 am

Daft question, but why aren't you using a precompiled package?

I don't know if Centos has one, but there are prebuilt packages that "just work" for several distros.

"apt-get install zoneminder" for debian and ubuntu, beats the hell out of faffing around compiling.

magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

Post by magix_ch » Wed Aug 04, 2010 8:43 am

Dear Flash,

I already tried many things and ZoneMinder was crashing.

This time I even ordered this new server only for ZoneMinder but I didn't find a already compiled package for CentOS.
There is a link on ZomeMinder homepage but it is broken :
Not Found - The requested URL /pub/linux/zoneminder/ was not found on this server.)
And under CentOS :
No package zoneminder available.
Nothing to do
Really, I don't know what to do anymore to have ZoneMinder working. I see people saying it is working for them, but everything I tried is either failing either crashing ?

Or I found an old version :
http://rpm.pbone.net/index.php3/stat/4/ ... 4.rpm.html

I am quite despaired...

magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

present but cannot be compiled

Post by magix_ch » Wed Aug 04, 2010 4:29 pm

Maybe this can help, during configuration I get plenty of "present but cannot be compiled"
configure: WARNING: libavutil/avutil.h: present but cannot be compiled
configure: WARNING: libavutil/avutil.h: check for missing prerequisite headers?
configure: WARNING: libavutil/avutil.h: see the Autoconf documentation
configure: WARNING: libavutil/avutil.h: section "Present But Cannot Be Compiled"
configure: WARNING: libavutil/avutil.h: proceeding with the preprocessor's result
configure: WARNING: libavutil/avutil.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to support@zoneminder.com ##
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: libavcodec/avcodec.h: present but cannot be compiled
configure: WARNING: libavcodec/avcodec.h: check for missing prerequisite headers?
configure: WARNING: libavcodec/avcodec.h: see the Autoconf documentation
configure: WARNING: libavcodec/avcodec.h: section "Present But Cannot Be Compiled"
configure: WARNING: libavcodec/avcodec.h: proceeding with the preprocessor's result
configure: WARNING: libavcodec/avcodec.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to support@zoneminder.com ##
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: libavformat/avformat.h: present but cannot be compiled
configure: WARNING: libavformat/avformat.h: check for missing prerequisite headers?
configure: WARNING: libavformat/avformat.h: see the Autoconf documentation
configure: WARNING: libavformat/avformat.h: section "Present But Cannot Be Compiled"
configure: WARNING: libavformat/avformat.h: proceeding with the preprocessor's result
configure: WARNING: libavformat/avformat.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to support@zoneminder.com ##
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: libswscale/swscale.h: present but cannot be compiled
configure: WARNING: libswscale/swscale.h: check for missing prerequisite headers?
configure: WARNING: libswscale/swscale.h: see the Autoconf documentation
configure: WARNING: libswscale/swscale.h: section "Present But Cannot Be Compiled"
configure: WARNING: libswscale/swscale.h: proceeding with the preprocessor's result
configure: WARNING: libswscale/swscale.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to support@zoneminder.com ##
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: Module::Load is required for PTZ camera control
configure: WARNING: X10::ActiveHome is required for X.10 support

timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA
Contact:

Post by timcraig » Wed Aug 04, 2010 5:23 pm

Zoneminder doesn't work with the latest version of ffmpeg on SVN. The SVN revision of ffmpeg I use is revision 21010. You can check out that version with the commend by using the argument "-r 21010" in you svn checkout command.

magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

Post by magix_ch » Wed Aug 04, 2010 7:57 pm

Der Tim,

That looks very nice... I tried but after minutes of compiling I got an error. Do you know what the reason could be ?
libswscale/swscale.c:135: error: conflicting type qualifiers for 'ff_dither4'
libswscale/swscale_internal.h:447: error: previous declaration of 'ff_dither4' was here
libswscale/swscale.c:135: error: expected ',' or ';' before '[' token
libswscale/swscale.c:139: error: conflicting type qualifiers for 'ff_dither8'
libswscale/swscale_internal.h:448: error: previous declaration of 'ff_dither8' was here
libswscale/swscale.c:139: error: expected ',' or ';' before '[' token
libswscale/swscale.c:173: error: expected ',' or ';' before '[' token
libswscale/swscale.c:182: error: expected ',' or ';' before '[' token
libswscale/swscale.c:187: error: expected ',' or ';' before '[' token
libswscale/swscale.c:192: error: expected ',' or ';' before '[' token
libswscale/swscale.c:199: error: expected ',' or ';' before '[' token
libswscale/swscale.c:210: error: expected ',' or ';' before '[' token
libswscale/swscale.c:222: error: expected ',' or ';' before '[' token
libswscale/swscale.c: In function 'yuv2packedXinC':
Maybe also a bad version for libswscale ?

Pada
Posts: 69
Joined: Fri Jul 30, 2010 12:29 am

Post by Pada » Wed Aug 04, 2010 9:31 pm

timcraig, I've managed to compile ZM 1.24.2 (SVN rev. 3105) with the latest ffmpeg (SVN rev. 24577, with external checkout: libswscale SVN rev. 31866) on Ubuntu 10.04 x64.

magix_ch, you can always try and checkout ffmpeg & ZM via SVN instead of via git. The SVN instructions you can find here: http://www.zoneminder.com/wiki/index.ph ... ver_32-bit

timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA
Contact:

Post by timcraig » Thu Aug 05, 2010 7:04 pm

Oh ya, I totally forgot about that. swscale is a external definition, so the latest always gets checked out when you check out FFMPEG even if the version's are incompatible. Thanks Panda.

Magix_ch, if you still have that checkout of of 21010. Go to the ffmpeg folder you checked out and do the following:

Code: Select all

cd  libswscale 
svn switch svn://svn.ffmpeg.org/mplayer/trunk/libswscale -r 30172
Or you can try the revisions that Panda found to work (checkout the ffmpeg rev 3105 then switch libswscale to 31866).

I revisted an early thread where this ffmpeg problem with noted. I noticed someone has a solution with getting Zoneminder to complile with lasted version of ffmpeg. He found that adding CPPFLAGS="-D__STDC_CONSTANT_MACROS" to the ./configure arguments in Zoneminder's source installations fixes the original "configure: WARNING" messages you were having.

magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

Post by magix_ch » Fri Aug 06, 2010 5:49 pm

Dear Tim,

You're a chief, compilation was successful, this time !

I will try some day with latest version and the solution you suggest, but first I will try to get a working install of ZoneMinder... If only this was possible once in my life after hundreds of hours passed on it and all this money paid in servers for nothing ;-)))

Anyway, thank you VERY MUCH for your help until the solution :-)

Denis

magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

Post by magix_ch » Fri Aug 06, 2010 6:05 pm

It almost looks like a miracle :
service zm start
Starting ZoneMinder: [ OK ]

magix_ch
Posts: 22
Joined: Sat Mar 06, 2010 10:20 pm

Post by magix_ch » Fri Aug 06, 2010 6:41 pm

Ok but I'm sorry, now that Zoneminder seems to be running, I cannot access the cameras because of the following problem :
08/06/10 20:40:06.377444 zmwatch[9583].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/06/10 20:40:16.380026 zmwatch[9583].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/06/10 20:40:26.382647 zmwatch[9583].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/06/10 20:40:36.385255 zmwatch[9583].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/06/10 20:40:46.387848 zmwatch[9583].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]
08/06/10 20:40:56.390547 zmwatch[9583].ERR [Can't get shared memory id '7a6d0001', 1: No such file or directory]

bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 » Fri Aug 06, 2010 6:50 pm

Increase shared memory . Documentation settings are pretty much minimal. Keep increasing until everything works. Don't forget to reboot.

edit /etc/sysctl.conf too make changes permanent.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests