Warning: ffmpeg/avformat.h present but cannot be compiled

Forum for questions and support relating to the 1.24.x releases only.
Locked
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Warning: ffmpeg/avformat.h present but cannot be compiled

Post by jnk1690 »

Hi all,

During the ./configure stage, I received the following warning:

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

checking for ffmpeg/avformat.h... yes
<snip>

This is Redhat EL5.3, ZM 1.24.1, and the following installed ffmpeg:

ffmpeg-0.4.9-0.9.20070530.el5.rf
ffmpeg-devel-0.4.9-0.9.20070530.el5.rf
ffmpeg-libpostproc-0.4.9-0.9.20070530.el5.rf

The make install shows a more specific error:

/usr/include/ffmpeg/avformat.h: In function ‘void av_init_packet(AVPacket*)’:
/usr/include/ffmpeg/avformat.h:62: error: ‘INT64_C’ was not declared in this scope


Any pointers on how to make this work, and, what might be the results if I continued to install ZM with this warning?

I could not find anything too closely related in the forums.

Thanks in advance,

Joel
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

I had a similar problem on a CentOS 5.2 (which is binary equivalent to RHEL 5.2) server. Apparently ZM doesn't like the ffmpeg from the rpmforge (dag) repo, and you need to get the latest svn of ffmpeg and compile and install that instead of using the rpm version.
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Post by jnk1690 »

Blazer,

Thanks, I'll give it try tomorrow an post back results. I'm assuming the compile will provide all that's required for ZM.

Joel
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Post by jnk1690 »

I got things working with your suggestion. Thanks!

Just for the record, I used the following option for ffmpeg based on researching a few more issues I hit.

/configure --enable-swscale --enable-gpl


Many thanks,

Joel
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

which version of ffmpeg did you use? I have noticed that the latest svn version (revision 17942) does not have the --enable-swscale option at all, not sure which ver got rid of it, or what alternate way to enable it now.
jnk1690
Posts: 30
Joined: Wed Jul 30, 2008 1:52 pm

Post by jnk1690 »

ffmpeg -version
FFmpeg version 0.5, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-swscale --enable-gpl
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libswscale 0. 7. 1 / 0. 7. 1


I think SVN is firewalled here, so I had to download the 0.5 source-code.
User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer »

Heres my current one:

Code: Select all

# ffmpeg -version
FFmpeg version SVN-r17812, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-shared
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libswscale     0. 7. 1 /  0. 7. 1
  built on Mar  4 2009 15:00:04, gcc: 4.3.2 20081105 (Red Hat 4.3.2-7)
FFmpeg SVN-r17812
libavutil     49.15. 0 / 49.15. 0
libavcodec    52.20. 0 / 52.20. 0
libavformat   52.31. 0 / 52.31. 0
libavdevice   52. 1. 0 / 52. 1. 0
libswscale     0. 7. 1 /  0. 7. 1
Weird that it printed the same stuff twice...I hate how flakey ffmpeg is, as far as every build is different from the last, which usually breaks stuff. I guess should stay away from the svn trunk builds. I am about to try an older build and see if it solves my problems.
Locked