Author Topic: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)  (Read 65009 times)

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #30 on: October 06, 2011, 03:49:23 am »
@TDragon
I suggest you to build ld and lto1 using -Wl,--large-address-aware.
This can solve many memory exhausted problems.
Regards,
xunxun

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #31 on: October 07, 2011, 02:04:51 pm »
Then 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.
« Last Edit: October 07, 2011, 02:06:26 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #32 on: October 07, 2011, 04:07:03 pm »
Then 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #33 on: October 09, 2011, 02:34:05 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #34 on: October 09, 2011, 08:09:16 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.

Offline lvdong

  • Single posting newcomer
  • *
  • Posts: 2
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #35 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"

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #36 on: October 18, 2011, 08:24:47 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #37 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.
« Last Edit: October 18, 2011, 02:00:29 pm by reckless »

Offline lvdong

  • Single posting newcomer
  • *
  • Posts: 2
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #38 on: October 19, 2011, 07:54:27 am »
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

Code
#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
« Last Edit: October 19, 2011, 01:16:26 pm by lvdong »

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #39 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.

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #40 on: October 19, 2011, 10:49:12 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

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #41 on: October 19, 2011, 07:00:09 pm »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #42 on: December 21, 2011, 02:21:16 am »
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.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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #43 on: February 23, 2012, 05:02:14 pm »
...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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: TDM-GCC 4.6 series (Latest: 4.6.1 - 2011-09-23)
« Reply #44 on: February 24, 2012, 08:08:57 am »
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