GNOME Bugzilla – Bug 136366
still using old configure because of missing m4 macros
Last modified: 2004-12-22 21:47:04 UTC
gcc -Wall -O0 -ggdb -g -O3 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o i386/cputest.o i386/cputest.c i386/cputest.c:5:21: dsputil.h : Aucun fichier ou répertoire de ce type i386/cputest.c: Dans la fonction « mm_support »: i386/cputest.c:58: error: `MM_MMX' undeclared (first use in this function) i386/cputest.c:58: error: (Each undeclared identifier is reported only once i386/cputest.c:58: error: for each function it appears in.) i386/cputest.c:60: error: `MM_MMXEXT' undeclared (first use in this function) i386/cputest.c:60: error: `MM_SSE' undeclared (first use in this function) i386/cputest.c:62: error: `MM_SSE2' undeclared (first use in this function) i386/cputest.c:76: error: `MM_3DNOW' undeclared (first use in this function) make[6]: *** [i386/cputest.o] Erreur 1 make[6]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/libavcodec' make[5]: *** [lib] Erreur 2 make[5]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg' make[4]: *** [all-recursive] Erreur 1 make[4]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg' make[3]: *** [all-recursive] Erreur 1 make[3]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext' make[2]: *** [all-recursive] Erreur 1 make[2]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs' make[1]: *** [all-recursive] Erreur 1 make[1]: Leaving directory `/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg' make: *** [all] Erreur 2
Incomplete ffmpeg checkout?
i don't think so. it is reproductible at any time. it is always the same error, at each clean checkout (the build dir is recreated at each time so there is no left-over from an older build) so, if it is an incomplete checkout, it always breaks at the same place which sounds like a bug, not a transiant error.
plus there is no error message at all relative to a timeout or other problem during checkout : configure: slurping FFmpeg CVS source configure: checking out ffmpeg cvs code from 2004-02-29 20:00 GMT into gst-libs/ext/ffmpeg cvs checkout: warning: failed to open /usr/portage/tmp/portage/homedir/.cvspass for reading: No such file or directory configure: setting up ffmpeg build system and applying patches the only warning is because the user used to build packages has no .cvspass (which is a non-bloquer)
what is fun is that it throws this error while the following file exists : -rw-r--r-- 1 portage portage 18234 fév 6 03:12 gst-libs/ext/ffmpeg/ffmpeg/libavcodec/dsputil.h so, is this a path problem in the #include ? ============================================= libavcodec/i386/cputest.c contains #include "dsputil.h" but dsputil.h is in libavcodec/dsputil.h : a directory lower
grep -r dsputil.h libavcodec/i386/ libavcodec/i386/cputest.c:#include "dsputil.h" libavcodec/i386/dsputil_mmx.c:#include "../dsputil.h" libavcodec/i386/fft_sse.c:#include "../dsputil.h" libavcodec/i386/motion_est_mmx.c:#include "../dsputil.h" libavcodec/i386/mpegvideo_mmx.c:#include "../dsputil.h" libavcodec/i386/simple_idct_mmx.c:#include "../dsputil.h"
i confirm that changing #include "dsputil.h" to #include "../dsputil.h" in libavcodec/i386/cputest.c fixes the compilation problem.
it is your autotools.diff patch that changed the #include path should this chunk be removed ? (near line 926) Index: ffmpeg/libavcodec/i386/cputest.c --- ffmpeg~autotools/libavcodec/i386/cputest.c 2004-02-29 23:01:41.000000000 +0100 +++ ffmpeg/libavcodec/i386/cputest.c 2004-02-29 23:01:46.000000000 +0100 @@ -2,7 +2,7 @@ and R. Fisher). Converted to C and improved by Fabrice Bellard */ #include <stdlib.h> -#include "../dsputil.h" +#include "dsputil.h" /* ebx saving is necessary for PIC. gcc seems unable to see it alone */ #define cpuid(index,eax,ebx,ecx,edx)\
No, because adding .. to include paths is evil. I patched the Makefile.am to -I$(top_srcdir)/libavcodec, but that apparently didn't make it into the patch, like all my changes to remove ".." from the include paths in other C files. Apparently, I really messed up badly with quilt here...
eh, wait, your whole build setup is totally wrong. I only notice now, but you're still using the non-autotools based build. Please re-run ./autogen.sh or ./configure. It should patch your ffmpeg sources and then run ./autogen.sh in your ffmpeg dir. Later on, it should run ./configure (an autotools-based one) in gst-libs/ext/ffmpeg/ffmpeg/.
Oh, got it. in gst-ffmpeg's configure.ac, change the lines: for PATCH in patch/*.diff; do patch -p0 -N -r rejects < $PATCH > /dev/null || true done to for PATCH in matroska autotools disablemmx disabletools disableinstalllibs; do patch -p0 -N -r rejects < patch/${PATCH}.diff > /dev/null || true done Then it'll patch properly (= in the right order) and compile.
Created attachment 25353 [details] [review] Ronald's patch in machine readable format
old code did apply functions.diff but it is not present in newer version. is that an error ? if it is missing, where should it be applied ? --- even with this patch, compilation still fails at the same point, with the missing dsputil.h
That didn't help much Hand editing gst-ffmpeg/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/libavcodec/Makefile to add a -I. to gcc compile flags helped though.
I need more verbosity guys! Is it using the autotoolified build? Are you guys using a recent CVS of ffmpeg at all - did you try removing the build directory? What does configure.ac in gst-libs/ext/ffmpeg/ffmpeg/ look like? Do the patches apply cleanly? Etc. And yes, functions.diff also needs to be applied somewhere. Just in between one of the others, right after autotools.diff should work.
I'm using a fresh and clean check out of gst-ffmpeg (I checked it out in a new directory). The ffmpeg version I'm using is whatever version gst-ffmpeg downloads libavformat/CVS/Tags contains D2004.02.29.20.00.00 gst-libs/ext/ffmpeg/ffmpeg/configure.ac starts with: dnl Replaces old FFMpeg build system
Looking at what configure outputs, here is what I get when ffmpeg is checked out by the configure script: configure: slurping FFmpeg CVS source configure: checking out ffmpeg cvs code from 2004-02-29 20:00 GMT into gst-libs/ext/ffmpeg configure: setting up ffmpeg build system and applying patches checking for libtool >= 1.5... testing libtoolize... found. checking for autoconf >= 2.53... testing autoconf... found. checking for automake >= 1.6... testing automake... found. aclocal: configure.ac: 547: macro `AM_PATH_IMLIB' not found in library aclocal: configure.ac: 552: macro `AM_PATH_SDL' not found in library checking whether byte ordering is bigendian... no checking for MMX-capable compiler... no configure: creating ./config.status config.status: creating Makefile config.status: creating gst-ffmpeg.spec config.status: creating ext/Makefile config.status: creating ext/ffmpeg/Makefile config.status: creating gst-libs/Makefile config.status: creating gst-libs/ext/Makefile config.status: creating gst-libs/ext/ffmpeg/Makefile config.status: creating config.h config.status: executing depfiles commands configure: configuring in gst-libs/ext/ffmpeg/ffmpeg configure: running /bin/sh './configure' --prefix=/usr/local '--enable-maintainer-mode' '--enable-plugin-builddir' '--enable-debug' '--enable-DEBUG' 'CFLAGS=-g -ggdb -O2' --disable-v4l --disable-audio-oss --disable-dv1394 --cache-file=/dev/null --srcdir=. Install prefix /usr/local Source path /usr/src/gst-ffmpeg/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg C compiler gcc make make CPU x86 (generic) Big Endian no inttypes.h yes broken inttypes.h no MMX enabled yes Vector Builtins yes gprof enabled no zlib enabled yes mp3lame enabled no vorbis enabled no faad enabled no faadbin enabled no faac enabled no a52 support no a52 dlopened no pp support no debug symbols yes optimize yes shared pp no Video hooking yes SDL support yes risky / patent encumbered codecs yes Imlib2 support no freetype support yes Sun medialib support no pthreads support no AMR-NB float support no AMR-NB fixed support no AMR-WB float support no Creating config.mak and config.h Now type 'make' to compile gst-ffmpeg.
aclocal: configure.ac: 547: macro `AM_PATH_IMLIB' not found in library aclocal: configure.ac: 552: macro `AM_PATH_SDL' not found in library don't look right, but even adding a ACLOCAL_FLAGS="-I /usr/share/aclocal" (where I have sdl.m4 and imlib.m4) doesn't seem to help
Aha, so autoconf during autogen.sh in gst-libs/ext/ffmpeg/ffmpeg is failing. That's interesting... I guess I need to provide those .m4 files manually? Thomas?
I played a bit more with it, I manage to compile it if I run autogen.sh by hand in gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg with the appropriate flags. I did: -+${ACLOCAL} || exit 1 ++${ACLOCAL} ${ACLOCAL_FLAGS}|| exit 1 in autotools.diff gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/autogen.sh still doesn't succeed with that patch :( but things are better I think. in gst-ffmpeg/configure.ac, I think after NOCONFIGURE=1 ./autogen.sh you should check the return value and error out if it failed (if autogen.sh properly returns error codes when it fails)
macros for IMLIB2 and SDL detection (possibly others) are missing so the new configure is not created and the old one is used. a solution is : - to import sdl.m4 into a local m4/ directory - to use PKG_CHECK_MODULES(IMLIB2, imlib2 >= 1.1.0, HAVE_IMLIB2=yes, HAVE_IMLIB2=no) instead of the crappy AM_PATH_IMLIB which is not defined)
seems the IMLIB detection problem has been fixed in gst-ffmpeg.new thanks closing this one