[FFmpeg-devel] [PATCH] Coremake support - ffmpeg_nommx.patch (1/1) - ffmpeg-nommx.patch (1/1)

Diego Biurrun diego
Tue May 22 00:41:39 CEST 2007


On Mon, May 21, 2007 at 09:40:19AM -0400, Ronald S. Bultje wrote:
> 
> In article <20070520202630.GU16391 at MichaelsNB>,
>  Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, May 20, 2007 at 02:05:44PM -0400, Ronald S. Bultje wrote:
> > > --- ffmpeg.orig/libavcodec/fft-test.c	2007-03-22 01:00:48.000000000 -0400
> > > +++ ffmpeg/libavcodec/fft-test.c	2007-03-22 01:20:53.000000000 -0400
> > > @@ -28,6 +28,9 @@
> > >  #include <unistd.h>
> > >  #include <sys/time.h>
> > >  
> > > +#undef fprintf
> > > +#undef printf
> > > +
> > >  int mm_flags;
> > >  
> > >  /* reference fft */
> > 
> > there is no *printf in fft-test.c
> > and ive not checked that the other undefs are needed but that must be checked
> > before such changes can be accpeted also teh question remains why 
> > HAVE_AV_CONFIG_H is defined at all for these files
> 
> In file included from dct-test.c:33:
> dsputil.h: In function 'copy_block2':
> dsputil.h:688: warning: implicit declaration of function 'ST16'
> dsputil.h:688: warning: implicit declaration of function 'LD16'
> dsputil.h: In function 'copy_block4':
> dsputil.h:699: warning: implicit declaration of function 'ST32'
> dsputil.h:699: warning: implicit declaration of function 'LD32'
> dct-test.c: In function 'idct248_ref':
> dct-test.c:333: warning: implicit declaration of function 'sqrt'
> dct-test.c:333: warning: incompatible implicit declaration of built-in 
> function 'sqrt'
> dct-test.c:334: warning: implicit declaration of function 'cos'
> dct-test.c:334: warning: incompatible implicit declaration of built-in 
> function 'cos'
> dct-test.c:334: error: 'M_PI' undeclared (first use in this function)
> dct-test.c:334: error: (Each undeclared identifier is reported only once
> dct-test.c:334: error: for each function it appears in.)
> dct-test.c:342: warning: incompatible implicit declaration of built-in 
> function 'sqrt'
> dct-test.c:343: warning: incompatible implicit declaration of built-in 
> function 'cos'
> dct-test.c:350: warning: incompatible implicit declaration of built-in 
> function 'sqrt'
> dct-test.c:393: warning: implicit declaration of function 'rint'
> dct-test.c:393: warning: incompatible implicit declaration of built-in 
> function 'rint'
> 
> I can work around this by adding an include for math.h.

What environment are you compiling on?  It works fine here on x86,
Debian stable.

> In file included from fft-test.c:26:
> dsputil.h: In function 'copy_block2':
> dsputil.h:688: warning: implicit declaration of function 'ST16'
> dsputil.h:688: warning: implicit declaration of function 'LD16'
> dsputil.h: In function 'copy_block4':
> dsputil.h:699: warning: implicit declaration of function 'ST32'
> dsputil.h:699: warning: implicit declaration of function 'LD32'
> fft-test.c: In function 'frandom':
> fft-test.c:129: warning: implicit declaration of function 'random'
> fft-test.c: In function 'help':
> fft-test.c:161: warning: implicit declaration of function 'exit'
> fft-test.c:161: warning: incompatible implicit declaration of built-in 
> function 'exit'
> fft-test.c: In function 'main':
> fft-test.c:198: warning: implicit declaration of function 'atoi'
> fft-test.c:249: warning: implicit declaration of function 'memcpy'
> fft-test.c:249: warning: incompatible implicit declaration of built-in 
> function 'memcpy'
> fft-test.c:276: warning: incompatible implicit declaration of built-in 
> function 'memcpy'
> 
> I can work around this by adding includes for stdlib.h and string.h to 
> fft-test.c.

Here is what I get:

gcc -Wl,--warn-common  -Wl,--as-needed -Wl,-rpath-link,"/usr/src/ffmpeg"/libavcodec -Wl,-rpath-link,"/usr/src/ffmpeg"/libavformat -Wl,-rpath-link,"/usr/src/ffmpeg"/libavutil -o fft-test fft-test.o libavcodec.a mdct.o fft.o -L"/usr/src/ffmpeg"/libavutil -lavutil -lm -lz
mdct.o: In function `ff_mdct_calc':
/usr/src/ffmpeg/libavcodec/mdct.c:133: multiple definition of `ff_mdct_calc'
libavcodec.a(mdct.o):/usr/src/ffmpeg/libavcodec/mdct.c:133: first defined here
mdct.o: In function `ff_mdct_end':
/usr/src/ffmpeg/libavcodec/mdct.c:173: multiple definition of `ff_mdct_end'
libavcodec.a(mdct.o):/usr/src/ffmpeg/libavcodec/mdct.c:173: first defined here
mdct.o: In function `ff_mdct_init':
/usr/src/ffmpeg/libavcodec/mdct.c:32: multiple definition of `ff_mdct_init'
libavcodec.a(mdct.o):/usr/src/ffmpeg/libavcodec/mdct.c:32: first defined here
mdct.o: In function `ff_imdct_calc':
/usr/src/ffmpeg/libavcodec/mdct.c:81: multiple definition of `ff_imdct_calc'
libavcodec.a(mdct.o):/usr/src/ffmpeg/libavcodec/mdct.c:81: first defined here
fft.o: In function `ff_fft_calc_c':
/usr/src/ffmpeg/libavcodec/fft.c:162: multiple definition of `ff_fft_calc_c'
libavcodec.a(fft.o):/usr/src/ffmpeg/libavcodec/fft.c:162: first defined here
fft.o: In function `ff_fft_permute':
/usr/src/ffmpeg/libavcodec/fft.c:239: multiple definition of `ff_fft_permute'
libavcodec.a(fft.o):/usr/src/ffmpeg/libavcodec/fft.c:239: first defined here
fft.o: In function `ff_fft_end':
/usr/src/ffmpeg/libavcodec/fft.c:257: multiple definition of `ff_fft_end'
libavcodec.a(fft.o):/usr/src/ffmpeg/libavcodec/fft.c:257: first defined here
fft.o: In function `ff_fft_init':
/usr/src/ffmpeg/libavcodec/fft.c:34: multiple definition of `ff_fft_init'
libavcodec.a(fft.o):/usr/src/ffmpeg/libavcodec/fft.c:34: first defined here
collect2: ld returned 1 exit status
make: *** [fft-test] Error 1

> --- ffmpeg.orig/libavcodec/dct-test.c	2007-03-22 01:00:46.000000000 -0400
> +++ ffmpeg/libavcodec/dct-test.c	2007-05-21 09:28:31.000000000 -0400
> @@ -39,8 +40,6 @@
>  #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
>  #endif
>  
> -#undef printf

Probably wrong.

> --- ffmpeg.orig/libavcodec/motion_test.c	2007-03-22 01:00:50.000000000 -0400
> +++ ffmpeg/libavcodec/motion_test.c	2007-05-21 09:06:35.000000000 -0400
> @@ -31,24 +31,24 @@
>  
> -#undef printf

dito

Diego




More information about the ffmpeg-devel mailing list