[FFmpeg-devel] ffplay failed to build under mingw32

Maksym Veremeyenko verem at m1stereo.tv
Thu May 12 08:55:44 CEST 2011


hi,

after "configure: Revert sdl hunk of 4fa18c56. This breaks OSX" 
(http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=ca87d439065c705311d0a98076df3c021b187adb) 
ffplay is stopped to build. That happens because of SDL check fail. To 
be more precise it fail in a check:

/.../
check_func_headers SDL.h SDL_Init $sdl_cflags $sdl_libs &&
/.../

that give in config.log message:

/.../
check_func_headers SDL.h SDL_Init 
-I/usr/i686-pc-mingw32/sys-root/mingw/include/SDL -D_GNU_SOURCE=1 
-Dmain=SDL_main -lmingw32 -lSDLmain -lSDL -mwindows
check_ld -I/usr/i686-pc-mingw32/sys-root/mingw/include/SDL 
-D_GNU_SOURCE=1 -Dmain=SDL_main -lmingw32 -lSDLmain -lSDL -mwindows
check_cc -I/usr/i686-pc-mingw32/sys-root/mingw/include/SDL 
-D_GNU_SOURCE=1 -Dmain=SDL_main -mwindows
BEGIN /tmp/ffconf.CKUleDYo.c
     1	#include <SDL.h>
     2	long check_SDL_Init(void) { return (long) SDL_Init; }
     3	int main(void) { return 0; }
END /tmp/ffconf.CKUleDYo.c
ccache i686-pc-mingw32-gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ --static 
-I/var/www/users/research/ffmpeg/snapshots/build/include -std=c99 
-fno-common -fomit-frame-pointer 
-I/usr/i686-pc-mingw32/sys-root/mingw/include/SDL -D_GNU_SOURCE=1 
-Dmain=SDL_main -mwindows -c -o /tmp/ffconf.PXRBqhG8.o 
/tmp/ffconf.CKUleDYo.c
/tmp/ffconf.CKUleDYo.c:3:5: error: conflicting types for 'SDL_main'
/usr/i686-pc-mingw32/sys-root/mingw/include/SDL/SDL_main.h:53:12: note: 
previous declaration of 'SDL_main' was here
/.../

possible workaround is either remove check_func_headers for SDL:

diff --git a/configure b/configure
index 2fa0f3a..82ac231 100755
--- a/configure
+++ b/configure
@@ -2942,7 +2942,6 @@ SDL_CONFIG="${cross_prefix}sdl-config"
  if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
      sdl_cflags=$("${SDL_CONFIG}" --cflags)
      sdl_libs=$("${SDL_CONFIG}" --libs)
-    check_func_headers SDL.h SDL_Init $sdl_cflags $sdl_libs &&
      check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | 
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
      enable sdl &&
      check_struct SDL.h SDL_VideoInfo current_w $sdl_cflags && enable 
sdl_video_size

or modify function check_func_headers:

diff --git a/configure b/configure
index 2fa0f3a..625244b 100755
--- a/configure
+++ b/configure
@@ -721,7 +721,7 @@ check_func_headers(){
          for func in $funcs; do
              echo "long check_$func(void) { return (long) $func; }"
          done
-        echo "int main(void) { return 0; }"
+        echo "int main(int argc, char** argv) { return 0; }"
      } | check_ld "$@" && enable $funcs && enable_safe $headers
  }
.



-- 
________________________________________
Maksym Veremeyenko


More information about the ffmpeg-devel mailing list