Page 1 of 1

error "No location for avcodec.h and avformat.h found&q

Posted: Wed Dec 29, 2010 7:07 pm
by mcouture
I am having the hardest time compiling FFMPEG and Zoneminder from source to support x264 and mpeg streaming.

I've been trying all the things I have found on the 'net and I have compiled FFMPEG correctly (I think) and I have been able to compile Zoneminder correctly and it is running but without x264 & mpeg streaming.

I want to use x264 streaming with the EYEZM iPhone product. Can anyone help?

I am on Fedora 14 and have compiled against SVNs of FFMPEG and Zoneminder from the 28th of December....

Here is the output:

[root@bigbertha zm]# ./configure --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-ffmpeg=/usr/bin --with-webuser=apache --with-webgroup=apache --with-libarch=lib64 --enable-mmap=yes --enable-debug=yes CPPFLAGS="-D__STDC_CONSTANT_MACROS"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: WARNING: You can call configure with the --with-extralibs option.
Ordinarily you will need to use this option only when your copy of ffmpeg has been built
with support for additional formats and you would use this option to detail which additional
libraries ffmpeg was built with so that it is able to link successfully with ZoneMinder.
You will need to wrap this option in quotes if it contains any spaces.
e.g. --with-extralibs="-lmp3lame"
configure: WARNING: You can call configure with the --enable-crashtrace=<yes> or --disable-crashtrace option.
This tells configure whether to compile ZoneMinder with crash tracing included. This allows a
dump of the stack trace when a ZoneMinder binary crashes or is killed by an unexpected signal.
Although this should work on most systems it does rely on un(or loosely) documented features and
so should be regarded as experimental. If you experience problems compiling zm_signal.cpp or
ZoneMinder binaries fail to shut down correctly then you should probably disable this feature.
e.g. --enable-crashtrace=yes or --disable-crashtrace
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether ln -s works... yes
checking for ranlib... ranlib
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for mode_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for siginfo_t... yes
checking for struct sigcontext... yes
checking for struct sigcontext.eip... no
checking for ucontext_t... yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for working strtod... yes
checking for vprintf... yes
checking for _doprnt... no
checking for gethostbyname... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for munmap... yes
checking for putenv... yes
checking for select... yes
checking for socket... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strsignal... yes
checking for strspn... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoull... yes
checking for ffmpeg... yes
checking for ffmpeg... /usr/bin/ffmpeg
checking for pnmscale... no
checking for pnmscale... no
checking for mysql_init in -lmysqlclient... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for pthread_create in -lpthread... yes
checking for dlsym in -ldl... yes
checking gcrypt.h usability... yes
checking gcrypt.h presence... yes
checking for gcrypt.h... yes
checking for gcry_check_version in -lgcrypt... yes
checking for MD5 in -lgnutls-openssl... yes
checking for pcre_compile in -lpcre... yes
checking for x264_predict_16x16_init in -lx264... yes
checking for av_malloc in -lavutil... yes
checking for av_image_copy in -lavcore... yes
checking for avcodec_init in -lavcodec... yes
checking for av_new_stream in -lavformat... yes
checking for avdevice_register_all in -lavdevice... yes
checking for sws_scale in -lswscale... yes
checking for BZ2_bzCompress in -lbz2... yes
checking for compress in -lz... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for memory.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for sys/param.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for unistd.h... (cached) yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking linux/videodev.h usability... yes
checking linux/videodev.h presence... yes
checking for linux/videodev.h... yes
checking linux/videodev2.h usability... yes
checking linux/videodev2.h presence... yes
checking for linux/videodev2.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking mysql/mysql.h usability... yes
checking mysql/mysql.h presence... yes
checking for mysql/mysql.h... yes
checking libavutil/avutil.h usability... yes
checking libavutil/avutil.h presence... yes
checking for libavutil/avutil.h... yes
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking libavcodec/avcodec.h usability... no
checking libavcodec/avcodec.h presence... no
checking for libavcodec/avcodec.h... no
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavformat/avformat.h usability... no
checking libavformat/avformat.h presence... no
checking for libavformat/avformat.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking pcre.h usability... yes
checking pcre.h presence... yes
checking for pcre.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for fcntl.h... (cached) yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking whether round is declared... yes
checking whether MD5 is declared... yes
checking whether backtrace is declared... yes
checking for perl... perl
checking for perl version greater than or equal to 5.6.0... ok
checking for perl module Sys::Syslog... ok
checking for perl module DBI... ok
checking for perl module DBD::mysql... ok
checking for perl module Getopt::Long... ok
checking for perl module Time::HiRes... ok
checking for perl module Date::Manip... ok
checking for perl module LWP::UserAgent... ok
checking for perl module PHP::Serialization... ok
checking for perl module Sys::Mmap... ok
checking for perl module Module::Load... ok
checking for perl module Device::SerialPort... ok
checking for perl module Net::FTP... ok
checking for perl module Archive::Tar... ok
checking for perl module Archive::Zip... ok
checking for perl module Net::SMTP... ok
checking for perl module MIME::Lite... ok
checking for perl module MIME::Entity... ok
checking for perl module X10::ActiveHome... ok
configure: creating ./config.status
config.status: creating Makefile
config.status: creating zm.conf
config.status: creating zmconfgen.pl
config.status: creating db/Makefile
config.status: creating db/zm_create.sql
config.status: creating scripts/Makefile
config.status: creating scripts/zm
config.status: creating scripts/zmaudit.pl
config.status: creating scripts/zmcontrol.pl
config.status: creating scripts/zmdc.pl
config.status: creating scripts/zmfilter.pl
config.status: creating scripts/zmpkg.pl
config.status: creating scripts/zmtrack.pl
config.status: creating scripts/zmtrigger.pl
config.status: creating scripts/zmupdate.pl
config.status: creating scripts/zmvideo.pl
config.status: creating scripts/zmwatch.pl
config.status: creating scripts/zmx10.pl
config.status: creating scripts/zmdbbackup
config.status: creating scripts/zmdbrestore
config.status: creating scripts/zmeventdump
config.status: creating scripts/zmlogrotate.conf
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Base.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Config.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/Memory.pm
config.status: creating scripts/ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm
config.status: creating src/Makefile
config.status: creating src/zm_config.h
config.status: creating web/Makefile
config.status: creating web/ajax/Makefile
config.status: creating web/css/Makefile
config.status: creating web/graphics/Makefile
config.status: creating web/includes/Makefile
config.status: creating web/includes/config.php
config.status: creating web/js/Makefile
config.status: creating web/lang/Makefile
config.status: creating web/skins/Makefile
config.status: creating web/skins/classic/Makefile
config.status: creating web/skins/classic/ajax/Makefile
config.status: creating web/skins/classic/css/Makefile
config.status: creating web/skins/classic/graphics/Makefile
config.status: creating web/skins/classic/includes/Makefile
config.status: creating web/skins/classic/js/Makefile
config.status: creating web/skins/classic/lang/Makefile
config.status: creating web/skins/classic/views/Makefile
config.status: creating web/skins/classic/views/css/Makefile
config.status: creating web/skins/classic/views/js/Makefile
config.status: creating web/skins/mobile/Makefile
config.status: creating web/skins/mobile/ajax/Makefile
config.status: creating web/skins/mobile/css/Makefile
config.status: creating web/skins/mobile/graphics/Makefile
config.status: creating web/skins/mobile/includes/Makefile
config.status: creating web/skins/mobile/lang/Makefile
config.status: creating web/skins/mobile/views/Makefile
config.status: creating web/skins/mobile/views/css/Makefile
config.status: creating web/tools/Makefile
config.status: creating web/tools/mootools/Makefile
config.status: creating web/views/Makefile
config.status: creating web/skins/xml/Makefile
config.status: creating web/skins/xml/views/Makefile
config.status: creating web/skins/xml/includes/Makefile
config.status: creating config.h
config.status: executing depfiles commands
perl Makefile.PL
Writing Makefile for ZoneMinder
[root@bigbertha zm]# make
make all-recursive
make[1]: Entering directory `/root/zm'
Making all in src
make[2]: Entering directory `/root/zm/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/bin/include -Wall -Wno-sign-compare -fno-inline -I/usr/bin/include -D__STDC_CONSTANT_MACROS -frepo -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_mpeg.h:23:0,
from zm_stream.h:27,
from zm_event.h:39,
from zm_zone.h:27,
from zm_monitor.h:26,
from zmc.cpp:28:
zm_ffmpeg.h:40:2: error: #error "No location for avcodec.h found"
zm_ffmpeg.h:47:2: error: #error "No location for avformat.h found"
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: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
make[2]: Leaving directory `/root/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/zm'
make: *** [all] Error 2
[root@bigbertha zm]#

Posted: Thu Dec 30, 2010 3:53 pm
by scsi

Posted: Thu Dec 30, 2010 4:22 pm
by mcouture
I have read the WIKI thank you.

This section I'm pretty sure relates to my FFMPEG build and I have not been able to get Zoneminder to "see" these configurations appropriately. All of these libraries are installed - per wiki, per many online searches and rebuilds....
checking libavutil/avutil.h usability... yes
checking libavutil/avutil.h presence... yes
checking for libavutil/avutil.h... yes
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking libavcodec/avcodec.h usability... no
checking libavcodec/avcodec.h presence... no
checking for libavcodec/avcodec.h... no
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavformat/avformat.h usability... no
checking libavformat/avformat.h presence... no
checking for libavformat/avformat.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
I have followed and successfully installed FFMPEG and other libraries and codecs yet I still get the following:
zm_ffmpeg.h:40:2: error: #error "No location for avcodec.h found"
zm_ffmpeg.h:47:2: error: #error "No location for avformat.h found"
I've tried to compile without: D__STDC_CONSTANT_MACROS and this produces errors on "No location for avcodec.h avformat.h swscale.h avutil.h" not just the 2 errors from example above.

I'm about done trying to get x264 working with ZM (streaming). It works ok for events. I've invested about a weeks worth of time and am spent! It's time for me to move on and forget about this unless someone can give some more insight... :?

Posted: Thu Dec 30, 2010 6:42 pm
by jdhar
First things first... did you compile ffmpeg with --enable-shared?

Next, it looks like you are having a hard time finding the libav* header files. From your prompt, if you type 'sudo find . -name avformat.h' for example, what do you get?

We basically need to get ZM (during the ./configure process) to find all of those header-files; right now, they aren't being found .For eg.
checking libavcodec/avcodec.h usability... no
checking libavcodec/avcodec.h presence... no