*Official* mingw gcc 4.4.0

*Official* mingw gcc 4.4.0

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

*Official* mingw gcc 4.4.0

Post by imbaczek »

Release notes

most interesting for spring will be

Code: Select all

- Shared libgcc: If all modules are linked with -shared-libgcc,
  exceptions can be thrown across DLL boundaries.  Note that this is
  the default for all languages other than C.

- Zero cost exceptions: New exception model Dwarf only has performance
  penalty when being thrown.  The old model, SJLJ, is no longer
  available.

- Thread local storage support: The  __thread keyword is honoured.
edit: mingwlibs for this gcc release: http://cloud.github.com/downloads/sprin ... _dwarf2.7z
Last edited by imbaczek on 24 Jun 2009, 20:46, edited 1 time in total.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: *Official* mingw gcc 4.4.0

Post by Auswaschbar »

Did you tried if it fixes the exception leakage?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: *Official* mingw gcc 4.4.0

Post by imbaczek »

need to recompile the whole spring _and_ relevant parts of boost. will take a while but i'm doing it now.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: *Official* mingw gcc 4.4.0

Post by Auswaschbar »

imbaczek wrote:need to recompile the whole spring _and_ relevant parts of boost. will take a while but i'm doing it now.
<3
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: *Official* mingw gcc 4.4.0

Post by imbaczek »

current master doesn't crash at exit which would mean exceptions are fixed.

this makes mingw gcc 4.4.0 the recommended if not the required gcc version on windows.

bibim: please please please install it on buildserv?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: *Official* mingw gcc 4.4.0

Post by Auswaschbar »

imbaczek wrote:current master doesn't crash at exit which would mean exceptions are fixed.

this makes mingw gcc 4.4.0 the recommended if not the required gcc version on windows.

bibim: please please please install it on buildserv?
Please don't forget to update mingwlibs.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: *Official* mingw gcc 4.4.0

Post by imbaczek »

uploading already.

btw your v19 can't be downloaded, it's some xml file instead of the archive...?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: *Official* mingw gcc 4.4.0

Post by hoijui »

as you compile boost with this new exception types, does this mean we need two separate mingwlibs now? one for 4.4.0+ and one for - ?
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: *Official* mingw gcc 4.4.0

Post by imbaczek »

yes, unfortunately.

but tbh we shouldn't need other mingwlibs because mingw currently supersedes any compiler used to date; you can think of even gcc 4.4.0-tdm as deprecated/unsupported as of now.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: *Official* mingw gcc 4.4.0

Post by hoijui »

you mean... you want ot force everyone to use the new mingw?
it would be ok in my eyes, as long as we hav ereally well documented steps for installing mingw on windows, and well documented minimal version requirements for linux (cross compiling) in obvious places (eg the Wiki).
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: *Official* mingw gcc 4.4.0

Post by imbaczek »

yes, because it's the first mingw that will really work (it catches exceptions, at last!)
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: *Official* mingw gcc 4.4.0

Post by zerver »

Maybe Dwarf exceptions work in conjunction with threading too :) that would be hueg improvement.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: *Official* mingw gcc 4.4.0

Post by imbaczek »

dwarf2 afaik is the system that virtually everybody else uses, ie. a shared memory area in a runtime dll (that's why you need -shared-libgcc). chances are it works fine. (i may be mixing up some stuff ^^)
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: *Official* mingw gcc 4.4.0

Post by bibim »

I have installed official mingw gcc 4.4.0 and tdm gcc 4.4.0 on buildserv, but somehow they failed when linking with mingwlibs v19 :/
Societal
Posts: 64
Joined: 05 May 2009, 13:57

Re: *Official* mingw gcc 4.4.0

Post by Societal »

I deleted my 4.4.0TDM directory and replaced it with the following packages:

binutils-2.19.1-mingw32-bin.tar.gz (one older file than ggc-full)
gdb-6.8-mingw-3.tar.bz2 (lots of older files than gcc-full)
gcc-full-4.4.0-mingw32-bin-2.tar.lzma
mingw32-make-3.81-20080326-3.tar.gz
mingwrt-3.15.1-mingw32-dev.tar.gz
mingwrt-3.15.1-mingw32-dll.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.13-mingw32-dev.tar.gz
diffutils-2.8.7-1-bin.zip

I have no problems compiling with mingwlibs_v19_dwarf2.7z here.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: *Official* mingw gcc 4.4.0

Post by bibim »

Thanks Societal, but buildserv is cross-compiling, it's a bit different ;)

However it's fixed now. Concerning tdm gcc 4.4.0 I had some libglew conflicts between mingwlibs and mingw_cross_env, and concerning mingw gcc 4.4.0 I had forgotten to adjust the dwarf2 flag when compiling gcc...

mingw64 still fails though :/

Code: Select all

mingwlibs/include/boost/thread/win32/basic_timed_mutex.hpp:152: error: cast from 'void*' to 'long int' loses precision
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: *Official* mingw gcc 4.4.0

Post by hoijui »

someone who already did it, please update the pages linked here:
http://springrts.com/wiki/Building_spring#Compiling
with the instructions for 4.4.0 for windows and cross-compiling.
if you did so, i will test it and add some comments here and there where i had problems, if any.
..please!!! :D
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: *Official* mingw gcc 4.4.0

Post by Super Mario »

bump for the update on the compiling instructions for the gcc 4.4.0, because apparently for some reason I can't configure it by using cmake and I did the installation manually, because the automatic installation isn't updated with the latest MinGW release. It gives me this following error. When I try to configure it.

Code: Select all

The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: C:/MinGW/bin/gcc.exe
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Users/alex/Desktop/cmake-2.6.4-win32-x86/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
  The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: C:/Users/alex/Desktop/spring/CMakeFiles/CMakeTmp

  

  Run Build Command:C:/MinGW/bin/mingw32-make.exe "cmTryCompileExec/fast"

  C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTryCompileExec.dir\build.make
  CMakeFiles/cmTryCompileExec.dir/build

  mingw32-make.exe[1]: Entering directory
  `C:/Users/alex/Desktop/spring/CMakeFiles/CMakeTmp'

  C:\Users\alex\Desktop\cmake-2.6.4-win32-x86\bin\cmake.exe -E
  cmake_progress_report
  C:\Users\alex\Desktop\spring\CMakeFiles\CMakeTmp\CMakeFiles 1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj

  C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj
  -c C:\Users\alex\Desktop\spring\CMakeFiles\CMakeTmp\testCCompiler.c

  Linking C executable cmTryCompileExec.exe

  C:\Users\alex\Desktop\cmake-2.6.4-win32-x86\bin\cmake.exe -E
  cmake_link_script CMakeFiles\cmTryCompileExec.dir\link.txt --verbose=1

  C:\MinGW\bin\gcc.exe CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj -o
  cmTryCompileExec.exe -Wl,--out-implib,libcmTryCompileExec.dll.a
  -Wl,--major-image-version,0,--minor-image-version,0 -lkernel32 -luser32
  -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32
  -ladvapi32 

  c:/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
  crt2.o: No such file: No such file or directory

  collect2: ld returned 1 exit status

  mingw32-make.exe[1]: *** [cmTryCompileExec.exe] Error 1

  mingw32-make.exe[1]: Leaving directory
  `C:/Users/alex/Desktop/spring/CMakeFiles/CMakeTmp'

  mingw32-make.exe: *** [cmTryCompileExec/fast] Error 2

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


Configuring incomplete, errors occurred!
Well apparently it can't seemed to find the crt2.o file and I did a search on it and it doesn't seem to find it. Were can I find and download the crt2.o file located in the list of MinGW downloads?
Societal
Posts: 64
Joined: 05 May 2009, 13:57

Re: *Official* mingw gcc 4.4.0

Post by Societal »

https://sourceforge.net/projects/mingw/ ... z/download

https://sourceforge.net/projects/mingw/ ... z/download

Extract these to your MinGW directory.
Super Mario wrote:bump for the update on the compiling instructions for the gcc 4.4.0, because apparently for some reason I can't configure it by using cmake and I did the installation manually, because the automatic installation isn't updated with the latest MinGW release. It gives me this following error. When I try to configure it.. . .
Well apparently it can't seemed to find the crt2.o file and I did a search on it and it doesn't seem to find it. Were can I find and download the crt2.o file located in the list of MinGW downloads?
Post Reply

Return to “Engine”