Compile Error

Forum for questions and support relating to the 1.25.x releases only.
garyc
Posts: 32
Joined: Fri Feb 26, 2010 5:24 pm

Re: Compile Error

Post by garyc »

OK, configure command was

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

then added the lines you mention above but unfortunately no change

ffmpeg output reads (I added ffmpeg-devel since sending the yum output above

FFmpeg version git-svn-r21853, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Feb 16 2010 19:33:28 with gcc 4.1.2 20080704 (Red Hat 4.1.2-46)
configuration:
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.54. 0 / 52.54. 0
libavformat 52.52. 0 / 52.52. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
macfloripa
Posts: 9
Joined: Sun Sep 11, 2011 3:13 pm

Re: Compile Error

Post by macfloripa »

paxx wrote:add this --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS="-D__STDC_CONSTANT_MACROS"

and ./configure again

note: for fedora it may be just /usr/share/ffmpeg

I never used the fedora distro

bummer - thanks for the attempt... I appreciate it.


g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -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:0,
from zm_event.h:39,
from zm_zone.h:27,
from zm_monitor.h:26,
from zmc.cpp:28:
zm_mpeg.h:43:7: error: use of enum ‘PixelFormat’ without previous declaration
zm_mpeg.h:44:2: error: ‘AVOutputFormat’ does not name a type
zm_mpeg.h:45:2: error: ‘AVFormatContext’ does not name a type
zm_mpeg.h:46:2: error: ‘AVStream’ does not name a type
zm_mpeg.h:47:2: error: ‘AVFrame’ does not name a type
zm_mpeg.h:48:2: error: ‘AVFrame’ does not name a type
make[2]: *** [zmc.o] Error 1
orsty3001
Posts: 49
Joined: Tue Jan 26, 2010 5:55 pm

Re: Compile Error

Post by orsty3001 »

paxx wrote:add this --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS="-D__STDC_CONSTANT_MACROS"

and ./configure again

note: for fedora it may be just /usr/share/ffmpeg

I never used the fedora distro
That fixed it for me.

I just had another silly problem where I didn't turn on short tags in my php.ini file.

It's all sorted now.

Thanks a lot.
garyc
Posts: 32
Joined: Fri Feb 26, 2010 5:24 pm

Re: Compile Error

Post by garyc »

Does anyone have any more thoughts from the CentOS side?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Compile Error

Post by zoneminder »

If you manually type the command

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -E zmc.cpp > zmc-full.cpp
then it should just run the pre-processor and include all the files it uses.

If you are able to post a link to that file via dropbox or something then I can take a closer look.

Also what is in /usr/share/ffmpeg/include? Can you just post a listing?
Phil
macfloripa
Posts: 9
Joined: Sun Sep 11, 2011 3:13 pm

Re: Compile Error

Post by macfloripa »

zoneminder wrote:If you manually type the command

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -E zmc.cpp > zmc-full.cpp
then it should just run the pre-processor and include all the files it uses.

If you are able to post a link to that file via dropbox or something then I can take a closer look.

Also what is in /usr/share/ffmpeg/include? Can you just post a listing?

Interesting. No dir /usr/share/ffmpeg/include. That could explain things... Perhaps I should just build ffmpeg from source?

yum output for ffmpeg:

ffmpeg.i686 0.7-0.3.20110612git.fc15
ffmpeg-devel.i686 0.7-0.3.20110612git.fc15
ffmpeg-libs.i686 0.7-0.3.20110612git.fc15
gstreamer-ffmpeg.i686

this is on

Fedora release 15 (Lovelock)
Linux 2.6.40.4-5.fc15.i686 i386
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Compile Error

Post by zoneminder »

Do you definitely have the ffmpeg libraries installed and not just the binary? That should have been picked up during configure but perhaps there is an issue there. What did you configure output say?
Phil
garyc
Posts: 32
Joined: Fri Feb 26, 2010 5:24 pm

Re: Compile Error

Post by garyc »

I seem to have the same issues on CentOS (now 5.7 since doing a yum update)

the g++ command returns
g++: zmc.cpp: No such file or directory
g++: no input files
I also do not have anything in /usr/share/ffmeg apart from 36 files starting lib...

ffmpeg installed using yum and returns
FFmpeg version git-86a3d7e, Copyright (c) 2000-2010 Fabrice Bellard, et al.
built on Sep 14 2011 19:19:15 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --enable-gpl --enable-shared --enable-pthreads
libavutil 50. 9. 0 / 50. 9. 0
libavcodec 52.54. 0 / 52.54. 0
libavformat 52.52. 0 / 52.52. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
I have tried running config with --with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS="-D__STDC_CONSTANT_MACROS"
and with --with-ffmpeg=/usr/share/ffmpeg CPPFLAGS="-D__STDC_CONSTANT_MACROS"

Outputs are here http://dl.dropbox.com/u/14870257/config1.log and http://dl.dropbox.com/u/14870257/config.log

I have also tried deleting both the archive and extracted files and downloading again but no change.

Does any of this help?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Compile Error

Post by zoneminder »

garyc wrote:I seem to have the same issues on CentOS (now 5.7 since doing a yum update)

the g++ command returns
g++: zmc.cpp: No such file or directory
g++: no input files
You need to run in this in the directory that zmc.cpp is in, ie src.
garyc wrote:I also do not have anything in /usr/share/ffmeg apart from 36 files starting lib...
And they are what? This is the important part
garyc wrote:ffmpeg installed using yum and returns
Did you also install ffmpeg-devel? This is required for building against.
Phil
paxx
Posts: 11
Joined: Tue Mar 01, 2011 4:20 pm

Re: Compile Error

Post by paxx »

I believe your issue is with the yum install of ffmpeg. I would yum remove the ffmpeg and the devel packages and compile from source.

Note: I did a fresh install of CentOS 5.7 i386 on a spare laptop with nothing but the core system files because I wanted to see if I encountered any errors. I followed this tutorial found here:http://www.zoneminder.com/wiki/index.php/CentOS to the T for consistency. I hit only two major snags that were easily fixed and was successful compiling zm and starting the service.
garyc
Posts: 32
Joined: Fri Feb 26, 2010 5:24 pm

Re: Compile Error

Post by garyc »

First, sorry for not coming back on your tips folks but life suddenly turned totally manic and this has to take a back seat for a while...

I have now run the g++ command from the src directory and it runs fine but I thought I should see the zmc-full.cpp file but see nothing. Have I got this wrong (again)?

here are the 36 files in /usr/share/ffmpeg are
  • libx264-baseline.ffpreset
    libx264-default.ffpreset
    libx264-faster.ffpreset
    libx264-faster_firstpass.ffpreset
    libx264-fast.ffpreset
    libx264-fast_firstpass.ffpreset
    libx264-fastfirstpass.ffpreset
    libx264-hq.ffpreset
    libx264-ipod320.ffpreset
    libx264-ipod640.ffpreset
    libx264-lossless_fast.ffpreset
    libx264-lossless_max.ffpreset
    libx264-lossless_medium.ffpreset
    libx264-lossless_slower.ffpreset
    libx264-lossless_slow.ffpreset
    libx264-lossless_ultrafast.ffpreset
    libx264-main.ffpreset
    libx264-max.ffpreset
    libx264-medium.
    libx264-medium_firstpass.ffpreset
    libx264-normal.ffpreset
    libx264-placebo.ffpreset
    libx264-placebo_firstpass.ffpreset
    libx264-slower.ffpreset
    libx264-slower_firstpass.ffpreset
    libx264-slow.ffpreset
    libx264-slow_firstpass.ffpreset
    libx264-slowfirstpass.ffpreset
    libx264-superfast.ffpreset
    libx264-superfast_firstpass.ffpreset
    libx264-ultrafast.ffpreset
    libx264-ultrafast_firstpass.ffpreset
    libx264-veryfast.ffpreset
    libx264-veryfast_firstpass.ffpreset
    libx264-veryslow.ffpreset
    libx264-veryslow_firstpass.ffpreset
ffmpeg-devel-0.6.1 is installed

does any of this help?

Cheers

Gary
Locked