Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
5th March 2006, 19:52 | #1 | Link | ||||||||||||||||||||||||||||||
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Compiling GCC for MinGW & Cross-Compiling with Linux
I've made this little guide to get a working MinGW gcc-4.0.3 up to gcc-4.1.2 (should work with binutils too)
i did have the latest build on my googlepage but it ran out of bandwidth, unless anybody canrecommend a freehost - its back to the previous way try this (check http://www.mingw.org/download.shtml for updates) MinGW-5.1.3-[candidate only base-files] http://prdownloads.sf.net/mingw/MinG...3.exe?download MSYS-1.0.10.exe http://prdownloads.sf.net/mingw/MSYS...0.exe?download if you need cvs http://prdownloads.sf.net/mingw/msys...1.exe?download and when installing if the connection drops, click retry (sf problem) and i recommend to get latest runtime,w32api headers http://sourceforge.net/project/showf...ease_id=158844 http://sourceforge.net/project/showf...ease_id=158847 and the new binutils that allows spaces in filenames https://sourceforge.net/forum/forum.php?forum_id=661143 and if building hogs your system i recommend editing the msys.bat change the: line 62: start rxvt ... into start /LOW rxvt ... and line 66: start sh ... into start /LOW sh ... (more reliable for your system, you can do other while building) get gcc-sources try here: http://www.mirrorservice.org/sites/s...t.com/pub/gcc/ release directory or whatever ***** most of the pre-released/snapshots of gcc needs bison,flex and sometimes libiconv, libtool bison into \mingw\ directory -- http://gnuwin32.sourceforge.net/down...on-bin-zip.php http://gnuwin32.sourceforge.net/down...on-dep-zip.php flex into \mingw\ directory -- http://gnuwin32.sourceforge.net/down...ex-bin-zip.php libtool into \mingw\ directory -- http://gnuwin32.sourceforge.net/down...ol-bin-zip.php libiconv into \mingw\ http://gnuwin32.sourceforge.net/down...nv-bin-zip.php http://gnuwin32.sourceforge.net/down...nv-dep-zip.php and maybe newer gnu-make (not needed but useful and sometimes buggy) http://prdownloads.sourceforge.net/m...3.exe?download installing the newer make delete/rename old msys\1.0\bin\make.exe and install the new make into \mingw\ and then rename the new mingw32-make.exe into make.exe make --version to check or compile your own from http://ftp.gnu.org/gnu/make/ *** The directory that should contain system headers does not exist: /usr/include create an empty include folder in \msys\1.0\ *** make[2]: Leaving directory `/home/user/svn/gcc-4_1-branch/build/libcpp' make[2]: Entering directory `/home/user/svn/gcc-4_1-branch/build/gcc' Makefile:1280: *** target pattern contains no `%'. Stop. make[2]: Leaving directory `/home/user/svn/gcc-4_1-branch/build/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/user/svn/gcc-4_1-branch/build' make: *** [all] Error 2 check makefile = LD = ld (not LD = ?:/mingw/bin/../lib/gcc/mingw32/???/../../../../mingw32/bin/ld.exe) i think related to --with-gcc --with-gnu-ld --with-gnu-as or delete ld.exe from \mingw\mingw32\bin or empty the folder that's what i did (but i think the newer binutils fixes that anyway, will check later) **** Step 1 cd yourgcc-src mkdir build cd build Step 2 tip. before you install new gcc zip your \mingw\ directory ... you never know Pass 1 append "&> output-results.txt" without quotes to echo to file (displayed text into a file) after some experiments, i found symbolic links are broke, not sure on how to fix it you can append: --with-dwarf2 -s (for silent output) to configure line you can append &>result.txt to pipe any shell output to file *** for gcc 4.1+ use bison,flex see notes on ld.exe *** for gcc 4.2+ append --disable-werror *** updated configure 2006.12.23 (remove --host=mingw32 --target=mingw32 to build for your system) (remove '"CFLAGS=-O2" "LDFLAGS=-s" --enable-optimize' if debugging the compiler) for i386 Quote:
Quote:
Quote:
Quote:
(you can save it for later, if you re-install mingw just copy the folder back in) Quote:
Quote:
Quote:
close and re-load ming Step 3 Pass 2 empty your build directory if you need g77 its not supported in gcc 4+, try gcc 3.4.4 but if want to build gfortran read further down available languages are: c,c++,f95,java,objc,obj-c++,treelang *** for gcc 4.2+ append --disable-werror for i386 Quote:
Quote:
Quote:
Quote:
(you can save it for later, if you re-install mingw just copy the folder back in) Quote:
Quote:
Step 4 Pass 3 ( build gcc with gcc with profiled bootstrap to get a faster compiler) this not necessary but you get a faster compiler empty your build directory for i386 Quote:
Quote:
Quote:
Quote:
(you can save it for later, if you re-install mingw just copy the folder back in) Quote:
Quote:
Fortran, GMP, MPFR Building GMP download gmp from http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/ cd your gmp-src Quote:
Quote:
Quote:
download mpfr from http://www.mpfr.org/mpfr-current/ cd your mpfr-src Quote:
Quote:
Quote:
cd your gcc-src mkdir build cd build Quote:
Quote:
Quote:
(save for later installs) Quote:
Quote:
Compiling GCC for MinGW from Linux update in progress... see later posts **** more to add later thanks to those who helped, you know who you are cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC Last edited by cc979; 3rd August 2009 at 04:00. |
||||||||||||||||||||||||||||||
6th March 2006, 15:03 | #2 | Link |
Turkey Machine
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
|
Maybe adding Fortran (g77)? I'm 95% certain that'll compile with no problems. GCC/MinGW usually stumbles with ObjectiveC and/or Java.
Why do people insist on having GCC 4 working with MinGW? What was wrong with GCC 3.4.5? I've been using that with no problems at all.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld |
6th March 2006, 15:30 | #3 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Quote:
people must like new toys to play with - optimizing stuff gcc 4.1 sounds interesting
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
8th March 2006, 17:52 | #4 | Link | |
Registered User
Join Date: May 2005
Posts: 184
|
@cc979, thanks for the guide.
And I've a suggestion here. I see the commands to MinGW are mixed with your comments. It will be much clearer if you put the commands in code box like this: Code:
../configure --enable-languages=c --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --disable-win32-registry --disable-shared --enable-sjlj-exceptions --without-x --enable-hash-synchronization --enable-libstdcxx-debug Quote:
|
|
9th March 2006, 12:59 | #5 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Quote:
cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
23rd March 2006, 22:06 | #6 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Quote:
in '30 steps' have tried ? path typo ? tell me where
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
24th March 2006, 16:06 | #7 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Quote:
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
24th November 2006, 05:38 | #8 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
pre-release builds gcc-4.2-20061114, gcc-4.3-20061118
i've built build gcc-4.2-20061114, gcc-4.3-20061118
if anyone wants them, not tried build ffdshow with them yet check out, about the Quote:
gmp-4.2,mpfr-2.2.0 (not sure the libs are needed for the gcc-dists) and updated bison,flex,libtool,libiconv was used to build the latest snapshots of gcc 4.2 & 4.3 read the first page for more details the files http://www.mytempdir.com/1079929
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
24th November 2006, 14:09 | #10 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Quote:
cheers
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
25th November 2006, 01:32 | #11 | Link |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
with gcc-4.3 ffdshow fails on baseclasses
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20652 and some else ran into compiling other sources http://www.nabble.com/gcc-4.1%3A-Wei....html#a2150693
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC Last edited by cc979; 25th November 2006 at 01:36. |
25th November 2006, 01:57 | #12 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,556
|
I was only going to use it for lavc/mplayer, so that shouldn't affect me to much at the moment. It'll be interesting trying to test for any bugs introduced though.
btw, was this cross-compiled from linux, or compiled off the existing 4.0/4.1 gcc for win32? |
25th November 2006, 17:29 | #13 | Link |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
i used win32 mingw gcc 4.0.3 if remember as it was after few failed attempts, till i realised what it needed
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
28th November 2006, 21:01 | #14 | Link |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
build 4.1.2 20061127 (prerelease) - patched
can build ffdshow needs testing http://www.mytempdir.com/1088799
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
19th December 2006, 13:01 | #15 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
Somehow all the executables in your builds are much larger than 'official' mingw32 builds. I once made a build myself and had the same problem.
Perhaps the executables contain debugging or other unneeded code? Hopefully you can figure out what is wrong and 'fix' it. As it might affect the performance of the compilers too.
__________________
MPC-HC 2.1.7.2 |
19th December 2006, 21:55 | #16 | Link | |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
Quote:
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
|
23rd December 2006, 12:05 | #17 | Link |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
gcc-build 4.1.2 20061222 (prerelease)
new build of gcc-4.1.2
http://www.mytempdir.com/1130278 @clsid used the strip option this time, are indeed smaller
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
23rd December 2006, 13:45 | #18 | Link |
*****
Join Date: Feb 2005
Posts: 5,640
|
Thanks.
__________________
MPC-HC 2.1.7.2 |
2nd February 2007, 21:04 | #19 | Link |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
gcc-build-4.1.2-121479
just built gcc-build-4.1.2-121479 if anyone wants
http://www.mytempdir.com/1199083 let me know, if anything wrong
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
7th February 2007, 14:32 | #20 | Link |
Curious BetaTester
Join Date: Oct 2005
Posts: 430
|
https://sourceforge.net/project/show...?group_id=2435
The 2.17.50-200700129-1 snapshot incorporates modifications to official binutils CVS since last update. In addition it patches windres to allow use of spaces in filenames,
__________________
Asrock N68-S AMD Athlon(tm) II X4 620 Processor (2.6GHz) - Crucial 2GB PC6400 800MHz DDR2 - Nvidia 9600GT Tools: ProcessExplorer & ProcessMonitor - BatchCompressor Guide: MinGW Compiling GCC |
Thread Tools | Search this Thread |
Display Modes | |
|
|