Page 1 of 1

Unable to 'make' Zoneminder 1.25.0

Posted: Tue Apr 24, 2012 3:56 pm
by badger_fruit
Good afternoon all. I wonder if someone can help me please?

I have followed the CentOS installation guide (http://www.zoneminder.com/wiki/index.php/CentOS) but I get stuck when trying to 'make' Zoneminder.
The error I receive is:

[root@cctv ZoneMinder-1.25.0]# make
make all-recursive
make[1]: Entering directory `/root/ZoneMinder-1.25.0'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.25.0/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -D__STDC_CONSTANT_MACROS -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.cpp:105:44: error: missing binary operator before token "("
zm_ffmpeg_camera.h:39: error: ISO C++ forbids declaration of âAVFormatContextâ with no type
zm_ffmpeg_camera.h:39: error: expected â;â before â*â token
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of âAVCodecContextâ with no type
zm_ffmpeg_camera.h:41: error: expected â;â before â*â token
zm_ffmpeg_camera.h:42: error: ISO C++ forbids declaration of âAVCodecâ with no type
zm_ffmpeg_camera.h:42: error: expected â;â before â*â token
zm_ffmpeg_camera.h:44: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_ffmpeg_camera.h:44: error: expected â;â before â*â token
zm_ffmpeg_camera.h:45: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_ffmpeg_camera.h:45: error: expected â;â before â*â token
zm_ffmpeg_camera.cpp: In constructor âFfmpegCamera::FfmpegCamera(int, const std::string&, int, int, int, int, int, int, int, bool)â:
zm_ffmpeg_camera.cpp:35: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:37: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:38: error: âmCodecâ was not declared in this scope
zm_ffmpeg_camera.cpp:40: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:41: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp: In destructor âvirtual FfmpegCamera::~FfmpegCamera()â:
zm_ffmpeg_camera.cpp:46: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:46: error: âav_freepâ was not declared in this scope
zm_ffmpeg_camera.cpp:47: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:51: error: âsws_freeContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:54: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:56: error: âavcodec_closeâ was not declared in this scope
zm_ffmpeg_camera.cpp:59: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:61: error: âav_close_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp: In member function âvoid FfmpegCamera::Initialise()â:
zm_ffmpeg_camera.cpp:78: error: âAV_LOG_DEBUGâ was not declared in this scope
zm_ffmpeg_camera.cpp:78: error: âav_log_set_levelâ was not declared in this scope
zm_ffmpeg_camera.cpp:80: error: âAV_LOG_QUIETâ was not declared in this scope
zm_ffmpeg_camera.cpp:80: error: âav_log_set_levelâ was not declared in this scope
zm_ffmpeg_camera.cpp:82: error: âav_register_allâ was not declared in this scope
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:94: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:94: error: âav_open_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp:95: error: âerrnoâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: error: âav_find_stream_infoâ was not declared in this scope
zm_ffmpeg_camera.cpp:99: error: âerrnoâ was not declared in this scope
zm_ffmpeg_camera.cpp:103: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:108: error: âCODEC_TYPE_VIDEOâ was not declared in this scope
zm_ffmpeg_camera.cpp:118: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:118: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:121: error: âmCodecâ was not declared in this scope
zm_ffmpeg_camera.cpp:121: error: âavcodec_find_decoderâ was not declared in this scope
zm_ffmpeg_camera.cpp:125: error: âmCodecâ was not declared in this scope
zm_ffmpeg_camera.cpp:125: error: âavcodec_openâ was not declared in this scope
zm_ffmpeg_camera.cpp:129: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:129: error: âavcodec_alloc_frameâ was not declared in this scope
zm_ffmpeg_camera.cpp:132: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:135: error: âPIX_FMT_RGB24â was not declared in this scope
zm_ffmpeg_camera.cpp:135: error: âavpicture_get_sizeâ was not declared in this scope
zm_ffmpeg_camera.cpp:138: error: âAVPictureâ was not declared in this scope
zm_ffmpeg_camera.cpp:138: error: expected primary-expression before â)â token
zm_ffmpeg_camera.cpp:138: error: âavpicture_fillâ was not declared in this scope
zm_ffmpeg_camera.cpp:141: error: âSWS_BICUBICâ was not declared in this scope
zm_ffmpeg_camera.cpp:141: error: âsws_getCachedContextâ was not declared in this scope
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::Capture(Image&)â:
zm_ffmpeg_camera.cpp:159: error: âAVPacketâ was not declared in this scope
zm_ffmpeg_camera.cpp:159: error: expected `;' before âpacketâ
zm_ffmpeg_camera.cpp:163: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:163: error: âpacketâ was not declared in this scope
zm_ffmpeg_camera.cpp:163: error: âav_read_frameâ was not declared in this scope
zm_ffmpeg_camera.cpp:172: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:172: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:172: error: âavcodec_decode_video2â was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âsws_scaleâ was not declared in this scope
zm_ffmpeg_camera.cpp:188: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:188: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:193: error: âav_free_packetâ was not declared in this scope
make[2]: *** [zm_ffmpeg_camera.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.25.0'
make: *** [all] Error 2
I am using 32bit CentOS 5.8.

Up until this point of the guide, everything seems to work OK and I don't see any errors in the previous "./configure" statements, no matter which one I try:

Code: Select all

./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin

Code: Select all

./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS="-D__STDC_CONSTANT_MACROS"
I have not included any logs or system messages as I am not sure what you will find useful but please, if there's any particular commands you want me to run then I will and be happy to post the output back here.

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Tue Apr 24, 2012 5:55 pm
by knight-of-ni

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Wed Apr 25, 2012 10:35 am
by badger_fruit
Hi there

now, before you start saying 'ni' to me over and over or demanding I bring you shrubberies, I had a look at that forum post but I am afraid it's all foreign to me, I don't have *that* much experience with Linux and certainly not with CentOS; the instructions may be OK for someone with more knowledge than me but I got totally lost lol from almost the beginning :(

I made sure to make install and make install-libs when following the guide for ffmpeg; RPMForge repo was already there and I added the EPEL one and re-tried but got the same errors.
I even downloaded ZM1.24.4 as I saw that was a suggested fix but the same problem in the same place (although please forgive me if I did something wrong, but I simply deleted the 1.25.0 GZ file and extracted directory).

brentl99 seems to have gotten it working with
the matching version of ffmpeg, 6.5. After doing a git clone, I did "git checkout n0.6.5". Then I built ffmpeg and zm compiled just fine.
I did the following:

# git clone git://????/ffmpeg.git
# git checkout n0.6.5

.. (??? above is 'git [dot] videolan [dot] org' but apparently, with it, my post is too spammy and I have to remove the URL!) but received some random error (I cleared it away now so I can't quote it). Regardless, I tried to re-make ZM but got the same messages (not really surprising but thought I would re-try for what it was worth).

I am sorry to have to ask for additional guidance but if anyone can offer any, I appreciate it very much!

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Wed Apr 25, 2012 12:06 pm
by badger_fruit
Actually, please dis-regard my last post; after re-reading the post you linked to, I must have missed a link and am going to try the suggestions found in there (for reference it's --> http://www.zoneminder.com/forums/viewto ... 29&t=18925) ... watch this space lol

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Wed Apr 25, 2012 12:19 pm
by knight-of-ni
What is going on here is that each version of Zoneminder only compiles cleanly against certain versions of ffmpeg. Using CentOS 6 with Zoneminder 1.25, I have determined that ffmpeg 0.6.5 works well. As others have discovered, the current version of ffmpeg found in the git repository dated April 2012, does not. I'm sure there are other versions that do work, but 0.6.5 happens to be the version found in the RPMForge repository... which makes things easy.

I know you are running an older version of CentOS, but let's assume that it does not matter for the time being.

Starting from a clean state, you should do one or the other, but do *not* do both:
- Add RPMForge repository and do a a "yum install ffmpeg ffmpeg-libpostproc"
- Retrieve version 0.6.5 from the git repository and do a make install & make install-libs

It is important to first remove anything you have previously done with ffmpeg from your system.

My opinion is to retrieve ffmpeg from RPMForge, but others want to compile. Either way should work.

Once all your shrubberies have been collected, let me know.

PS: Anything stopping you from upgrading to CentOS 6?

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Wed Apr 25, 2012 12:21 pm
by knight-of-ni
Eh, looks like we crossed our beams. Let the forum know how everything went.
badger_fruit wrote:Actually, please dis-regard my last post; after re-reading the post you linked to, I must have missed a link and am going to try the suggestions found in there (for reference it's --> http://www.zoneminder.com/forums/viewto ... 29&t=18925) ... watch this space lol

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Thu Apr 26, 2012 9:10 am
by badger_fruit
Hi there
Firstly, I would like to say thank you for your patience with me lol !
I have re-formatted the HDD (as it's a dedicated machine so can be done with ease, besides, the more I go through the install procedure, the better I will be, right?!) and started the CentOS guide once more but this time, bearing in mind not only what you said above, but also in that linked post (which is what I wanted to try before anything else) which was:
knnniggett wrote:I'm certainly not trying to spoil the "fun" of compiling from source, but one very easy way to install ffmpeg is to simply add the rpmforge repository to your system.

Instructions are found here:
http://wiki.centos.org/AdditionalResour ... s/RPMForge

Once the repository is added, just do a "yum install ffmpeg" from the command line. You may also have to install "ffmpeg-libpostproc". I've got it on my system, but I did not verify if I actually needed it.

Current version of ffmpeg in the repository is, you guessed it, version 0.6.5.
So, as it stands now, the machine is a basic install and I am just adding the services/programs such as MySQL, PHP HTTPD etc ...
Once done, I have noted in the print-out of the install guide to use "yum install ffmpeg ffmpeg-libpostproc" instead and see what happens!

I will keep this thread updated with progress/problems though, you can count on that hahaha!

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Thu Apr 26, 2012 2:42 pm
by badger_fruit
SUCCESS!!
Thank you knnniggett!!


Your suggestion of forgetting the "git" download/compile/install of ffmpeg and using "yum install ffmpeg ffmpeg-libpostproc" instead, seems to have worked!!!!
Now, my next challenge is to get this "4 channel 4 chip BT878a" capture card working ...

Re: Unable to 'make' Zoneminder 1.25.0

Posted: Thu Apr 26, 2012 3:03 pm
by knight-of-ni
Glad you got it working.
As you may already know, there is plenty of information regarding bt878 cards in the Wiki and the forums.

The tricky part is setting the right module options for your particular card, but that would be a new topic should you need help.

Good luck.