[vlc-devel] Compile vlc with gcc 4.2.1 sjlj (mingw32-2)
Ramiro Polla
ramiro.polla at gmail.com
Mon Jan 19 01:50:01 CET 2009
Hi,
Here goes some stuff I had written on how to set up MSYS+MinGW.
On Sun, Jan 18, 2009 at 9:30 PM, Son Tran <son.minh.tran at gmail.com> wrote:
>
>> > In fact, I have to add one step to the procedure written in the link
>> > above.
>> > It is the update of the m4 with m4-1.4.7-MSYS.tar.bz2.
>> Interesting.
>
>
> I had to recompile all the autoconfig, automake and libtool because the
> precompiled ones given in the tutor didnot work for me. Therefore I need
> a more recent version of m4, which cannot be built natively with msys
> (http://www.nabble.com/facing-error-making-autoconf---make-3-:-***--m4sugar.m4f--Error-1-td17563527.html)
MSYS-1.0.11-2004.04.30-1.exe
- installed to c:\msys
MSYS-1.0.11-20080821-dll.tar.gz
- extracted to c:\msys\bin
- all files overwritten
bash-3.1-MSYS-1.0.11-snapshot.tar.bz2
- extracted
bash-3.1/bin/bash.exe
bash-3.1/bin/sh.exe
to
c:\msys\bin
- bash.exe overwritten
make-3.81-MSYS-1.0.11-2.tar.bz2
- moved
c:\msys\bin\make.exe
to
c:\msys\bin\make-3.79.exe
- extracted
bin/make.exe
to
c:\msys\bin
- copied
c:\msys\bin\make.exe
to
c:\msys\bin\make-3.81-2.exe
fstab
- copied
c:\msys\etc\fstab.sample
to
c:\msys\etc\fstab
MinGW
$ tar zxfv binutils-2.18.50-20080109-2.tar.gz -C /mingw
$ tar zxfv mingwrt-3.15.1-mingw32-dev.tar.gz -C /mingw
$ tar zxfv mingwrt-3.15.1-mingw32-dll.tar.gz -C /mingw
$ tar zxfv w32api-3.12-mingw32-dev.tar.gz -C /mingw
$ tar xfvj gcc-4.2.4-mingw32.tar.bz2 -C /mingw
I already had a pre-built gcc-4.2.4. You can use gcc-4.2.1-sjlj and
rename files xxx-sjlj.exe to xxx.exe (like gcc, cpp, g++, I don't
remember).
msysDTK-1.0.1.exe
- installed to c:\msys
This is the important part to get M4 working. It must be built for
MSYS, and not for MinGW, so it must use the msysDVLPR package. The
patch is attached in the e-mail.
msysDVLPR
{
MSYS-1.0.11-2004.04.30-1.exe
- installed to c:\msysDVLPR
(yes, I installed it again but to a different path)
msysDVLPR-1.0.0-alpha-1.tar.gz
- extracted to c:\msysDVLPR
open up recently-installed msysDVLPR system
$ sh msysdvlpr
close beige window and run the next part in white window
m4-1.4.12.tar.bz2
$ tar xfvj m4-1.4.12.tar.bz2
$ patch -p0 < ../m4-1.4.12-MSYS.diff
$ cd m4-1.4.12
$ ./configure
$ make
$ cp src/m4.exe /c/msys/bin/m4.exe
close msysDVLPR
}
autoconf-2.63.tar.bz2
$ tar xfvj autoconf-2.63.tar.bz2
$ cd autoconf-2.63
$ ./configure --prefix=/usr
$ make
$ make install
automake-1.10.2.tar.bz2
$ tar xfvj automake-1.10.2.tar.bz2
$ cd automake-1.10.2
$ ./configure --prefix=/usr
$ make
$ make install
libtool-1.5.26.tar.gz
$ tar zxfv libtool-1.5.26.tar.gz
$ cd libtool-1.5.26
$ ./configure --prefix=/usr
$ make
$ make install
>> Yes, but you have to take a non-official gcc release, or compile your
>> own.
>
>
> Can you give me some hints to compile mingw32 with an X version gcc? The
> link http://www.mingw.org/wiki/LinuxCrossMinGW seems to be not clear /
> working for me.
To build gcc-4.2, I think you'll only need to add flex and bison to
the base msys/mingw install. Get them from
http://gnuwin32.sourceforge.net/packages.html and install the .exe
somewhere in your MSYS path. Then unpack the gcc tarball, and do
something like:
$ tar xfvj gcc-core-xxx.tar.bz2
$ cd gcc-xxx
$ mkdir build
$ cd build
$ ../configure --enable-languages=c --prefix=/mingw --disable-nls
--disable-win32-registry --without-x --enable-threads
$ make
I personally prefer appending a suffix to the gcc versions (with
--program-suffix=-4.2.4) so that I can keep many versions around.
Also I install them with:
$ make DESTDIR=/gcc-4.2.4-mingw32 install
so that I can
$ tar cfvj gcc-4.2.4-mingw32.tar.bz2 /gcc-4.2.4-mingw32/*
and rebuild the msys system from scratch (like it was in the
instructions to build m4).
Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: m4-1.4.12-MSYS.diff
Type: text/x-diff
Size: 2608 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090118/61849a1b/attachment.diff>
More information about the vlc-devel
mailing list