CentOS 5.2 - [zm_ffmpeg_camera.o] Error 1

Forum for questions and support relating to the 1.24.x releases only.
Locked
dandidit
Posts: 1
Joined: Sat Feb 14, 2009 12:17 pm

CentOS 5.2 - [zm_ffmpeg_camera.o] Error 1

Post by dandidit »

Hello,
Used the wiki: would not compile with the first ffmpeg method:

NB: If you get an error at this point it may be due to the ../subdir.mak file being missing. To resolve this go to http://www.ffmpeg.org/download.html and read the info on FFmpeg Git. Remember to delete the entire ffmpeg tree in your working directory before downloading. After installing git and downloading the entire source tree ffmpeg installs cleanly.

Did this and everything compiled / installed.

Next configured ZM, then make:

make[1]: Entering directory `/root/ZoneMinder-1.24.0'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.24.0/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -frepo -g -O2 -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: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:125: error: âSWS_BICUBICâ was not declared in this scope
zm_ffmpeg_camera.cpp:125: 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:156: error: âsws_scaleâ was not declared in this scope
make[2]: *** [zm_ffmpeg_camera.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.24.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.24.0'
make: *** [all] Error 2

Any help / input greatly appreciated.

Thanks,
Dan
tingberg
Posts: 2
Joined: Sat Feb 07, 2009 8:08 am

Same with Debian Lenny

Post by tingberg »

Same happens in Debian Lenny, fresh install. I haven't compiled anything but ZM itself. Everything else comes from Debian packages.

Code: Select all

...
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include  -frepo -g -O2 -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: In member function ‘virtual int FfmpegCamera::PrimeCapture()’:
zm_ffmpeg_camera.cpp:125: error: ‘SWS_BICUBIC’ was not declared in this scope
zm_ffmpeg_camera.cpp:125: 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:156: error: ‘sws_scale’ was not declared in this scope
make[2]: *** [zm_ffmpeg_camera.o] Error 1
make[2]: Leaving directory "/temp/ZoneMinder-1.24.0/src"
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory "/temp/ZoneMinder-1.24.0"
make: *** [all] Error 2
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Post by nuck »

The version of ffmpeg that Phil released zm-1.24.0 on was r17098 if you want to try installing that version and see what happens.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Did you compile ffmpeg with the --enable-swscale option?

It shouldn't fail to compile either way so I will make a change to correct that.
Phil
lukelukeluke
Posts: 31
Joined: Tue May 01, 2007 4:19 pm

Post by lukelukeluke »

Hi
Is this error resolved?
I had 1.23.x running on my openSUSE 11.1 box. Now, when I tried to upgrade to 1.24.2 (latest release) I get this same error as he got with 1.24.0:

Code: Select all

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_ffmpeg_camera.o -MD -MP -MF ".deps/zm_ffmpeg_camera.Tpo" -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp; \
        then mv -f ".deps/zm_ffmpeg_camera.Tpo" ".deps/zm_ffmpeg_camera.Po"; else rm -f ".deps/zm_ffmpeg_camera.Tpo"; exit 1; fi
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:84: error: âerrnoâ was not declared in this scope
zm_ffmpeg_camera.cpp:88: error: âerrnoâ was not declared in this scope
make[2]: *** [zm_ffmpeg_camera.o] Error 1
make[2]: Leaving directory `/opt/Video/zoneminder/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Video/zoneminder/ZoneMinder-1.24.2'
make: *** [all] Error 2
Kernel: 2.6.27.29-0.1-pae
FFMpeg: Version 0.4.9 installed
Configure parameters:

Code: Select all

./configure \
--with-webdir=/path/to/html \
--with-cgidir=/path/to/html/cgi-bin \
--with-webgroup=srv \
--with-webuser=srv \
--with-extralibs="/usr/lib/libtheora.so /usr/lib/libvorbis.so /usr/lib/libvorbisenc.so /usr/lib/libogg.so /usr/lib/libdc1394_control.so" \
ZM_DB_HOST=localhost \
ZM_DB_NAME=zoneminder_1242 \
ZM_DB_USER=zoneminder \
ZM_DB_PASS=******
Also tried without the --with-extralibs option, no difference
lukelukeluke
Posts: 31
Joined: Tue May 01, 2007 4:19 pm

Post by lukelukeluke »

Also: When I take ffmpeg latest version (FFmpeg version git-f276d87) and install with ./configure --prefix=/usr/local/ffmpeg;make;make install and then try Zoneminder again, I get the following with the option --with-ffmpeg=/usr/local/ffmpeg:

Code: Select all

checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... yes
configure: WARNING: ffmpeg/avformat.h: present but cannot be compiled
configure: WARNING: ffmpeg/avformat.h:     check for missing prerequisite headers?
configure: WARNING: ffmpeg/avformat.h: see the Autoconf documentation
configure: WARNING: ffmpeg/avformat.h:     section "Present But Cannot Be Compiled"
configure: WARNING: ffmpeg/avformat.h: proceeding with the preprocessor's result
configure: WARNING: ffmpeg/avformat.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------- ##
configure: WARNING:     ## Report this to support at zoneminder dot com ##
configure: WARNING:     ## ------------------------------------- ##
checking for ffmpeg/avformat.h... yes

[...]

Checking if your kit is complete...
Looks good
Writing Makefile for ZoneMinder
make:

Code: Select all

if g++ -DHAVE_CONFIG_H -I. -I. -I..  -I/usr/include -I/usr/local/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/ffmpeg/include  -frepo -g -O2 -MT zm_user.o -MD -MP -MF ".deps/zm_user.Tpo" -c -o zm_user.o zm_user.cpp; \
	then mv -f ".deps/zm_user.Tpo" ".deps/zm_user.Po"; else rm -f ".deps/zm_user.Tpo"; exit 1; fi
zm_user.cpp: In function ‘User* zmLoadAuthUser(const char*, bool)’:
zm_user.cpp:193: error: ‘MD5_DIGEST_LENGTH’ was not declared in this scope
zm_user.cpp:213: error: ‘md5sum’ was not declared in this scope
zm_user.cpp:213: error: ‘MD5’ was not declared in this scope
make[2]: *** [zm_user.o] Error 1
make[2]: Leaving directory `/opt/Video/zoneminder/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Video/zoneminder/ZoneMinder-1.24.2'
make: *** [all] Error 2
Last edited by lukelukeluke on Wed Mar 17, 2010 9:18 am, edited 1 time in total.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

I'm running CentOS 5.4 and the following has worked well for me:

Remove any existing versions of ffmpeg first.
e.g. sudo yum remove ffmpeg ffmpeg-devel

Code: Select all

cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

cd ffmpeg

./configure \
--enable-gpl \
--enable-shared \
--enable-pthreads \
--enable-nonfree \
--cpu=opteron \
--extra-cflags="-O3 -march=opteron -mtune=opteron"

make
sudo make install
sudo make install-libs
Not all the options specified are required for Zoneminder to work.

IMPORTANT: Don't forget to run "make install-libs" after running "make install"!

If you do not have an Opteron cpu then either delete or edit the cpu specific stuff.
lukelukeluke
Posts: 31
Joined: Tue May 01, 2007 4:19 pm

Post by lukelukeluke »

This topc has the same suggestion: http://www.zoneminder.com/forums/viewtopic.php?p=43032
First, you cannot have any copies of ffmpeg installed via rpms or whatever on your machine. If so, delete them!!!
So what I did:
- I removed ffmpeg from rpms
- Installed ffmpeg to /usr/local/ffmpeg (make install AND make install-libs)
- Gave zoneminder configure the option: --with-ffmpeg=/usr/local/ffmpeg (but I think zm is unable to find ffmpeg, see below)

Configure says again:

Code: Select all

configure: WARNING: ffmpeg/avformat.h: present but cannot be compiled
configure: WARNING: ffmpeg/avformat.h:     check for missing prerequisite headers?
configure: WARNING: ffmpeg/avformat.h: see the Autoconf documentation
configure: WARNING: ffmpeg/avformat.h:     section "Present But Cannot Be Compiled"
configure: WARNING: ffmpeg/avformat.h: proceeding with the preprocessor's result
configure: WARNING: ffmpeg/avformat.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------- ##
configure: WARNING:     ## Report this to support at zoneminder.com ##
configure: WARNING:     ## ------------------------------------- ##
But configure suddenly also says:

Code: Select all

checking for ffmpeg... no
checking for ffmpeg... no
For "make" there is no difference:

Code: Select all

zm_user.cpp: In function ‘User* zmLoadAuthUser(const char*, bool)’:
zm_user.cpp:193: error: ‘MD5_DIGEST_LENGTH’ was not declared in this scope
zm_user.cpp:213: error: ‘md5sum’ was not declared in this scope
zm_user.cpp:213: error: ‘MD5’ was not declared in this scope
make[2]: *** [zm_user.o] Error 1
make[2]: Leaving directory `/opt/Video/zoneminder/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Video/zoneminder/ZoneMinder-1.24.2'
make: *** [all] Error 2
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Post by knight-of-ni »

Some random thoughts...

Perhaps you have tried this already, but what happens when you try to configure Zoneminder w/o the --with-fmpeg parameter?

On my system anyway, Zoneminder seems to find ffmpeg w/o any help.

Also, here is where avformat.h is on my system:
/usr/local/include/libavformat/avformat.h

I'm using version SVN-r21847 of ffmpeg. What version are you using?

The fact that your warning talks about ffmpeg/avformat.h makes me wonder if you don't have some extra stuff laying around in the wrong folders. Perhaps from previous attempts to install ffmpeg.

Try this:
-Do a "make uninstall"
-Manually delete any extra ffmpeg files and folders laying around (check both /usr/inlcude and /usr/local/include)
- Now reinstall ffmpeg

Any difference?
Locked