Author Topic: MinGW 64 bit suddendly crashes  (Read 11436 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
MinGW 64 bit suddendly crashes
« on: April 07, 2012, 06:08:19 pm »
Well, as of today when compiling C::B using C::B for 64 bit the executable "cc1plus.exe" (part of GCC) crashes when compiling SDK files.

It seems it is related to the mix of -mthreads, -DHAVE_W32API_H and (probably) the use of PCH. When I remove one of these flags form the command line it works suddenly. Is anyone is experiencing the same???

Strange: This did work properly for ages. But I cannot make it work again. Compiler: GCC 4.6 of TDM (4.6.1-tdm64-1), Windows 7 Ultimate 64 bit, command line:
x86_64-w64-mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -Woverloaded-virtual -DEXPORT_LIB -DEXPORT_EVENTS -DWXMAKINGDLL_SCI  -m64 -fno-keep-inline-dllexport -D_WIN64 -iquote.objs64\include -I.objs64\include -I. -IC:\Devel\wxWidgets_293_64\include -IC:\Devel\wxWidgets_293_64\contrib\include -IC:\Devel\wxWidgets_293_64\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Iinclude\tinyxml -Iinclude -Iinclude\tinyxml -Iinclude\scripting\bindings -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet  -c sdk\configmanager-revision.cpp -o .objs64\sdk\configmanager-revision.o

Full clean, re-compile and stuff does not work. Also, re-installing TDM...

Edit: Additional info: Compiling the libs than come before the SDK files in the project file all work, inclusive wxScintilla. Also, it crashes on the command line (w/o C::B), too.
« Last Edit: April 07, 2012, 06:29:09 pm by MortenMacFly »
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MinGW 64 bit suddendly crashes
« Reply #1 on: April 07, 2012, 06:23:07 pm »
Does it work if your svn update -r 7919?
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: MinGW 64 bit suddendly crashes
« Reply #2 on: April 07, 2012, 06:28:40 pm »
Does it work if your svn update -r 7919?
I just realised it does also not work outside C::B on the command line - so it seems not C::B related. ???
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: MinGW 64 bit suddendly crashes
« Reply #3 on: April 12, 2012, 11:57:18 am »
I just realised it does also not work outside C::B on the command line - so it seems not C::B related. ???
Well it *is* (somehow) C::B related.
Guess what: When I compile an older revision of the C::B code it works, compiling trunk crashes. Its really a compiler bug, but some of the latest changes in C::B make the compiler crash.

WHERE IS TDM GCC 4.7.x??? ;D
« Last Edit: April 12, 2012, 11:59:05 am by MortenMacFly »
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MinGW 64 bit suddendly crashes
« Reply #4 on: April 12, 2012, 12:18:49 pm »
I guess you'll have to bisect it in order to find the code that breaks it.
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: MinGW 64 bit suddendly crashes
« Reply #5 on: April 12, 2012, 01:04:01 pm »
I guess you'll have to bisect it in order to find the code that breaks it.
It breaks as soon as I start to compile a(ny) SDK file. No matter what (!). All the libs before work (as I said already) - no need to bisect. What happens in C::B is that even 3 compiler processes get launched in parallel and all of them crash instantaneously. On the command line playing with some parameters sometimes work, sometimes not. So - I see no chance to go from here. ???

It basically means that I have to cease development on 64 bit C::B until I find a compiler that works again.

Oh - and some more news: I have tried on another PC (Laptop) with Win7 Home - same thing. So its also not related to my OS / libs / DLL hell.

I wonder if Biplab is still able to compile... Biplab?
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: MinGW 64 bit suddendly crashes
« Reply #6 on: April 12, 2012, 02:06:24 pm »
What I meant was to revert to a know compilable revision and try again.
Have you monitored your memory usage? Is it OK?
Have you tried to disabled the PCH?
(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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: MinGW 64 bit suddendly crashes
« Reply #7 on: April 27, 2012, 07:56:40 pm »
For the record: I solved it today by applying a hint Biplab gave me via PM:
I disabled PCH completely and suddenly it works again. Enabling PCH makes it crash. (Any no, there are no artefacts of previous builds with PCH... ;))
This is really a compiler bug it seems...
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: MinGW 64 bit suddendly crashes
« Reply #8 on: April 30, 2012, 06:14:01 pm »
 ??? im compiling codeblocks with gcc-4.6.3 and no such problem. My gcc uses TDM's patchset so it should behave as his does but i have no such problem.
Only time i had cc1plus crash was when my mingw dir was not on path and it picked up a dll from another app with the same name (zlib1.dll) so i allways copy all dll's needed to
/mingw/libexec/gcc/i686-w64-mingw32/4.6.3/ to avoid those confusions. Depends.exe is a godsend finding what the executables depend on :D

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: MinGW 64 bit suddendly crashes
« Reply #9 on: May 01, 2012, 10:11:15 am »
Please try to use latest MinGW64 headers and CRT.
Regards,
xunxun

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: MinGW 64 bit suddendly crashes
« Reply #10 on: May 01, 2012, 05:04:26 pm »
Something for morten to toy with. Latest svn codeblocks (if no changes since yesterday) MinGW64 and MinGW32 gcc-4.7.0  with some of TDM's patches. Not all the patches apply anymore (eh_shmem and headerpath) but it has the rest.
CodeBlocks was not built with 4.7.0 since it crashes for me so i stuck building it with something i know works.
Latest crt and headers from mingw64 and latest binutils + make.
Both compilers are detected by codeblocks now and you dont need any weird switches to make a 64 bit build just
select the MinGW64 compiler and go ahead.
GDB not included nor are the devel libraries for gmp mpc or mpfr only the dll's to keep size down and you might prefer the gdb from xunxun.

http://sourceforge.net/projects/cbadvanced/files/CodeBlocks-svn-with%20mingw32-mingw64.7z/download

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: MinGW 64 bit suddendly crashes
« Reply #11 on: May 02, 2012, 05:14:44 pm »
Something for morten to toy with. Latest svn codeblocks (if no changes since yesterday) MinGW64 and MinGW32 gcc-4.7.0  with some of TDM's patches. Not all the patches apply anymore (eh_shmem and headerpath) but it has the rest.
CodeBlocks was not built with 4.7.0 since it crashes for me so i stuck building it with something i know works.
Latest crt and headers from mingw64 and latest binutils + make.
Both compilers are detected by codeblocks now and you dont need any weird switches to make a 64 bit build just
select the MinGW64 compiler and go ahead.
GDB not included nor are the devel libraries for gmp mpc or mpfr only the dll's to keep size down and you might prefer the gdb from xunxun.

http://sourceforge.net/projects/cbadvanced/files/CodeBlocks-svn-with%20mingw32-mingw64.7z/download

I don't know how the crash happens.

I use my edition, but no problem.

You can try http://pcxprj.googlecode.com/files/MinGW64CRT_4.7.1.20120501_static_win32.7z
but I haven't built 64bit gcc.
Regards,
xunxun

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: MinGW 64 bit suddendly crashes
« Reply #12 on: May 02, 2012, 05:39:55 pm »
Was not ment as a question :) i allready tried several 3'rd party versions of gcc-4.7.0 and none of them can build a working codeblocks on my PC.
My package was just for Morten to try out gcc-4.7.0 with codeblocks. If he stumbles on something that explains why C::B build breaks with it its even better.
If it works for him it means something is wrong with my system. Either way i get some info on what to do next :)