[FFmpeg-devel] [cygwin] how to compile with pure cygwin (not with no-cygwin)?

Frédéric Bron frederic.bron
Sun Aug 19 21:54:02 CEST 2007


Eventually, I managed to compile ffmpeg for cygwin with the help of various
patches found on the mailing list. I make a summary for new users:

- download latest sources
$ patch < configure.patch
$ patch -p0 < mathops.h.patch
$ ./configure --disable-network --disable-vhook --disable-ffserver
--disable-debug --enable-static --disable-shared
$ make && make install

Attached are the 2 patches.

Regards,

F. Bron

2007/8/18, Fr?d?ric Bron <frederic.bron at m4x.org>:
>
> I have many troubles to compile with cygwin. I want a cygwin version of
> ffmpeg because it is called by a bash script (diascope) that does not work
> properly with the pure win32 version. However, I am not able to compile
> ffmpeg.
>
> I have tried to add the definition of llrint in libavcodec/i386/mathops.h
> as suggested in a post:
> #ifndef llrint
> inline long long int llrint (double x)
> {
>     long long int llrintres;
>     asm
>     ("fistpll %0"
>     : "=m" (llrintres) : "t" (x) : "st");
>     return llrintres;
> }
> #endif
>
> This works fine but then the next trouble is with libavformat/os_support
> and gethostname. Here I tried some suggestions in a post but could not
> succeed.
>
> Here is my configure command:
>
> ../configure --enable-static --disable-shared
> --prefix=/cygdrive/c/Softs/ffmpeg --disable-vhook --disable-ffserver
> --disable-debug --disable-network
>
> Here is the error I get:
>
> In file included from
> /cygdrive/g/Personnel/Download/movie_tools/ffmpeg/libavformat/os_support.c:29:
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:635:
> erreur: types conflictuels pour << gethostname >>
> /usr/include/sys/unistd.h:206: erreur: d'eclaration pr'ec'edente de <<
> gethostname >> 'etait ici
> /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:635:
> erreur: types conflictuels pour << gethostname >>
> /usr/include/sys/unistd.h:206: erreur: d'eclaration pr'ec'edente de <<
> gethostname >> 'etait ici
> make[1]: *** [os_support.o] Erreur 1
>
> Can somebody help or  make a tar.gz suitable for cygwin?
>
> Regards,
>
> F. Bron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.patch
Type: application/octet-stream
Size: 607 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070819/d21d4f88/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mathops.h.patch
Type: application/octet-stream
Size: 493 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070819/d21d4f88/attachment-0001.obj>



More information about the ffmpeg-devel mailing list