[FFmpeg-devel] compile issues under mingw-cross-env

Ramiro Polla ramiro.polla
Sat Jul 10 21:27:24 CEST 2010


Hi,

On Sat, Jul 10, 2010 at 4:06 PM, John Calcote <john.calcote at gmail.com> wrote:
> Anyone ever tried compiling ffmpeg under mingw-cross-env
> (http://www.nongnu.org/mingw-cross-env/)? I've been playing with it and
> I've found the following issues with CPPFLAGS in the generated config.mak:
>
> 1) I had to change -std=c99 to -std=gnu99 because _STRICT_ANSI is
> enabled if -std=c99 is used which means functions like strcasecmp aren't
> available (at least the prototypes aren't).

https://roundup.ffmpeg.org/issue2067
Note that they've closed their issue as invalid, so it's unlikely to
be fixed (as in you'll have to patch your system).

> 2) I had to remove the definition of _POSIX_C_SOURCE=200112 because
> defining it causes pid_t to not be defined in sched.h.

This is a bug in pthreads-win32, which is fixed in their CVS HEAD if I
recall correctly. Any reason why you can't use w32threads?

> I used the following command line to configure:
>
> $ configure --enable-postproc --enable-gpl --enable-x11grab
> --enable-pthreads --enable-nonfree --enable-libvorbis
> --target-os=mingw32 --enable-memalign-hack --arch=x86_64
> --cross-prefix=i686-pc-mingw32-
>
> Note this is a 64-bit windows build (arch=x86_64).
>
> After making these changes in the generated config.mak file, ffmpeg and
> utilities compiled - not cleanly, mind you, but at least as cleanly as
> it does in normal non-cross builds.
>
> Any comments would be appreciated. Perhaps I'm doing something
> fundamentally wrong in my cross compile?

mingw32 doesn't support x86_64, so this is fundamentally broken. You
should use mingw-w64 instead. Did you even try running 'make test' on
the native build?

Also note that since this is an usage question, it should be sent to
the ffmpeg-user mailinglist (if you reply, please reply to that list,
and not to ffmpeg-devel).

Ramiro Polla



More information about the ffmpeg-devel mailing list