I did "./configure" and its returned OK. But when i did "make" its returned ERROR: "ffmpeg.h:5:22: error: avformat.h: File o directory not found"
I searched on Debian.org and I needed to "apt-get install libavformat-dev"
Later, I did "make" and its returned OK (Build complete, run "make install" to install Motion!)
root@ronxu:/opt/motion/motion-3.2.7# ./configure
checking for Darwin... no
checking for *BSD... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for pthread_create in -lpthread... yes
checking for libjpeg-mmx... skipping
checking for jpeg_set_defaults in -ljpeg... yes
checking for ffmpeg autodetecting... found for debian
checking for ffmpeg headers... found for debian
checking for MySQL... yes
checking for PostgreSQL... Cannot find libpq-fe.h. Please specify the installation path of PostgreSQL
checking how to run the C preprocessor... gcc -E
checking for egrep... 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 stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking linux/videodev.h usability... yes
checking linux/videodev.h presence... yes
checking for linux/videodev.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for short int... yes
checking size of short int... 2
checking for int... yes
checking size of int... 4
checking for an ANSI C-conforming const... yes
Detected CPU: AMD Athlon(TM) XP1500+
CPU optimization: -march=athlon -mfpmath=sse -msse -mmmx -m3dnow
checking for bswap instruction... yes
configure: creating ./config.status
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.init-RH
config.status: creating motion.spec
config.status: creating Makefile
************************
* Configure status *
************************
OS : Linux
pthread Support: Yes
jpeg Support: Yes
V4L included: Yes
FFmpeg Support: Yes
MYSQL Support: Yes
PostgreSQL Support: No
CFLAGS: -g -O2 -DHAVE_FFMPEG -I/usr/include/ffmpeg -DHAVE_MYSQL -I/usr/include/mysql -DTYPE_32BIT="int" -DHAVE_BSWAP -march=athlon -mfpmath=sse -msse -mmmx -m3dnow
LIBS: -lm -lpthread -ljpeg -lavformat -lavcodec -lavutil -lvorbis -lvorbisenc -ltheora -logg -ldts -la52 -lraw1394 -ldc1394_control -lgsm -lz -lm -L/usr/lib -lmysqlclient -lz
LDFLAGS:
Install prefix: /usr/local
root@ronxu:/opt/motion/motion-3.2.7# make
Welcome to the setup procedure for Motion, the motion detection daemon! If you get
error messages during this procedure, please report them to the mailing list. The
Motion Guide contains all information you should need to get Motion up and running.
Run "make updateguide" to download the latest version of the Motion Guide.
Version: 3.2.7
Platform: Linux (if this is incorrect, please read README.FreeBSD)
Generating dependencies, please wait...
En el fitxer inclòs dès de motion.c:9:
ffmpeg.h:5:22: error: avformat.h: El fitxer o directori no existeix
En el fitxer inclòs dès de event.c:12:
ffmpeg.h:5:22: error: avformat.h: El fitxer o directori no existeix
En el fitxer inclòs dès de ffmpeg.c:15:
ffmpeg.h:5:22: error: avformat.h: El fitxer o directori no existeix
make: *** [.depend] Error 1
root@ronxu:/opt/motion/motion-3.2.7#
----
("http://packages.debian.org/cgi-bin/search_contents.pl?word=avformat.h&searchmode=searchfiles&case=insensitive&version=stable&arch=i386")
----
root@ronxu:/opt/motion/motion-3.2.7#apt-get install libavformat-dev
root@ronxu:/opt/motion/motion-3.2.7#make
...
Build complete, run "make install" to install Motion!
Environment
Motion version: |
3.2.7 |
ffmpeg version: |
>0.4.8 (3:0.cvs20050918-5ubuntu1) |
Shared libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
GNU/Linux - Kubuntu/Dapper |
--
AgustiFontquerni - 28 Dec 2006
Follow up
Ummm strange behaviour you had , let me explain :
motion search for
/usr/bin/ffmpeg-config so it is found assumes that avcodec.h exists.
ffmpeg devel packages in debian / ubuntu have the file
/usr/bin/ffmpeg-config
apt-file search ffmpeg-config
libavcodec-dev: usr/bin/ffmpeg-config
libavcodec-dev: usr/share/man/man1/ffmpeg-config.1.gz
lush-library: usr/share/lush/packages/ffmpeg/ffmpeg-config.lsh
So this file is include into libavcodec-dev.
dpkg -L libavcodec-dev | grep "avcodec.h"
/usr/include/ffmpeg/avcodec.h
As you can see avcodec.h is there.
checking for ffmpeg autodetecting... found for debian
checking for ffmpeg headers... found for debian
Moreover the only problem could be if you have installed ffmpeg by hand but configure shows that
/usr/bin/ffmpeg-config has been found.
I cannot reproduce your problem at all so that is not a bug but a strange problem you had.
--
AngelCarpintero - 30 Dec 2006
Fix record
Follow up
Thank you
AngelCarpintero
Let me show more information about include file "avformat.h":
root@ronxu:/opt/motion/motion-3.2.7-test # dpkg -L libavcodec-dev | grep avformat.h
root@ronxu:/opt/motion/motion-3.2.7-test # dpkg -L libavformat-dev | grep avformat.h
/usr/include/ffmpeg/avformat.h
root@ronxu:/opt/motion/motion-3.2.7-test # dpkg -L libavcodec-dev | grep ffmpeg-config
/usr/bin/ffmpeg-config
/usr/share/man/man1/ffmpeg-config.1.gz
root@ronxu:/opt/motion/motion-3.2.7-test # dpkg -L libavformat-dev | grep ffmpeg-config
Moreover ...
As you can see "avformat.h" is included from "ffmpeg.h" (I translated catalan text to english text):
File include from ffmpeg.c:15:
ffmpeg.h:5:22: error: avformat.h: File or directory not found
make: *** [.depend] Error 1
root@ronxu:/opt/motion/motion-3.2.7#
About "you have installed ffmpeg by hand", I only installed motion-3.2.7 sources by hand. I installed ffmpeg and others with apt-get.
At this point I discovered some debian package (.deb) depencies:
libavcodec-dev .deb doesn't depend from libavformat-dev
root@ronxu:/opt/motion/motion-3.2.7-test # apt-get install libavcodec-dev
S'està llegint la llista de paquets... Fet
S'està construint l'arbre de dependències... Fet
S'instal·laran els següents paquets extres:
libdc1394-13-dev libraw1394-8 libraw1394-dev
Paquets suggerits:
libraw1394-doc
S'instal·laran els següents paquets NOUS:
libavcodec-dev libdc1394-13-dev libraw1394-8 libraw1394-dev
0 actualitzats, 4 nous a instal·lar, 0 a eliminar i 45 no actualitzats.
Es necessita obtenir 2553kB d'arxius.
Després de desempaquetar s'usaran 7442kB d'espai en disc addicional.
And then, I needed apt-get install libavformat-dev:
root@ronxu:/opt/motion/motion-3.2.7-test # apt-get install libavformat-dev
S'està llegint la llista de paquets... Fet
S'està construint l'arbre de dependències... Fet
S'instal·laran els següents paquets NOUS:
libavformat-dev
0 actualitzats, 1 nous a instal·lar, 0 a eliminar i 45 no actualitzats.
Es necessita obtenir 0B/508kB d'arxius.
Després de desempaquetar s'usaran 1360kB d'espai en disc addicional.
libavformat-dev .deb depends from libavcodec-dev
root@ronxu:/opt/motion/motion-3.2.7-test # apt-get install libavformat-dev
S'està llegint la llista de paquets... Fet
S'està construint l'arbre de dependències... Fet
S'instal·laran els següents paquets extres:
libavcodec-dev libdc1394-13-dev libraw1394-8 libraw1394-dev
Paquets suggerits:
libraw1394-doc
S'instal·laran els següents paquets NOUS:
libavcodec-dev libavformat-dev libdc1394-13-dev libraw1394-8 libraw1394-dev
0 actualitzats, 5 nous a instal·lar, 0 a eliminar i 45 no actualitzats.
Es necessita obtenir 2553kB/3061kB d'arxius.
Després de desempaquetar s'usaran 8802kB d'espai en disc addicional.
Thank's again.
--
AgustiFontquerni - 21 Feb 2007
Ok , then i can close it as rejected because is not a motion problem but a missing package installation.
--
AngelCarpintero - 01 Apr 2007