Error when execute 'make'

Support and queries relating to all previous versions of ZoneMinder
Locked
mapasainformatica
Posts: 15
Joined: Wed Mar 17, 2004 7:49 am
Location: Italy

Error when execute 'make'

Post by mapasainformatica »

i compile the zoneminder but i have this error:

make
make all-recursive
make[1]: Entering directory `/home/paolo/zm-1.19.0'
Making all in src
make[2]: Entering directory `/home/paolo/zm-1.19.0/src'
source='zm_event.cpp' object='zm_event.o' libtool=no \
depfile='.deps/zm_event.Po' tmpdepfile='.deps/zm_event.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/libavcodec -I/libavformat -g -O2 -c -o zm_event.o `test -f 'zm_event.cpp' || echo './'`zm_event.cpp
In file included from zm_event.cpp:29:
zm_mpeg.h:27:22: avformat.h: No such file or directory
In file included from zm_event.cpp:29:
zm_mpeg.h:36: use of enum `PixelFormat' without previous declaration
zm_mpeg.h:36: field `pf' has incomplete type
zm_mpeg.h:37: syntax error before `*' token
zm_mpeg.h:38: syntax error before `*' token
zm_mpeg.h:39: syntax error before `*' token
zm_mpeg.h:40: syntax error before `*' token
zm_mpeg.h:41: syntax error before `*' token
zm_mpeg.h:42: syntax error before `*' token
zm_mpeg.h:57: `uint8_t' was not declared in this scope
zm_mpeg.h:57: `buffer' was not declared in this scope
zm_mpeg.h:57: parse error before `,' token
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/home/paolo/zm-1.19.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/paolo/zm-1.19.0'
make: *** [all] Error 2
[root@server39 zm-1.19.0]#


i configure :

./configure --with-mysql=/usr --with-webdir=/var/www/html/ --with-cgidir=/var/www/cgi-bin/
User avatar
peterthevicar
Posts: 42
Joined: Tue Jan 06, 2004 11:07 pm

Re: Error when execute 'make'

Post by peterthevicar »

avformat.h is in the libavcodec dev package (libavcodec1-dev in Debian) - maybe you don't have that installed?

HTH Peter
User avatar
davide
Posts: 78
Joined: Mon Mar 22, 2004 1:04 am
Location: Italy

Re: Error when execute 'make'

Post by davide »

I had the same error, I solved installing ffmpeg doing a "make installlib". you should also tell configure where is the build directory of ffmpeg, my configure is:
./configure --with-mysql=/usr --with-webdir=/var/www/html/ --with-cgidir=/var/www/cgi-bin/ --with-ffmpeg=/home/davide/src/ffmpeg-0.4.8

avformat.h is in a subdir of home/davide/src/ffmpeg-0.4.8.

if you are italian write me here: davide.morelli at parser.it
Davide
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Re: Error when execute 'make'

Post by yosco »

I'm getting the exact same error. Libavcodec is install on SUSE 9.0. avformat.h is in /usr/include/ffmpeg

./configure --with-mysql=/usr --with-webdir=/var/www/html/ --with-cgidir=/var/www/cgi-bin/ --with-ffmpeg=/usr/include/ffmpeg

What is "make installlib"? Where do I run that?

Error message is:
linux:/zm-1.19.0 # make
make all-recursive
make[1]: Entering directory `/zm-1.19.0'
Making all in src
make[2]: Entering directory `/zm-1.19.0/src'
source='zm_event.cpp' object='zm_event.o' libtool=no \
depfile='.deps/zm_event.Po' tmpdepfile='.deps/zm_event.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat -g -O2 -c -o zm_event.o `test -f 'zm_event.cpp' || echo './'`zm_event.cpp
In file included from zm_event.cpp:29:
zm_mpeg.h:27:22: avformat.h: No such file or directory
In file included from zm_event.cpp:29:
zm_mpeg.h:36: error: use of enum `PixelFormat' without previous declaration
zm_mpeg.h:36: error: field `pf' has incomplete type
zm_mpeg.h:37: error: syntax error before `*' token
zm_mpeg.h:38: error: syntax error before `*' token
zm_mpeg.h:39: error: syntax error before `*' token
zm_mpeg.h:40: error: syntax error before `*' token
zm_mpeg.h:41: error: syntax error before `*' token
zm_mpeg.h:42: error: syntax error before `*' token
zm_mpeg.h:57: error: `uint8_t' was not declared in this scope
zm_mpeg.h:57: error: `buffer' was not declared in this scope
zm_mpeg.h:57: error: parse error before `,' token
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/zm-1.19.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/zm-1.19.0'
make: *** [all] Error 2
linux:/zm-1.19.0 # cd /usr/include/ffmpeg/
linux:/usr/include/ffmpeg # ls
. .. avcodec.h avformat.h avio.h common.h rtp.h rtsp.h rtspcodes.h
linux:/usr/include/ffmpeg #
mapasainformatica
Posts: 15
Joined: Wed Mar 17, 2004 7:49 am
Location: Italy

Re: Error when execute 'make'

Post by mapasainformatica »

post all the necessary rows and the esata sintassi of the rows /configure....

Paolo
yosco
Posts: 44
Joined: Mon Dec 22, 2003 8:28 pm

Re: Error when execute 'make'

Post by yosco »

Don't know what you are saying but I think I found one problem.

Part of Makeinstall.

bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
pkgdatadir = $(datadir)/zm
pkglibdir = $(libdir)/zm
pkgincludedir = $(includedir)/zm

The lib dir that has libavcodec is /usr/lib/. I believe I need both dirs to make Can I dd a second lib dir?
User avatar
davide
Posts: 78
Joined: Mon Mar 22, 2004 1:04 am
Location: Italy

Re: Error when execute 'make'

Post by davide »

i had the same error as you, i did this:

unistalled ffmpeg from the system
downloaded last ffmpeg from http://ffmpeg.sourceforge.net/
unzipped it in /home/user/src/ffmpeg-0.4.8
open bash shell as root:
# cd /home/user/src/ffmpeg-0.4.8
# ./configure
# make
# make install
# make installlib

then zoneminder:

# cd /home/user/src/zm-1.19.0
# ./configure --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/home/user/src/ffmpeg-0.4.8

it works for me.

My system is Mandrake 10, i don't know suse, the problem may be another...

installib copy the newly compiled libraries into the system.

Davide
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Error when execute 'make'

Post by zoneminder »

There is a difference between 1.19.0 and 1.19.1. With 1.19.0 you have to make --with-ffmpeg point to the build directory of ffmpeg, you do not need to install the headers or libraries. With 1.19.1 you point it at the installed root, which would usually just be /usr/local as the libraries are in /usr/local/lib and the headers in /usr/local/include. In this case you should make sure you do 'make installlib' in the ffmpeg build directory or install an ffmpeg-devel package.

Phil,
Locked