Code::Blocks Forums

User forums => Nightly builds => Topic started by: killerbot on November 01, 2007, 06:07:22 pm

Title: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 01, 2007, 06:07:22 pm
tomorrow, when we switch to GCC 4.2.1 build with wx286 ...
Title: Re: The 01 November 2007 build will NOT be out.
Post by: kelo81 on November 01, 2007, 07:07:16 pm
cool! (what GCC model will you use for the compilation? sjlj or dw2 ? )
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 01, 2007, 08:01:11 pm
I use dw2.
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Mc.Michael on November 01, 2007, 10:10:43 pm
dw2 or sjlj . In what a difference?
Title: Re: The 01 November 2007 build will NOT be out.
Post by: stahta01 on November 02, 2007, 12:23:16 am
dw2 or sjlj . In what a difference?

If you mean what is the difference?
The dw2 works better with the debugger, since it is what, or closely related, Linux uses.
Windows standard is sjlj. In some cases, sjlj is better on windows; if you need to have exceptions from standard sjlj DLLs passing to your code is one case where sjlj better.

If you are not using windows DLLs, most people consider dw2 the clear winner.

Note, the above is what I have read; I have no direct experience on which is better.

Tim S
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Ceniza on November 02, 2007, 02:46:18 am
Well, from what I read (and if I really really recall correctly) dw2 has a higher performance than sjlj when no exceptions occur, but it's slower for stack unwinding. I think it's OK if it's a bit slower when an exception is thrown. After all, exceptions don't occur that often in regular code, but code that could throw exceptions is constantly being called. Just to give you an example, consider std::string. Since it does dynamic allocation, it uses the new operator which must throw an exception if not enough memory can be acquired (unless an implementation decided to use the nothrow version of it, or malloc, or something else). In most cases your program will run without problems, even if it does a lot of string manipulation. From my personal experience, I was writing a parser some months ago, and I was using std::string (yes, I'm continuing the example). Profiling that code shown that somewhere between 20% and 25% of the time was spent (or if you prefer "wasted") in sjlj stuff that was never used. I wish I had had the opportunity to test the same code using dw2, but I didn't have the compiler to do that neither I knew about dw2.

Oh, and just before you ask: the current CodeCompletion plugin uses wxString, which uses malloc. If you feel it's running faster, I'd bet it's just a "placebo effect".
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Grom on November 02, 2007, 03:32:32 am
Would be grate to get an installable package of C::B with gcc 4.2.1 with omp support and wx. I am working with PhD students, who have no experience of digging of an operational system. Thanks to God they can write something in C++... And I have to spend too march time with them :x.
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Jan van den Borst on November 02, 2007, 12:58:02 pm
LS,
Is there already some explanation on how to set up the new GCC4.2.1 compiler to work with codeblocks? (which packages sould be installed ...)

Jan
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 02, 2007, 02:14:36 pm
just the same ones as GCC3.4.5, but then their lastest counterparts, and next all exe's in the bin should be removed from their -dw2 postfix
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Jan van den Borst on November 02, 2007, 05:08:57 pm
Thanks I will try this tonight
Jan
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 02, 2007, 05:32:21 pm
the only issue I am still trying to resolve at this moment, I can't debug with MinGW4.2.1 and GDB (tried GDB 6.3 and 6.6). Dunno what i am doing wrong ...
Title: Re: The 01 November 2007 build will NOT be out.
Post by: RJP Computing on November 02, 2007, 07:43:10 pm
LS,
Is there already some explanation on how to set up the new GCC4.2.1 compiler to work with codeblocks? (which packages sould be installed ...)

Jan
I made an installer that is available here (http://wxpack.sourceforge.net/Main/Downloads) (Look at the bottom of the page). It is nothing more than a bare minimum setup. Meaning I don't set any environment variables so you can have both systems (4.x.x and 3.x.x) on your computer at once. Plus the debugger works. ;-)
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Jan van den Borst on November 02, 2007, 08:16:15 pm
LS,
Is there already some explanation on how to set up the new GCC4.2.1 compiler to work with codeblocks? (which packages sould be installed ...)

Jan
I made an installer that is available here (http://wxpack.sourceforge.net/Main/Downloads) (Look at the bottom of the page). It is nothing more than a bare minimum setup. Meaning I don't set any environment variables so you can have both systems (4.x.x and 3.x.x) on your computer at once. Plus the debugger works. ;-)

This is great
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 03, 2007, 12:11:01 am
the only issue I am still trying to resolve at this moment, I can't debug with MinGW4.2.1 and GDB (tried GDB 6.3 and 6.6). Dunno what i am doing wrong ...

The thing is in my long running virtual machine, it works [that means a CB that still detects (or had detected) GCC the old way] but with the new virtual machine, it fails. Not able to debug, as well as CB is not able to determine the version of GCC, which shows in 2 ways, the build script to get rid of the dozen warnings of wx fails [it receives an empty version string] and the CB code generates the -I- option where in case of gcc 4.x it should generate -iquote.

Well maybe tomorrow after a fresh reboot, it might work, who knows. Otherwise a detailed compare of default.conf might reveal something ...
Title: Re: The 01 November 2007 build will NOT be out.
Post by: stahta01 on November 03, 2007, 12:33:05 am
CB code generates the -I- option where in case of gcc 4.x it should generate -iquote.

I am getting this on my real windows XP machine. When using MinGW GCC, but TDM build works right.

I think the version info format is the issue.

gcc version 4.2.2 (TDM-1)
gcc version 4.2.1-sjlj (mingw32-2)

Tim S
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Biplab on November 03, 2007, 04:50:33 am
I am getting this on my real windows XP machine. When using MinGW GCC, but TDM build works right.

I think the version info format is the issue.

gcc version 4.2.2 (TDM-1)
gcc version 4.2.1-sjlj (mingw32-2)

This works well in my PC. I used gcc --version at command prompt it returns -
Quote
gcc (GCC) 4.2.1-dw2 (mingw32 dw2-unwind)

Then I started C::B and checking the version string by running the following script at script console.
Code
ShowInfo(GetCompilerFactory().GetCompilerVersionString(_T("gcc")));

And it returns 4.2.1 and in my case a wx project works well with 3.4.x or 4.2.x compilers. :)
Title: Re: The 01 November 2007 build will NOT be out.
Post by: stahta01 on November 03, 2007, 05:58:53 am
I get a different version message for the dw2 without "dw2-unwind" in it. Did you download it from http://sourceforge.net/projects/mingw/ or somewhere else?

Tim S

Code
gcc-dw2.exe (GCC) 4.2.1-dw2 (mingw32-2)


The popup window works for TDM GCC and not for the MinGW dw2 of sjlj ones.
Re-downloading the MinGW GCC files, I have no idea if I am using the newest file of not.
(2007-08-14 07:07) looks like the newest dw2 files.
The files seem the same and produces a blank popup.
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Biplab on November 03, 2007, 06:22:59 am
I get a different version message for the dw2 without "dw2-unwind" in it. Did you download it from http://sourceforge.net/projects/mingw/ or somewhere else?

Tim S

Code
gcc-dw2.exe (GCC) 4.2.1-dw2 (mingw32-2)


The popup window works for TDM GCC and not for the MinGW dw2 of sjlj ones.
Re-downloading the MinGW GCC files, I have no idea if I am using the newest file of not.
(2007-08-14 07:07) looks like the newest dw2 files.
The files seem the same and produces a blank popup.

I guess I'm using the first release. But that shouldn't matter. In all cases the version check is done at C::B start-up. Thus if the pop-up is empty or malformed then the Regex has failed to parse the output.

I'll try it with the latest mingw snapshot one.
Title: Re: The 01 November 2007 build will NOT be out.
Post by: Biplab on November 03, 2007, 06:33:03 am
It still works fine.

This is the output at command line.
Quote
gcc (GCC) 4.2.1-dw2 (mingw32-2)

And running the script correctly shows 4.2.1. Are you using self-compiled C::B or official nightly? I'm using Official nightly.
Title: Re: The 01 November 2007 build will NOT be out.
Post by: stahta01 on November 03, 2007, 06:50:16 am
It still works fine.

This is the output at command line.
Quote
gcc (GCC) 4.2.1-dw2 (mingw32-2)

And running the script correctly shows 4.2.1. Are you using self-compiled C::B or official nightly? I'm using Official nightly.

Self Compiled, which nightly are you using? I will try the latest one.

Still have the problem with Nightly download of SVN 4564, what are you using in C::B settings of
ToolChain executable - Program File - C Compiler
I have tried more than one value and none of the worked for getting anything other than blank.

Tim S
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 03, 2007, 10:16:18 am
I use the same files. On my PC it works. I copied the entire MinGW directory to my laptop (both are located at C:\MinGW) and both systems have C:\MinGW\bin added to PATH.

PC works ok, laptop fails [and related or not ?? on the laptop I can't debug].

Only difference : the PC was being svn updated and builded for a long time [so it still uses the old MinGW detection], the laptop was brand new install.

Note : both systems are running in a virtual machine by using VirtualBox, both Windows XP, and on the PC the host system is openSuse 10.2 , where on the laptop it is openSUSE 10.3.
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 03, 2007, 10:57:03 am
PC and laptop give me :
Code
gcc (GCC) 4.2.1-dw2 (mingw32-2)

or

mingw32-gcc (GCC) 4.2.1-dw2 (mingw32-2)

Note : there have been 2 releases of 4.2.1 dw2, the very first ones, had some issues. I guess I have the second one, but as said i use the same files on both systems.

Running the script in the script console :

PC : 4.2.1
Laptop : empty string
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 03, 2007, 11:07:31 am
alright I have found the cause of our first problem.

Indeed, it is what I suspected. CB doesn't detect GCC correctly anymore. I already suspected this yesterday, and more precise I didn't trust the masterpath anymore. CB had detected C:\MinGW\bin instead of C:\MinGW.
Remove the \bin, and it will work OK.
I do remember some code will check to see if we are already in the bin dir, but apparently not the version checking.

Now checking if debugging works.

[EDIT] : debugging still fails on the laptop, but works on the PC :-(

[EDIT2] : fixed the debugging issue too : laptop was back on GDB 6.3, when upgrading to 6.6, it seems to work [very basic test on a Hello world console app].
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 03, 2007, 11:14:10 am
in comparing the 2 default.conf's I noted another difference. Debugger settings : Auto-build project to ensure-up-to-date. Both systems have this checked.

PC - default.conf : no sign of it
LAPTOP - default.conf : <AUTO_BUILD bool="1" />
Title: Re: The 01 November 2007 build will NOT be out.
Post by: stahta01 on November 03, 2007, 07:44:45 pm
Verify that you have mingw32-gcc.exe in the bin folder in both the working and the non working one.
I just did a few changes and adding mingw32-gcc.exe to the non working one was one of them and it appears to have worked.

Note, You are required to re-start C::B for this work around to work.

Tim S
Title: Re: The 01 November 2007 build will NOT be out.
Post by: killerbot on November 03, 2007, 11:10:20 pm
yes it is in the bin dir. As said, both directories were/are equal :since I copied MinGW dir from the PC to the laptop.
The only difference I found was the masterpath of GCC in CB (default.conf), so it seems the latest CB detects it otherwise then before.