Make error

Support and queries relating to all previous versions of ZoneMinder
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

So in summary what have we got?
I am running Zoneminder on a CentOS5 Sytem
With the CentOS (2.6.18-53.1.14.el5) kernel
And ZoneMinder-1.23.3
I have no idea what version of ffmpeg I am running but it's the latest ffmpeg svn checkout. As of this date. (See date of post).
And I can't seem to compile Zoneminder.
I have a lot of conflicting information.
Has anyone got a similar setup?
Coz I really need some help!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Yes I have the exact same setup as my distro and packages for it are based on CentOS.
So yes it works other than the fact that the developers of ffmpeg do change things as often as one changes his pants :?

Maybe you might consider changing to fedora or debian as packages for those are available.
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

Do you know what thew names of the files are. The seem to be a lot of files in /usr/lib (This is where they are on my system) /usr/lib/ and /usr/bin/
I am not sure what files to remove. And don't want to remove any files that are relevant to other applications or the system, other than files related to ffmpeg. Can you help me?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Yes, the files in the link I gave you are all the files that ffmpeg installs and nothing else.
Remove those files, and reinstall ffmpeg and don't delete your source folder.
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

I really appreciate your help. But I am a little confused in what your suggesting. Are you saying that when I run ./configure for ffmpeg I should append the ./configure with --prefix=/usr, like so:
./configure --prefix=/usr

And when I run ./configure for Zoneminder I should run it appended with --with-ffmpeg=/usr, like so:
./configure --with-ffmpeg=/usr
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

That is exactly correct.
So for ffmpeg your complete configure line should be:
./configure --enable-gpl --enable-swscale --prefix=/usr
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

Ok, it seems that I have managed to reinstall ffmpeg after manually removing the previous install.
Should I also remove the previous Zoneminder install?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It would be wise to do a "make uninstall" first so that you don't have any extra files laying around, then a "make clean" to make sure that you get a good clean build.

You can then reinstall:
./configure --with-webdir=/var/www/zm --with-cgidir=/var/www/cgl-bin -with-webuser=apache --with-webgroup=apache --with-ffmpeg=/usr ZM_DB_PASS=WhatEverPasswordYouWantHere

make

setup your database

make install
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

Is the anyway I can upgrade the database whilst maintaining the information from the previous database?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Yes, backup your zm.conf file just in case the new install over writes it (mostly to keep your database info, so you can just write it down as well).
Do the install and skip the database step in the documentation, then follow the database upgrade steps in the documentation.
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

I ran a make uninstall and it seemed to hang at the below point. I had to do a <Ctrl> C, to get my cursor back.

rm -f '/var/www/html/zm/zm_lang_nl_nl.php'
rm -f '/var/www/html/zm/zm_lang_it_it.php'
rm -f '/var/www/html/zm/zm_lang_es_ar.php'
rm -f '/var/www/html/zm/zm_lang_pt_br.php'
rm -f '/var/www/html/zm/zm_lang_dk_dk.php'
rm -f '/var/www/html/zm/zm_lang_cs_cz.php'
make uninstall-hook
make[3]: Entering directory `/root/ZoneMinder-1.22.3/web'
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

Here's what I ran:

./configure --with-ffmpeg=/usr ZM_DB_PASS=zmpass --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-mysql=/usr --with-libarch=lib --with-pcre=/usr/include ZM_SSL_LIB=openssl

This seemed to go fine.

Then make

This did not go so fine.

make
make all-recursive
make[1]: Entering directory `/root/ZoneMinder-1.23.3'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.23.3/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -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:36,
from zm_zone.h:27,
from zm_monitor.h:27,
from zmc.cpp:27:
zm_mpeg.h:29:29: error: ffmpeg/avformat.h: No such file or directory
zm_mpeg.h:31:28: error: ffmpeg/swscale.h: No such file or directory
zm_mpeg.h:63: error: use of enum âPixelFormatâ without previous declaration
zm_mpeg.h:64: error: ISO C++ forbids declaration of âAVOutputFormatâ with no type
zm_mpeg.h:64: error: expected â;â before â*â token
zm_mpeg.h:65: error: ISO C++ forbids declaration of âAVFormatContextâ with no type
zm_mpeg.h:65: error: expected â;â before â*â token
zm_mpeg.h:66: error: ISO C++ forbids declaration of âAVStreamâ with no type
zm_mpeg.h:66: error: expected â;â before â*â token
zm_mpeg.h:67: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:67: error: expected â;â before â*â token
zm_mpeg.h:68: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:68: error: expected â;â before â*â token
zm_mpeg.h:69: error: ISO C++ forbids declaration of âuint8_tâ with no type
zm_mpeg.h:69: error: expected â;â before â*â token
zm_mpeg.h:85: error: âuint8_tâ has not been declared
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.23.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.23.3'
make: *** [all] Error 2
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

Here is where avformat.h and swscale.h exist on my system

/usr/include/libavformat/avformat.h
/usr/include/libswscale/swscale.h

Why is Zoneminder not finding them and what can I possibly do to fix this.

Any and all help greatly appreciated.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Is this the lastest ffmpeg from svn?
What SVN version is it?
It would seem that they have changed the location of the header files :evil:

If this is the latest ffmpeg, you will need to cange the code in ZM to reflect the new location and let us know what version of ffmpeg you have so we can track it down and make it work in ZM.

The file you would need to change is zm_mpeg.h
http://www.zoneminder.com/wiki/index.ph ... tes#ffmpeg

I tried to post the canges here but the sanitation of the forum botchs the post so the above link will have the changes needed listed.
onina
Posts: 18
Joined: Tue May 06, 2008 3:46 pm
Location: New Orleans

Post by onina »

FFmpeg version SVN-r13065, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-swscale --prefix=/usr
libavutil version: 49.6.0
libavcodec version: 51.56.0
libavformat version: 52.13.0
libavdevice version: 52.0.0
built on May 10 2008 10:46:39, gcc: 4.1.2 20070626 (Red Hat 4.1.2-14)
Locked