[MPlayer-cygwin] compile the libs on mingw

Stefan Gürtler helfmir at surfeu.de
Sun Jan 2 12:46:12 CET 2005


Yesterday i have tryed my best to once again compile some libs needed
for Mplayer under MinGW, and I want to share my findings and sumerize
them for Sacha, who once stated:

>I should write some build howto that explains the various tweaks 
 >needed to compile the libs on mingw. Hopefully I find a bit of
 >time for this during the christmas holidays.

Maybe you can help me finding solutions for the problems i have encountered.

So we start with Lame mp3 - encoder. Decoder is not to be build, as
lames decoder is not used by mplayer and building it leads to conflicts
with mplayers mp3lib while compiling mplayer!
Homepage: http://lame.sourceforge.net/
Download: http://sourceforge.net/project/showfiles.php?group_id=290

Download lame source from sourceforge.
Latest is lame v3.96.1 (as of january 2005) but i have used v3.96
$ tar xfz lame-3.96.tar.gz
$ cd lame-3.96
$ ./configure --prefix=/mingw --disable-gtktest --disable-decoder
Building lame with nasm
(./configure --prefix=/mingw --enable-nasm --disable-gtktest
-disable-decoder)
failed for me. Anybody succeeded in this?
$ make
Here libtool fails to find a suitable winsock library and therefore
refuses to build a lame library for dynamic linking (.so). Anybody?
Though for building mencoder.exe a static libmp3lame.a is sufficient.
$ make install

Next one was XviD MPEG4 codec:
Latest stabel is XviD v1.0.3 (as of january 2005).
Homepage: http://www.xvid.org/
Download: http://files.xvid.org/downloads/xvidcore-1.0.3.tar.bz2
Information on installing xvid is abailable in der source package
in doc/INSTALL. Assembler code is to be compiled with nasm.
See my mail "Re: [MPlayer-cygwin] Some questions about the MinGW port"
from 26.12.2004 for a brief description on how to get/compile it.

$ tar xfj xvidcore-1.0.3.tar.bz2
$ cd xvidcore-1.0.3/build/generic/
$ ./configure --prefix=/mingw
$ make
$ make install
Here corexvid.a is copied to /mingw/lib, and wont be found/recognized
by mplayers configure skript, as that one expects to find a
libxvidcore.a. I used a link to circumvent this problem.
$ cd /mingw/lib
$ ln -s libxvidcore.a xvidcore.a

Running mplayers ./configure should now detect both lame and xvid.

I failed to compile internal tremor under MinGW (as of january 1st. 
2005), i had to disable it.

Compiling x264 (rev80), xvid, tremor and lame workes just fine with 
cygwin, but
x264 is not found by ./configure. Looking at the configure.log showed
some errors because of undefined variables, and therefore building the
test object fails and x264 is not enabled.

Stefan


lames error message:
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I. -I../mpglib/ -I.. 
-O3 -ffast-math -funroll-loops -maccumulate-outgoing-args -Wall -pipe 
-MT mpglib_interface.lo -MD -MP -MF .deps/mpglib_interface.Tpo -c 
mpglib_interface.c -o mpglib_interface.o >/dev/null 2>&1
/bin/sh ../libtool --mode=link gcc  -O3  -ffast-math 
-funroll-loops -maccumulate-outgoing-args -Wall -pipe    -o 
libmp3lame.la -rpath /mingw/lib -version-info 0:0 -no-undefined 
VbrTag.lo bitstream.lo encoder.lo fft.lo gain_analysis.lo id3tag.lo 
lame.lo newmdct.lo presets.lo psymodel.lo quantize.lo quantize_pvt.lo 
reservoir.lo set_get.lo tables.lo takehiro.lo util.lo vbrquantize.lo 
version.lo mpglib_interface.lo   -lwsock32

*** Warning: linker path does not have real file for library -lwsock32.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libwsock32 and none of the candidates passed a file format test
*** using a file magic. Last file checked: /mingw/lib//libwsock32.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
ar cru .libs/libmp3lame.a  VbrTag.o bitstream.o encoder.o fft.o 
gain_analysis.o id3tag.o lame.o newmdct.o presets.o psymodel.o 
quantize.o quantize_pvt.o reservoir.o set_get.o tables.o takehiro.o 
util.o vbrquantize.o version.o mpglib_interface.o
ranlib .libs/libmp3lame.a
creating libmp3lame.la

In /mingw/lib is a libwsock32.a which becomes
/mingw/lib//libwsock32.a in libtools output.
See the double //.
I will try to link libwsock32.a to wsock32.a and retry compilation.





More information about the MPlayer-cygwin mailing list