Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: TDragon on August 23, 2009, 12:20:58 am

Title: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: TDragon on August 23, 2009, 12:20:58 am
The second TDM-GCC release of GCC 4.4.1 is now available!

NOTICE:
The first TDM-GCC release of GCC 4.4.1 had a bug that caused a major slowdown in nearly any non-trivial program that it compiled. Be sure to upgrade to the new TDM-2 release if you're currently using 4.4.1-tdm-1.

The 4.4 series continues to take a bit longer to bring from vanilla release to TDM release, but in exchange I've fixed nearly all the outstanding bugs in the TDM-GCC tracker. This release re-enables support for large files, correct formatting of long doubles in iostreams, and more. For general changes in the GCC 4.4 series, see http://gcc.gnu.org/gcc-4.4/changes.html.

I tested this release by successfully building wxWidgets (2.8.10), and building and running Code::Blocks (SVN r5848), both without errors!

Binary packages are available for the Ada, C, C++, Fortran, Objective-C, and Objective-C++ languages, as drop-in replacements for the MinGW (http://www.mingw.org/) project's official gcc packages. Additionally, the TDM/MinGW installer will automatically install TDM-GCC and the MinGW compiler suite for you. Full details and download links are at http://www.tdragon.net/recentgcc/ .

Disclaimer:
The TDM-GCC builds are unofficial replacements for the official MinGW releases of GCC binaries. TDM-GCC was previously recommended for experimentation purposes only, but constant use in day-to-day development and a total download count of over 60,000 have proven the TDM-GCC releases to be at least as usable as the most recent official MinGW GCC release. (Please note that this does not mean that there are no bugs; merely that there is a different set of bugs with a similar or lesser average criticality.) Therefore, TDM-GCC is now heartily endorsed for production use in any non-critical environment, with only the following caveats:

Cheers,
John E. / TDM
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: rhf on August 23, 2009, 02:43:15 am
The TDM-GCC release of GCC 4.4.1 is now available!
The upgrade using your installer went very smooth; and everything seems to work well so far, including re-compiling Code::Blocks.
Thanks!

EDIT: Oops. This morning things do not look as rosy as they did last night. CB and wxWidgets (2.8.10) all seemed to compile with only minor warnings. But now when I load a project into Code:Blocks, CB goes to ~95% CPU usage and never stops. My Nightly CB version seems to work just fine using TDM 4.4.1, but it appears that I have screwed something up in the compilation process of Code:Blocks itself. Oh well!

EDIT 2: Well shoot. The more I experimented with even my Nightly CB version, the more problems I had. After re-compiling several of my existing projects with 4.4.1, they ran very slowly or not at all. I may have something wrong with my setup; but, after reverting to your TDM-GCC 4.4.0 (and recompiling everything), all seems to work fine.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: TDragon on August 23, 2009, 10:15:06 pm
Well, I'm not able to reproduce any of those problems. Really, there's only one change between the 4.4.0 r2 release and this one that affects code generation, and that one actually *fixes* floating point formatting by detecting and using the correct math library. I don't see how it could be causing these problems.

In C::B, have you tried systematically disabling plugins to find a specific problem area?
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: rhf on August 23, 2009, 10:32:11 pm
Thanks, John.
It is very weird. I'll experiment with it some more after I get a little work done.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: ollydbg on August 24, 2009, 05:02:46 pm
Thanks John.
I will download this package and testing building OpenCV library then. :D
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: ollydbg on August 25, 2009, 05:28:43 am
Hi, John
Failed running the CB build from GCC 4.4.1.
see this thread:
http://forums.codeblocks.org/index.php?topic=11069.msg75526;topicseen#msg75526

Do I need to rebuild the wxWidgets?
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: TDragon on August 25, 2009, 05:32:21 am
No; apparently there's a bug somewhere in TDM-GCC that needs to be tracked down. Unfortunately, I'm not able to reproduce it yet.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: thomas on August 26, 2009, 03:17:15 pm
That bug apparently also causes a drastic increase in executable size, roughly 15-20%.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: billyonthemountain on September 27, 2009, 06:30:14 pm
Has this bug been already reported in the GCC bugzilla system ?
A search with "known to work : 4.4.0" and "known to fail : 4.4.1" didn't give any results...
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: stahta01 on September 27, 2009, 07:15:16 pm
Has this bug been already reported in the GCC bugzilla system ?
A search with "known to work : 4.4.0" and "known to fail : 4.4.1" didn't give any results...

I would guess that till TDM (TDragon) finds the cause and submits a patch that there will be no bug report at GCC bugzilla.

Unless the issue happens on an Linux build of GCC 4.4.1; the only one able to work the bug are MinGW GCC developers like TDM.

Tim S.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: billyonthemountain on September 28, 2009, 11:07:41 am
Ok hope this will be fixed soon...
Also I noticed that tdm's release isn't configured with --with-ppl and with --with-cloog (cf. gcc -v 's output)... does that mean that the graphite loop optimizations (ie. -floop-interchange, -floop-strip-mine and -floop-block) are not yet available for mingw32 ?
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: TDragon on September 28, 2009, 02:16:00 pm
Obviously you didn't read the documentation on the website or the README (since they both clearly state that Graphite opts are available), or even simply try a test program with them. --with-cloog and --with-ppl are not requisite for the configuration process to find those libraries, merely optional.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: billyonthemountain on September 28, 2009, 07:16:30 pm
I see...
Quote
To use this code transformation, GCC has to be configured with --with-ppl and --with-cloog to enable the Graphite loop transformation infrastructure.
from the gcc-4.4 optimisation page (http://gcc.gnu.org/onlinedocs/gcc-4.4.0/gcc/Optimize-Options.html) was somewhat misleading...
Thanks for the info...
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: ollydbg on October 09, 2009, 03:02:39 am
hi ALL, TDM GCC 4.4.1-2 is released.

http://www.tdragon.net/recentgcc/

Quote
NOTICE:
The 4.4.1-tdm-2 release is now available. If you were using the first 4.4.1 release, you are urged to upgrade to this new version in order to avoid a bug that caused drastically increased CPU usage in programs compiled with the first version.
Title: Re: GCC 4.4.1-tdm-1 for MinGW (with installer)
Post by: ollydbg on October 09, 2009, 03:43:41 am
I just build the CB trunk, and it works with no problem!!! Thanks to John.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: TDragon on October 09, 2009, 05:32:22 pm
The second TDM-GCC release of GCC 4.4.1 is now available!

NOTICE:
The first TDM-GCC release of GCC 4.4.1 had a bug that caused a major slowdown in nearly any non-trivial program that it compiled. Be sure to upgrade to the new TDM-2 release if you're currently using 4.4.1-tdm-1.

See the original post for changes in the vanilla 4.4 series sources as well as TDM-GCC specific bug fixes.

I tested this release by successfully building wxWidgets (2.8.10), and building and running Code::Blocks (SVN r5848), both without errors!

Binary packages are available for the Ada, C, C++, Fortran, Objective-C, and Objective-C++ languages, as drop-in replacements for the MinGW (http://www.mingw.org/) project's official gcc packages. Additionally, the TDM/MinGW installer will automatically install TDM-GCC and the MinGW compiler suite for you. Full details and download links are at http://www.tdragon.net/recentgcc/ .

Disclaimer:
The TDM-GCC builds are unofficial replacements for the official MinGW releases of GCC binaries. TDM-GCC was previously recommended for experimentation purposes only, but constant use in day-to-day development and a total download count of over 60,000 have proven the TDM-GCC releases to be at least as usable as the most recent official MinGW GCC release. (Please note that this does not mean that there are no bugs; merely that there is a different set of bugs with a similar or lesser average criticality.) Therefore, TDM-GCC is now heartily endorsed for production use in any non-critical environment, with only the following caveats:

Cheers,
John E. / TDM
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: killerbot on October 09, 2009, 05:37:07 pm
as always John : superb and many thanks !!!

Do you any idea, when your super package will contain GDB 7.0 ?

Not that we need it, since we already upgraded manually ;-)
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: ollydbg on October 09, 2009, 05:50:06 pm
as always John : superb and many thanks !!!

Do you any idea, when your super package will contain GDB 7.0 ?

Not that we need it, since we already upgraded manually ;-)

TDM-GCC is great!!!

Yes, I suggest GDB 7.0 should be include in this package.

Thanks.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: bhishmar on October 17, 2009, 05:13:46 pm
Hi all
First let me record my sincere thanks & appreciation to John /TDragon, for bring out such an excellent & usefull product.

A suggestion: The last update date on the first post must come at the top of the first post.
New users like me are getting confused that, the cpu/slowdown bug is being  reported even after tmd-1 to tdm-2 release, by some posters below. It took some time to findout they were referring to the earlier release.

Thanks & regards.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: killerbot on October 29, 2009, 06:33:32 pm
 :D any 4.4.2 in the pipeline ?  8)
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: Conan Kudo on October 29, 2009, 10:28:01 pm
How about an MinGW-w64 version? Is that in the pipeline?
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: TDragon on October 30, 2009, 04:58:30 pm
killerbot: yes.

Pharaoh Atem: maybe.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: nenin on October 30, 2009, 07:08:06 pm
I found a problem with 4.4.1-tdm-2, regarded to the optimization. I observe a lost of precision in numeric code if "O" flags are used. In case of O1 it is small, but not negligible, in case of O2 it is intolerable.
I found that errors occurs when "O" flags are used, from "O1". If the the same set of the command-line optimization options introduced separately as it described in GCC manual, no problem detected up to "-fexpensive-optimizations".
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: TDragon on October 30, 2009, 08:56:28 pm
Have you observed similar problems in the official MinGW release(s)?
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: nenin on October 31, 2009, 05:46:29 pm
Have you observed similar problems in the official MinGW release(s)?
I not tried official release. Looks like problem not exists in 4.4.0-tdm. At least I do not found it, but I used it a lot.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: nenin on November 10, 2009, 07:38:22 pm
Have you observed similar problems in the official MinGW release(s)?
So, bad news. I reproduced problem on official MinGW 4.4.0, on 4.4.0-tdm-1-dw2 and on 4.4.1-tdm-2-dw2.
4.3.1-tdm-1-dw2  and 4.3.3-tdm-1-dw2 works properly. Usage of the "-O1"... "-O3" with  4.4.* leads to generation fallacious code  while the application of the full set of stand-alone  switches like "-fauto-inc-dec -fcprop-registers -fdce -fdefer-pop -fdse -fguess-branch-probability -fif-conversion2 -fif-conversion -finline-small-functions -fipa-pure-const -fipa-reference -fmerge-constants -fsplit-wide-types -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copyrename -finline-functions -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -fthread-jumps -falign-functions -falign-jumps -falign-loops -falign-labels -fcaller-saves -fcrossjumping -fcse-follow-jumps -fcse-kip-blocks -fdelete-null-pointer-checks -fgcse -fgcse-lm -findirect-inlining -foptimize-sibling-calls -fpeephole2 -fregmove -freorder-blocks -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec -fschedule-insns -fschedule-insns2 -fstrict-aliasing -fstrict-overflow -ftree-switch-conversion -ftree-pre -ftree-vrp -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-fre -ftree-sra -ftree-ter -funit-at-a-time" does not.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: Max on November 10, 2009, 09:57:52 pm
nenin,

I observed that problem in several occasions. Using official MinGW and TDM as well. In most of the cases the prolem was not in compiler but in the source code. Writing floating point code is not trivial. Especially if you are playing with precions and using 386 processor family (80 bit FPU register). Try the options

-O2  -mfpmath=sse -msse2

if the problem disappears review your code. Anyway we are OT, not related to CB.

Max
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: nenin on November 11, 2009, 12:10:40 am
nenin,
<***>
if the problem disappears review your code.
Max
Could you please read more carefully what I wrote?  :roll:
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: jaxon on November 11, 2009, 08:57:18 pm
Have you observed similar problems in the official MinGW release(s)?
So, bad news. I reproduced problem on official MinGW 4.4.0, on 4.4.0-tdm-1-dw2 and on 4.4.1-tdm-2-dw2.
It's very interesting what about Linux version of gcc...
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: Max on November 11, 2009, 09:55:26 pm
Nenin wrote,,
>Could you please read more carefully what I wrote?

Yes I did. Unfortunately (please don't get me wrong) statements like

>...leads to generation fallacious code
>...I observe a lost of precision in numeric code if "O" flags are used.

really mean nothing :-)

You should post a small testcase to be analyzed. The only thing I get is that you have problems with "precision" (how much? which one? what?). Because using finite precision the results depend on the order of instructions (and optimizer is reordering/deleting instruction) I suggested (at least) to try using IEEE754.

Post, not here, a small testcase (for example try to report the observed issue in the bug archive in the TDM site).


Bye

Max
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: nenin on November 11, 2009, 10:13:11 pm
Nenin wrote,,
>Could you please read more carefully what I wrote?

Yes I did. Unfortunately (please don't get me wrong)  <***>
I got you right. Could you please read more carefully  my previous posts?

There are issues with complier flags, not with code. This code works fine on previous MinGW versions, bite to bite without any correlation with optimization flags (at least safe-optimization, I do not use dangerous). Errors does not occur on 4.4.* while real optimization flags used (see gcc 4.4.1 man). It occurs  when amalgamation optimization flags "-O1" ..."-O3" applied  It is problem with compiler or ...  little homework.  :wink:
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: nenin on November 11, 2009, 10:17:12 pm
Have you observed similar problems in the official MinGW release(s)?
So, bad news. I reproduced problem on official MinGW 4.4.0, on 4.4.0-tdm-1-dw2 and on 4.4.1-tdm-2-dw2.
It's very interesting what about Linux version of gcc...
I do not separate source of errors yet. And I can not port whole project to Lin for reasonable time (and I have not Lin32 boxes, though).
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: stefanos_ on March 20, 2010, 10:18:19 pm
TDragon, still I'm facing the same issue I have once reported to you.

The issue I'm facing is while running "mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1" command and waiting for it to finish, it leaves the linking process in the middle while displaying these lines and immediately stops:

c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.848 ' unrecognized
c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.566 ' unrecognized

The weird part through this process is that "mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1" compiles just fine!

Based on this link http://www.ogre3d.org/forums/viewtopic.php?f=2&t=55801&start=0, this guy's issue looks similar to mine. I have tried to ignore my 2 errors as this guy was suggested by others and currently I cannot run Code::Blocks. I was able to compile my svn code with the half-linked wxmsw28u_gcc_custom.dll but now I get "The procedure entry point _ZTV17wxMemoryFSHandler could not be located in the dynamic link memory wxmsw28u_gcc_custom.dll."

My Operating System is Windows XP Pro SP3 and I have installed TDM's GCC / MinGW: 4.4.1-tdm-2, bundled version. The wxWidgets version I'm using is wxMSW-2.8.10.

Please advice.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: eranif on March 21, 2010, 06:14:08 am
Quote
c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.848 ' unrecognized
c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.566 ' unrecognized
Its not a TDM-GCC only error. I compiled wxWidgets with GCC4.4.0 (the one that is officially released by the MinGW project) and the same error exists.
Note that the produced import library+DLL  are very much usable and I did not notice any errors while using them (for 6 months at least)

Eran
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: eranif on March 21, 2010, 06:19:19 am
@stefanos_:
I missed your other part of the post :)
Quote
I was able to compile my svn code with the half-linked wxmsw28u_gcc_custom.dll
Its fully linked, those errors can be ignored
Quote
"The procedure entry point _ZTV17"The procedure entry point _ZTV17wxMemoryFSHandler could not be located in the dynamic link memory wxmsw28u_gcc_custom.dll." could not be located in the dynamic link memory wxmsw28u_gcc_custom.dll."
Change your code to use wxMemoryFSHandlerBase and it will work (the class wxMemoryFSHandler inherits directly from wxMemoryFSHandlerBase and adds *nothing* to it)

You might also encounter the same issue with wxStringClientData

Eran

Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: ollydbg on March 21, 2010, 06:21:07 am
Quote
c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.848 ' unrecognized
c:/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: <unknown-file>:0: syntax error
Warning: .drectve `-export:T.566 ' unrecognized
Its not a TDM-GCC only error. I compiled wxWidgets with GCC4.4.0 (the one that is officially released by the MinGW project) and the same error exists.
Note that the produced import library+DLL  are very much usable and I did not notice any errors while using them (for 6 months at least)

Eran

I use tdm gcc for nearlly one year, and each time I build wxWdiget library, I have noticed this kind of warning. But these warning never hurt the usage of wxWidget library. :D

So, it seems the problem is in the wxWidgets source itself.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: reckless on March 21, 2010, 10:39:14 am
not quite its a bug with the ld in binutils-0.20 it seems upgrading to binutils-0.20.1 fixed it for me atleast.

tor lilquist noticed the same with his crosscompiler suite for suse.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: stefanos_ on March 21, 2010, 12:34:45 pm
@reckless: Even though I have followed your recommendation and have replaced binutils from MinGW's official website, the warning(s) / error(s) remain the same; BUT, I have also replaced mingw32-make as well some other tools and now Code::Blocks load just fine.

@erafin: It was unnecessary to do such thing because the problem probably was with mingw32-make.

The tools I have replaced are these:

TDM's GCC
========

binutils (2.19.1)                                 ------> Have been replaced with MinGW's binutils (2.20.1-2)
gdb (6.8.3)                                       ------> Has been replaced with MinGW's gdb (7.1-1)
mingw-runtime (3.16)                         ------> Has been replaced with mingwrt (dev / dll 3.18)
mingw32-make (3.81 - 20080326-3)     ------> Has been replaced with mingw32-make (3.81 - 20090914)

And w32api which was the same I have replaced it just for fun.

Now everything seems to work OK. If I have any other issues I will surely let you know.
Title: Re: GCC 4.4.1-tdm-2 for MinGW (with installer)
Post by: reckless on March 21, 2010, 02:30:15 pm
glad it worked out  :) i allready had the other updated packages but recieved the same error untill i got latest ld,
 i guess some of it actually depended on it hence why i got the error untill i updated my binutils.