News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)

Started by TDragon, September 23, 2011, 08:21:03 PM

Previous topic - Next topic

xunxun

@TDragon
I suggest you to build ld and lto1 using -Wl,--large-address-aware.
This can solve many memory exhausted problems.
Regards,
xunxun

thomas

#31
Quote from: xunxun1982 on October 06, 2011, 03:44:56 AMThen you can try -flto-partition=none
Tried, thanks... did not help though, unluckily.

I can only successfully build Code::Blocks with MingW-gcc 4.6.1 without LTO at all (except for Tinyxml and Squirrel/SQPlus). Anything remotely close to wxWidgets in any way blows up and burns. And, although it builds without LTO, it still doesn't run (error 0xc0000005 at startup).

Funnily, I can build wxWidgets with MingW-gcc 4.6.1 and then Code::Blocks with MingW-gcc 4.5.3 using that DLL just fine, and it works...

Has anyone tried using the sjlj version? Maybe it's some interaction with DW2 too, who knows. I'm only ever using DW2 ("DW2 or bust!"), so that might be it.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

xunxun

Quote from: thomas on October 07, 2011, 02:04:51 PM
Quote from: xunxun1982 on October 06, 2011, 03:44:56 AMThen you can try -flto-partition=none
Tried, thanks... did not help though, unluckily.

I can only successfully build Code::Blocks with MingW-gcc 4.6.1 without LTO at all (except for Tinyxml and Squirrel/SQPlus). Anything remotely close to wxWidgets in any way blows up and burns. And, although it builds without LTO, it still doesn't run (error 0xc0000005 at startup).

Funnily, I can build wxWidgets with MingW-gcc 4.6.1 and then Code::Blocks with MingW-gcc 4.5.3 using that DLL just fine, and it works...

Has anyone tried using the sjlj version? Maybe it's some interaction with DW2 too, who knows. I'm only ever using DW2 ("DW2 or bust!"), so that might be it.
It's very strange.
May you try my 4.6.1 edition (also dw2) https://pcxprj.googlecode.com/files/MinGW_gcc4.6.1release_static_win32.7z?
I haven't found these issues.
Regards,
xunxun

MortenMacFly

Quote from: thomas on October 07, 2011, 02:04:51 PM
Has anyone tried using the sjlj version? Maybe it's some interaction with DW2 too, who knows. I'm only ever using DW2 ("DW2 or bust!"), so that might be it.
So, I tried building wxWidets and C::B on Windows 7 with TDM 4.6.1 sjlj. It works nearly perfectly, only the NassiShneiderman plugin refuses to load. However, it's not an SDK mismatch issue (as C::B complains).

Ps.: Yes, I finally updated my platform from XP. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

Quote from: MortenMacFly on October 09, 2011, 02:34:05 PM
It works nearly perfectly, only the NassiShneiderman plugin refuses to load.
I believe that is a symptom of the problem I described here.

In the NassiShneiderman project file, change the linker option -enable-auto-import to -Wl,-enable-auto-import.

lvdong

#include <float.h> can not include the mingw32's float header
please check with the macros for "Control word masks for unMask"

MortenMacFly

Quote from: lvdong on October 18, 2011, 06:25:24 AM
#include <float.h> can not include the mingw32's float header
please check with the macros for "Control word masks for unMask"
...what ever that means. :shock: Is this related to the compile failure? Because the "fix" of Alpha was correct.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

reckless

#37
i think he refers to an old gcc bug with mingw.
gcc's float.h collides with the one from mingw's.
several fixes on that one through time but it does rear its ugly head from time to time most notably when a new version of gcc hits the fan :/
It will probably newer be fixed 100% because the gcc team has made clear that they dont support changing it locally because it would break linux builds.

lvdong

#38
Quote from: reckless on October 18, 2011, 01:57:55 PM
i think he refers to an old gcc bug with mingw.
gcc's float.h collides with the one from mingw's.
several fixes on that one through time but it does rear its ugly head from time to time most notably when a new version of gcc hits the fan :/
It will probably newer be fixed 100% because the gcc team has made clear that they dont support changing it locally because it would break linux builds.

sorry for my pool english, you can check the following codes

source: a.c


#include <stdio.h>
#include <float.h>

#ifndef MCW_EM
#define MCW_EM _MCW_EM
#endif

int main()
{
    printf("%x\n",MCW_EM);
    return 0;
}


cmd: gcc a.c

tdm-gcc-4.5.2: pass
tdm-gcc-4.6.1: a.c:10:19: error: '_MCW_EM' undeclared

reckless

Aye thats pretty much the same error i ran into the couple of versions of gcc i been using with mingw when something used those float functions.
And a few others i cant remember of the top of my head.
Only advise i can give is let the mingw developers know that its broken (again) with 4.6.1 and hopefully they fix it for this version.

xunxun

Quote from: reckless on October 19, 2011, 10:39:39 AM
Aye thats pretty much the same error i ran into the couple of versions of gcc i been using with mingw when something used those float functions.
And a few others i cant remember of the top of my head.
Only advise i can give is let the mingw developers know that its broken (again) with 4.6.1 and hopefully they fix it for this version.
I think gcc 4.6.1 with mingw64 headers and crt has not the issue.
Regards,
xunxun

reckless

Been a while since i had code using the float functions but an easy test is compiling QT 4.7 since i know it uses them.
Might be allready fixed with the mingw64 crt but cant speak for standard mingw crt.

ollydbg

Is it possible the backport this patch to 4.6.x serial of tdm gcc. see:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49951

Mentioned here:http://forums.next.codeblocks.org/index.php/topic,15264.msg103631.html#msg103631

Without this fix, it was really annoying when debugging.
Thanks.
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.

MortenMacFly

...did anyone try to link against bfd on 64 bit Windows? It seems the bfd library provided with the 64 bit version of TDM-GCC is incompatible. Is that correct?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

reckless

Backported the patch to 4.6.2 it should allready be in on 4.6.3.
Havent tried linking to bfd with TDM's build since i maintain my own fork so cant say.
You are welcome to test my own fork and see if it also fails with that.
If it does let me know so it can be fixed.

the 64 bit fork is here. http://sourceforge.net/projects/cbadvanced/files/MinGW64-gcc-4.6.2-ada-build.7z/download