Author Topic: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)  (Read 31990 times)

Offline rresto

  • Single posting newcomer
  • *
  • Posts: 2
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #15 on: July 01, 2015, 10:53:06 pm »
Hi, if I try to debug a simple C hello program, it's OK with Tdm 4.9 64 bit, but not OK with Tdm 5 64 bit (error displayed at gdb.exe startup : code 0xc000007b).

In 32 bits its OK

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #16 on: July 02, 2015, 01:59:39 am »
Did you add the (tdm-gcc)/gdb32/bin or (tdm-gcc)/gdb64/bin directories to your PATH? (You shouldn't do this.)

If not, is there a 32-bit python27.dll present somewhere else?

EDIT: Found that the 32-bit Python was mistakenly put in the 64-bit TDM GDB package, and another 64-bit Python on my system was masking the problem. A new package has been uploaded.
« Last Edit: July 02, 2015, 04:14:52 pm by TDragon »
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline headkase

  • Almost regular
  • **
  • Posts: 159
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #17 on: July 02, 2015, 09:22:32 pm »
No matter what I do I cannot get wxMSW 2.8.12 to compile with TDM 64 5.1.0.  It compiles with TDM 32 5.1.0.  Much googling has pointed to the MinGW-W64 runtime API as being the culprit but I have no idea how to go about fixing that.  Can you give any tips or a specific configuration to use?  I need 2.8.12 for Code::Blocks itself when building that.  I have successfully built wxWidgets 3.0.2 with TDM 64 5.1.0 but the resulting Code::Blocks editor with that has an issue with the caret (cursor) when navigating source files.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #18 on: July 02, 2015, 11:45:08 pm »
headkase: tdm4.9.2 successfully compiles wx2.8.12 (at least with a 64-bit friendly patch to the wx2.8 part) but be aware there is a bug in wx2.8 that effects debugger's frame numbers and stack switching.
Details here -> http://forums.codeblocks.org/index.php/topic,20155.0.html
If you want to go that way I've posted a patch to fix this in the above thread and it works but it is not applied to CB and won't be.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #19 on: July 03, 2015, 02:31:48 am »
I've successfully built under TDM64 with -m32, generating 32-bit code - but if you're talking about 64-bit wxWidgets and 64-bit Code::Blocks, I've never yet tried because I don't think it's fully supported yet on the Code::Blocks side.

-John E. / TDM
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline headkase

  • Almost regular
  • **
  • Posts: 159
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #20 on: July 03, 2015, 03:17:51 pm »
Yes, TDragon, I am talking about building a 64 bit wxMSW 2.8.12 and 64 bit Code::Blocks on Windows.  wxMSW 2.8.12 compiles and works fine with TDM 5.1.0-3 32 bit so if 64 bit just isn't possible with wxMSW then I'll keep the 32 bit compiler installed and just use that for Code::Blocks SVN builds while using the 64 bit compiler for my personal projects.

As already said, wxWidgets 3.0.2 64 bit builds fine (with -fpermissive and -std=gnu++11 switches) with TDM64 5.1.0-2 and so does Code::Blocks SVN with it.  However, the text editor in the resulting binaries has issues with the caret/cursor not properly updating.

Offline headkase

  • Almost regular
  • **
  • Posts: 159
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #21 on: July 03, 2015, 05:43:46 pm »
headkase: tdm4.9.2 successfully compiles wx2.8.12 (at least with a 64-bit friendly patch to the wx2.8 part) but be aware there is a bug in wx2.8 that effects debugger's frame numbers and stack switching.
Details here -> http://forums.codeblocks.org/index.php/topic,20155.0.html
If you want to go that way I've posted a patch to fix this in the above thread and it works but it is not applied to CB and won't be.

Thank you for the advice scarphin.  Looks like I'll be sticking with 32 bit builds for the foreseeable future.  One thing I am interested about though: where did you get that dark theme for Code::Blocks?  I'd like that very much..  I'm Windows 8.1 64 bit if it matters. :)

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #22 on: July 03, 2015, 07:01:50 pm »
It's not a theme for CB, it's a win7 theme called Concave7. I just personalized the syntax highlighting and other colors. Colors other than the ones for the editor are not customizable without a general windows theme afaik.

Offline headkase

  • Almost regular
  • **
  • Posts: 159
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #23 on: July 03, 2015, 07:52:01 pm »
Ok, right on, thank you again scarphin.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #24 on: July 06, 2015, 07:37:15 pm »
I have found that using also -Wno-deprecated-declarations in the CXXFLAGS to compile wxWidgets 3.0.2 seriously diminishes the number of displayed warning when using TDM 5.1.0.
More, if you add this in the compiler options when compiling C::B with wxWidgets 3.0.2 and TDM 5.1.0, you avoid tons of warnings (in fact always the same ones but displayed so many times !)

gd-on
« Last Edit: July 10, 2015, 08:32:36 am by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #25 on: July 10, 2015, 12:33:13 am »
Hi, John, you may need the two patches to fix the pch issue, see:
Comment 49 and Comment 50.
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.

Max

  • Guest
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #26 on: July 16, 2015, 11:25:48 pm »
Hi,

Is there any reason not to have the sanitizer libraries in TDM-GCC 5.1? I can't use the sanitizer switches because the related libraries are missed!


Offline gd_on

  • Lives here!
  • ****
  • Posts: 796
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #27 on: July 17, 2015, 07:35:26 pm »
Hi John,
I have a problem with TDM 5.1.0 gfortran. It happens with 32 bits version (in C:\MinGW32 for me) and 64 bits version (in C:\MinGW64 for me).
There are no such problem with TDM 4.9.2 gfortran.
I have put a small test case in a 7z file. It opens a file and read 1 line.
The program crashes when it reaches the open instruction.
In release mode I obtain this message in the console :
Program receive signal SIGSEGV : Segmentation fault ...
In debug mode, I obtain a message in Call stack view (see the .jpg screen capture).
A little bit different with 64 bit compiler, but same problem.

As told, no such problem with 4.9.2 TDM versions.
What could be wrong ?

Same problem on 3 different PC, all running Windows 7 (pro or family edition)

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #28 on: July 31, 2015, 12:03:36 am »
I've been trying to update my compiler to the new 5.1 but I keep getting a crash when codeblocks is loading it's GUI (I get the splash screen and it seems to load the plugins but crashes when it goes to load the gui.)

Here is the rpt file it creates:

Code
Error occured on Wednesday, July 29, 2015 at 17:53:53.

codeblocks.exe caused an Access Violation at location 62CC8871 in module wxmsw28u_gcc_custom.dll Reading from location 00000010.

Registers:
eax=02902318 ebx=02902318 ecx=00000000 edx=00000000 esi=62e3eac8 edi=62e1a5a0
eip=62cc8871 esp=0028f070 ebp=0028f118 iopl=0         nv up ei pl zr na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246

AddrPC   Params
62CC8871 029DDD50 0028F1B4 0028F1B8  wxmsw28u_gcc_custom.dll!wxCheckDynamicCast(wxObject*, wxClassInfo*)
62B33EFA 02758380 02902318 00000000  wxmsw28u_gcc_custom.dll!wxXmlResourceHandler::CreateResource(wxXmlNode*, wxObject*, wxObject*)
62B38390 02758380 02902318 00000000  wxmsw28u_gcc_custom.dll!wxXmlResource::CreateResFromNode(wxXmlNode*, wxObject*, wxObject*, wxXmlResourceHandler*)
62B3935E 02902318 00000000 0028F370  wxmsw28u_gcc_custom.dll!wxXmlResourceHandler::CreateChildren(wxObject*, bool)
62B08A89 029DDD50 0028F424 0028F428  wxmsw28u_gcc_custom.dll!wxPanelXmlHandler::DoCreateResource()
62B33EFA 02756AA8 028A2CE8 02902318  wxmsw28u_gcc_custom.dll!wxXmlResourceHandler::CreateResource(wxXmlNode*, wxObject*, wxObject*)
62B38390 02756AA8 028A2CE8 02902318  wxmsw28u_gcc_custom.dll!wxXmlResource::CreateResFromNode(wxXmlNode*, wxObject*, wxObject*, wxXmlResourceHandler*)
62B38BB6 02902318 028A2CE8 0028F5D4  wxmsw28u_gcc_custom.dll!wxXmlResource::LoadPanel(wxPanel*, wxWindow*, wxString const&)
00434789 028A2CE8 00000000 FFFFFFFF  codeblocks.exe!0x34789
0041C6A5 61851A5F 0028F730 0223FAEC  codeblocks.exe!0x1c6a5
6184F6B8 027441D8 00000000 00000180  codeblocks.dll!ZN15DebuggerManager13CreateWindowsEv
0047224D 028A95A8 0028F934 FFFFFFFF  codeblocks.exe!0x7224d
00486312 0028FA6C 00000001 FFFFFFFF  codeblocks.exe!0x86312
0048E624 00000000 0028FCCC 007052F8  codeblocks.exe!0x8e624
0040208D 00000000 FFFFFFFF 00000000  codeblocks.exe!0x208d
00407E6F 0028FDCC 006D6190 007A0000  codeblocks.exe!0x7e6f
62757E6D 00400000 00000000 009D2756  wxmsw28u_gcc_custom.dll!wxEntryReal(int&, wchar_t**)
00401DA8 7EFDE000 00000000 7EFDE000  codeblocks.exe!0x1da8
004010FD 7EFDE000 771919C1 00000000  codeblocks.exe!0x10fd
77C292E2 004012A0 7EFDE000 00000000  ntdll.dll!__RtlUserThreadStart
77C292B5 004012A0 7EFDE000 00000000  ntdll.dll!_RtlUserThreadStart

codeblocks.exe   13.12.0.0
ntdll.dll      6.1.7601.18869
kernel32.dll   6.1.7601.18869
KERNELBASE.dll   6.1.7601.18869
wxmsw28u_gcc_custom.dll   2.8.12.0
ADVAPI32.DLL   6.1.7601.18869
msvcrt.dll     7.0.7601.17744
sechost.dll    6.1.7601.18869
RPCRT4.dll     6.1.7601.18912
SspiCli.dll    6.1.7601.18912
CRYPTBASE.dll   6.1.7601.18912
COMCTL32.DLL   6.10.7601.18837
GDI32.dll      6.1.7601.18898
USER32.dll     6.1.7601.17514
LPK.dll        6.1.7601.18923
USP10.dll      1.626.7601.18454
SHLWAPI.dll    6.1.7601.17514
COMDLG32.DLL   6.1.7601.17514
SHELL32.dll    6.1.7601.18762
OLE32.dll      6.1.7601.18915
OLEAUT32.DLL   6.1.7601.18679
WINMM.DLL      6.1.7601.17514
WINSPOOL.DRV   6.1.7601.17514
WSOCK32.DLL    6.1.7600.16385
WS2_32.dll     6.1.7601.17514
NSI.dll        6.1.7600.16385
SHFOLDER.DLL   6.1.7600.16385
exchndl.dll    0.7.5.0
mgwhelp.dll    0.7.5.0
dbghelp.dll    6.3.9600.17029
PSAPI.DLL      6.1.7600.16385
VERSION.dll    6.1.7600.16385
codeblocks.dll
wxpropgrid.dll
IMM32.DLL      6.1.7601.17514
MSCTF.dll      6.1.7601.18731
avghookx.dll   15.0.0.6081
uxtheme.dll    6.1.7600.16385
dwmapi.dll     6.1.7600.16385
CRYPTSP.dll    6.1.7601.18741
rsaenh.dll     6.1.7600.16385
RpcRtRemote.dll   6.1.7601.17514
msftedit.DLL   5.41.21.2510

Windows 6.1.7601
DrMingw 0.7.5
Using win 7 64bit, tdm mingw 5.1, wxWidgets 2.8: git says: v2.8.12-132-g1ff8161 The version of codeblocks is SVN 10376

The commands I have been using to build wxWidgets are as follows:

mingw32-make -j7 -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 CFLAGS=-O3 CXXFLAGS="-O3 -fno-keep-inline-dllexport" BUILD=release clean
mingw32-make -j7 -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 CFLAGS=-O3 CXXFLAGS="-O3 -fno-keep-inline-dllexport" BUILD=release

And when I remove the -O3 optimization it all works fine so it looks like a compiler issue.

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)
« Reply #29 on: August 01, 2015, 03:05:54 pm »
-O3 optimization has shown to cause problems in past versions as well, i believe thats why the -O2 level is default.
the sanitizer libraries dont build on 64 bit mingw yet, the 32 bit mingw64 sanitizer libraries do build with some patching but if they work i dont know.

The 5.1.0 gcc release had some nasty bugs on windows that needed patching atleast if you wanted to use the dwarf debugging format instead of the slow as molasses setjump/longjump debugging format, 5.2.0 has the same bugs but fixes some of the other things that needed patching as well as fixing openmp.

Im collecting the new patches needed for 5.2.0 and will post them to TDM soon, might be worth waiting for the next release :)