Author Topic: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)  (Read 81346 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5236
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #15 on: September 17, 2012, 03:37:02 pm »
why C::B and the wxWidgets dll seems to work together only when they are compiled with the same version of compiler ?
See this topic http://thread.gmane.org/gmane.comp.gnu.mingw.user/39408
detailed answer http://article.gmane.org/gmane.comp.gnu.mingw.user/39411
Especially the "Binary incompatibility notice!"
« Last Edit: September 17, 2012, 03:38:47 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #16 on: September 17, 2012, 03:37:49 pm »
Not at all strange. The C++ ABI is known to change between GCC releases. In general it's best to assume that any minor release increment (e.g. 4.6 to 4.7) will include a C++ ABI change.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline gd_on

  • Regular
  • ***
  • Posts: 492
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #17 on: September 17, 2012, 04:00:54 pm »
OK. Thanks for your answers.

gd_on
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #18 on: September 18, 2012, 09:14:49 am »
Mmmmh... on Windows I have that feeling, that compiling with GCC4.7.x is significantly slower than with GCC4.6.x. Could that be? Maybe its just because I need to re-compile everything, but I did that before, too and it seemed way faster...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

zabzonk

  • Guest
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #19 on: September 18, 2012, 12:26:55 pm »
Quote
Mmmmh... on Windows I have that feeling, that compiling with GCC4.7.x is significantly slower

I just timed them both on a moderate sized project of mine. There is a difference - 4.7.1 seems to be about 15% slower than 4.6.1.

Edit: Oops, my maths! Make that about 10% slower.
« Last Edit: September 18, 2012, 01:20:40 pm by Neil Butterworth »

Offline gd_on

  • Regular
  • ***
  • Posts: 492
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #20 on: September 18, 2012, 04:53:29 pm »
I have tested this while generating wxWidget 2.8.12, both a dll monolithic version and a static library on my PC
With gcc 4.6.1 : 28 minutes
With gcc 4.7.1 : 30 minutes. Just a little bit slower.

More interesting, size of wxmsw28u_gcc_cb.dll in lib\gcc_dll :
With gcc 4.6.1 : 16789 ko before strip and 6803 ko after
With gcc 4.7.1 : 16330 ko before strip and 6371 ko after.

and size of libwxmsw28u.a in lib\gcc_lib :
With gcc 4.6.1 : 17675 ko
With gcc 4.7.1 : 17271 ko

So, differences are weak. gcc 4.7.1 is just a little lit slower, but has produced a little bit smaller libraries.

gd_on
« Last Edit: September 18, 2012, 05:08:18 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #21 on: September 19, 2012, 05:24:21 am »
Maybe 4.7 just enables more optimizations (or has more aggressive versions of previous ones).

(If anyone wants to try) a (probably) level test would be a comparison of compile time and output size, with all optimizations disabled.

Offline xazax

  • Single posting newcomer
  • *
  • Posts: 3
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #22 on: September 21, 2012, 04:09:18 pm »
Any plans with 4.7.2?

This one bothers me:

A notable change in GCC 4.7.2 compared to 4.7.1 are ABI bug fixes related to some C++11 templates (std::list and std::pair). As a result, code using those templates in C++11 mode is again ABI compatible with code in C++03/C++98 mode or C++11 mode of GCC 4.6 and earlier, but might be ABI incompatible with code compiled by GCC 4.7.1 or 4.7.0 in C++11 mode.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #23 on: September 22, 2012, 06:52:39 am »
We'll see. The 4.7 series is already ABI incompatible with 4.6 series and earlier in other areas.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #24 on: September 23, 2012, 07:10:02 pm »
Does this release support std::thread and all the other classes for synchronization, std::atomic, std::chrono and std::random at the same level as the linux version?
I have a project that is GCC 4.7 only at the moment and I would want to port it to windows.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #25 on: September 23, 2012, 08:13:21 pm »
Unfortunately, no. The libstdc++ threading support is based on pthreads, while TDM-GCC is currently built with Win32-style threads. There is not a 1-to-1 correspondence between the Linux (pthreads) threading model and the Windows threading model, and ideally someone needs to contribute a Windows version of the libstdc++ threading support.

There has been some noise in the last year or so about Mingw-w64's winpthreads library being able to bridge the gap. However, the library is still classified as experimental and I have seen a few bug reports on MinGW-w64's mailing list that make me leery of it. Furthermore, the additional layer of indirection caused by trying to make Windows look like pthreads will only cause additional problems -- we've seen this already with GCC's OpenMP support.

All that said, I may attempt a pthreads-based build at some point in the future and see what comes of it. But your threading support just isn't there right now.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #26 on: September 23, 2012, 08:33:17 pm »
All that said, I may attempt a pthreads-based build at some point in the future and see what comes of it. But your threading support just isn't there right now.
Thank you for the clarification.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

alexpux

  • Guest
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #27 on: September 23, 2012, 09:13:28 pm »
Hello!
I have long used the TDM-GCC to work. But since it is not updated often passed on http://sourceforge.net/projects/mingwbuilds/. If anyone is interested, there is a building with threads=win32 and with threads=posix using winpthreads. There are releases from 4.6.2 to 4.7.2. There is support for job server for mingw32-make under windows. Project based on mingw-w64. There is a development page for this project on github - https://github.com/niXman/mingw-builds. We would be grateful if you test these assemblies with CodeBlocks.

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #28 on: September 30, 2012, 06:34:41 pm »
Briefly:  I can't build wxWidgets.  Compiles run & then the link gets an exit code 5.  What am I doing wrong?

In Detail: Running Windows 7 with all the latest updates. 
Uninstalled the old Mingw and wxWidgets 2.8.11 (which has been working finme for ages).
Downloaded and ran  tdm-gcc-4.7.1-2.exe.  No obvious problems.  ld--version says 2.22 and g++ --version says 4.7.1.
Download and ran wxMSW-2.8.12-Setup.exe.  Again, no obvious problems.
From wxWidgets-2.8.12/build/msw ran:
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=0 BUILD=release
The compiles run and then what appears to be the link step starts and runs many minutes ending with a windows popup saying that the program isn't responding and then the message "collect2.exe: error: ld returned 5 exit status"

Things I've tried:
- reinstall wxWidgets & run with the clean option first. No difference
- Reinstall wxWidgets & try a unicode build. No Difference.
- An old post to a WxWidgets forum says to unZip again.  After a failure I ran the setup program again & retried the make.  Compiles skipped as expected and the link step fails just as before.

Must be something dumb I'm doing since no one else is complaining.  Any help is much appreciated.

Offline gd_on

  • Regular
  • ***
  • Posts: 492
Re: TDM-GCC 4.7 series (Latest: 4.7.1 - 2012-09-15)
« Reply #29 on: September 30, 2012, 07:21:40 pm »
Works perfectly for me but with a different command line :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"
Main difference with yours is UNICODE=1 and probably more important CXXFLAGS="-fno-keep-inline-dllexport" (look for this on the main Tdragon post.)

gd_on
« Last Edit: September 30, 2012, 07:25:23 pm by gd_on »
Windows 10, svn C::B (last version or almost!), WxWidgets 3.1.3, Compilers 8.1.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\MinGW64) or 32 bits (sjlj, posix in C:\MinGW32).