Code::Blocks Forums

User forums => Help => Topic started by: AndrewCot on July 12, 2021, 12:19:05 pm

Title: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 12, 2021, 12:19:05 pm
I have looked and cannot find any auto detect or code that tries to do any configuration of a debugger on initial install so that the end user does not have to configure the debugger manually.

If I have missed something can you please point me to where I have missed it. I also if this has been discussed before can someone please let me know the thread link or what to search for in the forum so I can see what was attempted and why it failed or in the more likely case was rejected.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 13, 2021, 11:48:09 pm
There is no such code, nor there are previous attempts to do it after the switch to the debugger config style.
Before that the debugger exe setting was part of the compiler settings.

Not sure it is worth the complications at the moment.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 15, 2021, 01:38:32 pm
oBFusCATed, thanks for the response.  I have a working P.O.C. that optionally adds the debugger configs and links the compiler.

Over the next few days I am now going to test that the following compilers I have on my Windows setup work with all of the patches I have been working on and fix any bugs I come across:
1) GCC Cygwin
2) GCC MSYS2 - mingw32
3) GCC MSYS2 - mingw64
4) GCC TDM-32
5) GCC TDM-64
6) GCC mingw-w64
7) GCC mingw    (mingw32)
8) LLVM Clang MSYS2 - mingw64

Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 16, 2021, 09:57:31 am
I have the code changes done, tested and ready to submit to resolve ticket 114 once the following has been done:
1) Ticket 374 patch lands in the truck.
2) Cygwin code changes lands in the trunk
3) Submit patch for ticket 1117 once 1 & 2 are done
4) Submit patch for ticket 1111 once 3 lands in the trunk
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 16, 2021, 09:18:22 pm
1 is highly unlikely to happen. For me TDM is dead for example (it cannot compile C::B in its last version).
Also I'm not sure we want to have 10 different but kind of the same compilers in the list.
I suppose the code should do a copy when it auto-detects multiple compilers of the same kind, but then it gets really complex about the order and naming.

I see a patch about 3, isn't this the latest version?
I don't see why 4 is a dependency on this one.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 17, 2021, 05:42:43 am
Just because the TDM 10.3 does not build CB should not be a criteria for not including it as allot of the supported compilers also do not compile CB.

I agree with the compilers being very very similar, but they each have different search directories and there are a few different debugger executables used. Having individual sets of files for each compiler allows you to select between them instead of having to change the configuration every time you want to swap between them. The code is all ready complex enough and adding extra code to "try" and auto detect multiple compilers in Windows and then copy the config and update it due to the different executables names used for some of the compilers would ne a nightmare, but adding the compiler & options XML file sets is allot easier and later when the compilers die they can be dropped allot easier.

As per my last post in 1117 the patch had a small bug in which I found when making changes for ticket 1111.

I have tested 1111 on a branch that includes the previous changes in order to fully test the changes and ensure that all of the changes work together to ensure that an end user doing a first time install can get a working compiler allot easier than with the current code.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 17, 2021, 09:59:29 am
Just because the TDM 10.3 does not build CB should not be a criteria for not including it as allot of the supported compilers also do not compile CB.
"does not build CB" is more like "it is broken and produces failing code". No idea why, but there are reports that CB is crashing when built with this compiler. I don't want to promote broken compilers. We've used TDM for a long time, but currently it is not well supported by TDragon and so we have to move on.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 18, 2021, 01:03:43 pm
I have been able to build CB with TDM-64 10.3.0 and use the CB produced to compiler a simple app and debug it.

Can you point me at the posts about "it is broken and produces failing code"?
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 18, 2021, 04:13:32 pm
Nope, search the forum, I'm a linux user mainly and for windows I'm just a spectator...
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: stahta01 on July 18, 2021, 08:33:25 pm
I have been able to build CB with TDM-64 10.3.0 and use the CB produced to compiler a simple app and debug it.

Can you point me at the posts about "it is broken and produces failing code"?

You may wish to say where you got the TDM-64 10.3.0 from?

Because I have no idea if you mean the real original website or the second website that was NOT the same person or some new third website.

Tim S.
 
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 19, 2021, 02:25:17 am
@oBFusCATed There are 6 forum posts after 2010 that reference TDM I have listed below. I also looked at the tickets and there is noting about TDM  "it is broken and produces failing code" that I could find.

2019: Topic: Error getting 32 bits aplication with CB, TDM and wxWidgets 
2018: gfortran TDM 5.1 problem
2017: Debugging with TDM GCC 32bit + CodeBlocks- can't find member variables
2017: multilib mingw-w64 TDM compiler
2015: TDM mingw 5.1 breaks XMLResourceHandler?
2012: problems with 32-bit executables in TDM mingw64 installation

In the 2015 post @stahta01 posted that -o3 often results in bad code. This is a GCC issue and not a specific TDM issue.
In the 2018 post there was a GCC bug report is referenced. Yet another GCC issue that is not specific TDM.

As such I cannot find any references to justify not including TDM as the two issues are GCC issues that would affect all of the compilers based on affected GCC source code.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 19, 2021, 02:26:28 am
@stahta01

Either of following sites.
https://jmeubank.github.io/tdm-gcc/download/
https://sourceforge.net/projects/tdm-gcc/files/v10.3.0-tdm64-1/

The https://sourceforge.net/projects/tdm-gcc/ page has the following:
TDM-GCC is now hosted on Github at https://jmeubank.github.io/tdm-gcc/.

Wikipedia TDM link to the two sites above on their TDM page:
https://en.wikipedia.org/wiki/TDM-GCC
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 19, 2021, 08:49:10 pm
@oBFusCATed There are 6 forum posts after 2010 that reference TDM I have listed below. I also looked at the tickets and there is noting about TDM  "it is broken and produces failing code" that I could find.
https://forums.codeblocks.org/index.php/topic,23642.0.html

Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 20, 2021, 01:24:48 am
Try the link as it does not work for me.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 20, 2021, 02:23:15 am
Works fine and it leads to "TDM-Gcc is discontinued" where TDM failures are discussed. I've not linked a particular post.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 29, 2021, 01:41:02 am
The link only works when I am logged in, otherwise it redirects me to https://forums.codeblocks.org/index.php
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: oBFusCATed on July 29, 2021, 09:35:15 am
Works fine in a private firefox window, too.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: nenin on July 29, 2021, 09:40:24 am
Over the next few days I am now going to test that the following compilers I have on my Windows setup work with all of the patches I have been working on and fix any bugs I come across:
I propose to add to list https://winlibs.com/ - looks like this site offers most fresh mingw-w64 + gcc out of msys2.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on July 30, 2021, 02:49:23 pm
Quote
I propose to add to list https://winlibs.com/ - looks like this site offers most fresh mingw-w64 + gcc out of msys2.

This site is more for bleeding edge GCC compiler versions that you install over the top of an existing setup. If this is done then the existing setup and new GCC from the site will be supported via the patch included in ticket 374 once it lands in the trunk and a CB is released with the changes in it assuming it ever makes it into the trunk.

Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: ollydbg on July 31, 2021, 07:10:15 am
https://winlibs.com/ (https://winlibs.com/), if I remember correctly, this compiler suite supply GDB, but the GDB is not python enabled.

So, I finally use this one: https://github.com/Guyutongxue/mingw-release

I have already post the reasons here: an annoying gcc bug which cause bad debugging experience is fixed in gcc trunk (https://forums.codeblocks.org/index.php/topic,24456.0.html)

EDIT: MinGW with GCC 11.1.0 (https://github.com/Guyutongxue/mingw-release/releases/tag/v11.1.0) works OK, and 11.2 version has some build issue, so please use 11.1 unless 11.2's issue is fixed.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: nenin on July 31, 2021, 04:21:20 pm
https://winlibs.com/ (https://winlibs.com/), if I remember correctly, this compiler suite supply GDB, but the GDB is not python enabled.
Yes, at that moment there is no python in winlibs GDB. Stand alone "pythonified" GDB can be found here: https://github.com/ssbssa/gdb/

Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on August 01, 2021, 03:06:34 am
Have either @ollydbg or @nenin successfully built wxwidget 3.1.5 with either of the GCC 11.2 compilers?

I tried last night to build wxWidget 3.1.5 with both GCC 11.2.0 compilers and they both failed with completely different issues on my setup, one hung on 'ar' and another had multiple definitions when it looked like it was near the end, but unfortunately the scroll back buffer was not large enough for me to scroll back to see what command the build was running that displayed the multiple defninitions. I also tried the wxWidget truck (be aware you need to g"git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets" due to linked sub projects), but it also failed to build.

BTW: I had major issues until I told my AV to bugger off with the install directory after I scanned the install files....grrrr.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: ollydbg on August 01, 2021, 04:41:14 am
Have either @ollydbg or @nenin successfully built wxwidget 3.1.5 with either of the GCC 11.2 compilers?

I tried last night to build wxWidget 3.1.5 with both GCC 11.2.0 compilers and they both failed with completely different issues on my setup, one hung on 'ar' and another had multiple definitions when it looked like it was near the end, but unfortunately the scroll back buffer was not large enough for me to scroll back to see what command the build was running that displayed the multiple defninitions. I also tried the wxWidget truck (be aware you need to g"git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets" due to linked sub projects), but it also failed to build.

BTW: I had major issues until I told my AV to bugger off with the install directory after I scanned the install files....grrrr.

Hi, for gytx's GCC 11.2, I also failed to build wxWidgets 3.1.5, some build issues are reported and identified here:

https://github.com/Guyutongxue/mingw-release/issues?q=

So, please use gytx's GCC 11.1. (see here: MinGW with GCC 11.1.0 (https://github.com/Guyutongxue/mingw-release/releases/tag/v11.1.0)) This works OK for several months in my PC.

I haven't build the wxWidgets' trunk yet.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: nenin on August 01, 2021, 07:42:36 am
Have either @ollydbg or @nenin successfully built wxwidget 3.1.5 with either of the GCC 11.2 compilers?
I have 32b compiler installed.  I can try.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on August 01, 2021, 08:08:32 am
@ollydbg, I spotted the issue and also spotted the wxwidget trunk included GCC 11 build fixes so I thought I would try, but it failed.

I did as suggested and tried the gytx's GCC 11.1.0 and it worked successfully with regards to building wxwidget 3.1.5 and CB with no issues The resulting CB runs okay in my 10 minutes testing I did.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: ollydbg on August 01, 2021, 08:46:44 am
@ollydbg, I spotted the issue and also spotted the wxwidget trunk included GCC 11 build fixes so I thought I would try, but it failed.

I did as suggested and tried the gytx's GCC 11.1.0 and it worked successfully with regards to building wxwidget 3.1.5 and CB with no issues The resulting CB runs okay in my 10 minutes testing I did.

Good to hear. I'm using gytx's GCC 11.1.0 for several months, and I don't see issues of the result C::B. :)
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: nenin on August 01, 2021, 09:03:33 am
@ollydbg, I spotted the issue and also spotted the wxwidget trunk included GCC 11 build fixes so I thought I would try, but it failed.

I did as suggested and tried the gytx's GCC 11.1.0 and it worked successfully with regards to building wxwidget 3.1.5 and CB with no issues The resulting CB runs okay in my 10 minutes testing I did.
I just made 64b  mono build with winlibs 11.2 without errors with options: "-O2 -DNDEBUG -march=nocona  -s -msse4"
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: ollydbg on August 02, 2021, 04:29:56 am
Some good news about gcc 11.2, MinGW with GCC 11.2.0 (revision 1) (https://github.com/Guyutongxue/mingw-release/releases/tag/v11.2.0-r1) this fixed the build issue, and I can build wx 3.1.5 and code::blocks now without any issue.
Title: Re: Is there a way of automatically configuring debugger on initial install?
Post by: AndrewCot on August 02, 2021, 08:46:16 am
@ollydbg thanks for the info and link. I have also been able to build wxwidget and CB without any issues.