I am new to the forum and this application, tried installing it yesterday on a newly installed redhat system (6.3, I followed the centOS 6.2 instructions)
everything look ok during ffmpeg-installation and running configure works ok, but on running 'make' of the zoneminder software I get the following error
--------------------------
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: In destructor âvirtual FfmpegCamera::~FfmpegCamera()â:
zm_ffmpeg_camera.cpp:61: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1566)
zm_ffmpeg_camera.cpp:61: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1566)
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:94: error: âav_open_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: warning: âint av_find_stream_info(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1390)
zm_ffmpeg_camera.cpp:98: warning: âint av_find_stream_info(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1390)
zm_ffmpeg_camera.cpp:125: warning: âint avcodec_open(AVCodecContext*, AVCodec*)â is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3445)
zm_ffmpeg_camera.cpp:125: warning: âint avcodec_open(AVCodecContext*, AVCodec*)â is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3445)
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'
---------
tried following the instructions twice without success, can anyone point me in the right direction? any help much appreciated
newbie install problems - error running make
Re: newbie install problems - error running make
couldn't figure out what was wrong, som I reinstalled everything using a 32-bit version instead.
did a copy-paste of every command from the wiki, when trying to run configure of zoneminder I now get:
configure: error: zm requires libjpeg.a
but the libjpeg package is already installed and latest version
any ideas?
Regards
did a copy-paste of every command from the wiki, when trying to run configure of zoneminder I now get:
configure: error: zm requires libjpeg.a
but the libjpeg package is already installed and latest version
any ideas?
Regards
Re: newbie install problems - error running make
for future reference, the issue was resolved by installing libjpeg-devel which was missing.
I also required perl-cpan to be installed using yum, and the perl module "Date::Manip" and "Sys:Mmap" to be added using CPAN
----
despite my efforts zoneminder will not compile, on 64- or 32-bit linux
error message:
zm_ffmpeg_camera.cpp: In destructor âvirtual FfmpegCamera::~FfmpegCamera()â:
zm_ffmpeg_camera.cpp:61: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1566)
zm_ffmpeg_camera.cpp:61: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1566)
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:94: error: âav_open_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: warning: âint av_find_stream_info(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1390)
zm_ffmpeg_camera.cpp:98: warning: âint av_find_stream_info(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1390)
zm_ffmpeg_camera.cpp:125: warning: âint avcodec_open(AVCodecContext*, AVCodec*)â is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3445)
zm_ffmpeg_camera.cpp:125: warning: âint avcodec_open(AVCodecContext*, AVCodec*)â is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3445)
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
----
Any advice?
I also required perl-cpan to be installed using yum, and the perl module "Date::Manip" and "Sys:Mmap" to be added using CPAN
----
despite my efforts zoneminder will not compile, on 64- or 32-bit linux
error message:
zm_ffmpeg_camera.cpp: In destructor âvirtual FfmpegCamera::~FfmpegCamera()â:
zm_ffmpeg_camera.cpp:61: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1566)
zm_ffmpeg_camera.cpp:61: warning: âvoid av_close_input_file(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1566)
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:94: error: âav_open_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: warning: âint av_find_stream_info(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1390)
zm_ffmpeg_camera.cpp:98: warning: âint av_find_stream_info(AVFormatContext*)â is deprecated (declared at /usr/local/include/libavformat/avformat.h:1390)
zm_ffmpeg_camera.cpp:125: warning: âint avcodec_open(AVCodecContext*, AVCodec*)â is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3445)
zm_ffmpeg_camera.cpp:125: warning: âint avcodec_open(AVCodecContext*, AVCodec*)â is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:3445)
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
----
Any advice?
Re: newbie install problems - error running make
and reverting to the non-git version of ffmpeg as suggested in the wiki gets me this:
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 -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included 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_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 `/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 give up, I have spent 4 hours just trying to start the software for evaluation...
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 -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included 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_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 `/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 give up, I have spent 4 hours just trying to start the software for evaluation...
Re: newbie install problems - error running make
All these errors is caused by API change in ffmpeg and ZM not updated to use them yet. The error you posted is caused by configure script not checking for avcodec library correctly. In the configure script, it checks for avcodec_init(), but that's now private and it should try to check for avcodec_register() instead. Since it fails to find avcodec library, config.h doesn't have HAVE_LIBAVCODEC definded, and this makes zm_ffmpeg.h not include any of the ffmpeg include files.
To solve this problem, change configure to check for avcodec_register() instead of avcodec_init() and that will make HAVE_LIBAVCODEC defined. But after you do that, you'll run into the problem with av_open_input_file() in zm_ffmpeg_camera.cpp since that's now avformat_open_input() but the parameters are different so it's not as simple as a search and replace.
The easiest solution I found is to install ffmpeg and ffmpeg-devel package from rpmforge. The version in there is old enough to still have all these functions to have ZM compile correctly.
james
To solve this problem, change configure to check for avcodec_register() instead of avcodec_init() and that will make HAVE_LIBAVCODEC defined. But after you do that, you'll run into the problem with av_open_input_file() in zm_ffmpeg_camera.cpp since that's now avformat_open_input() but the parameters are different so it's not as simple as a search and replace.
The easiest solution I found is to install ffmpeg and ffmpeg-devel package from rpmforge. The version in there is old enough to still have all these functions to have ZM compile correctly.
james
Re: newbie install problems - error running make
thanks for the help James, I figured it was related to ffmpeg, but instead of testing more I reinstalled the system to ubuntu instead, a quick walkthrough of the wiki had the system installed and zm up in less than an hour...it installs version v1.24.4 though...but hey, it works ...apart from the "Montage view" which never finishes loading java, I am guessing zm was never tested with java 7?
if I like the software I might spend another night trying to compile it on CentOS, but for testing the 1.24 on ubuntu will have to do.
if I like the software I might spend another night trying to compile it on CentOS, but for testing the 1.24 on ubuntu will have to do.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: newbie install problems - error running make
An alternative to modifying the source code would be to install a version of ffmpeg that zoneminder works well with. For the case of CentOS 6, that would be ffmpeg 0.65, which is currently in the rpmforge repositories.
As cmtuan hit on, the ffmpeg source code is a moving target. This results in frequent forum posts stating zoneminder compile errors very similar to yours.
Also, note that Zoneminder 1.25 is in the Ubuntu 12.04 repositories. If you prefer Ubuntu it couldn't get any easier.
As cmtuan hit on, the ffmpeg source code is a moving target. This results in frequent forum posts stating zoneminder compile errors very similar to yours.
Also, note that Zoneminder 1.25 is in the Ubuntu 12.04 repositories. If you prefer Ubuntu it couldn't get any easier.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/