Author Topic: Error building codeblocks 7860  (Read 17614 times)

Offline Totoxa

  • Multiple posting newcomer
  • *
  • Posts: 31
Error building codeblocks 7860
« on: February 27, 2012, 07:26:54 pm »
building codeblocks 7860 with codeblocks(svn 7785) in ubuntu 10.04 i get this error:

Code
main.cpp                In member function ‘void MainFrame::OnFileSaveAll(wxCommandEvent&)’
main.cpp    2694    error: ‘class ConfigManager’ has no member named ‘Flush’

and i dont know how to solve it, help please

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: Error building codeblocks 7860
« Reply #1 on: February 27, 2012, 08:10:27 pm »
and i dont know how to solve it, help please
Do a re-build, as stated in the SVN logs. Even better: Do a clean check-out before. At minimum, delete the PCH (*.gch) files.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Totoxa

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Error building codeblocks 7860
« Reply #2 on: February 28, 2012, 01:57:59 am »
Thanks!, deleting the *.gch files worked for me

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13195
    • Travis build status
Re: Error building codeblocks 7860
« Reply #3 on: February 28, 2012, 08:11:46 am »
Morten: Can we make C::B delete the .gch files automatically, when the user executes clean or rebuild?
(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: 9613
Re: Error building codeblocks 7860
« Reply #4 on: February 28, 2012, 08:44:10 am »
Morten: Can we make C::B delete the .gch files automatically, when the user executes clean or rebuild?
In both cases they already should be cleaned automatically. The error IMHO occurs because people don't clean or re-build, they just do a build.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13195
    • Travis build status
Re: Error building codeblocks 7860
« Reply #5 on: February 28, 2012, 10:12:42 am »
In both cases they already should be cleaned automatically. The error IMHO occurs because people don't clean or re-build, they just do a build.
But then, why C::B is dumb or not smart enough to regenerate the gch files, when a dependant header changes?
(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 killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5278
Re: Error building codeblocks 7860
« Reply #6 on: February 28, 2012, 11:02:24 am »
you could have known I would write this ;-)

Can we just stop using precompiled headers all together ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13195
    • Travis build status
Re: Error building codeblocks 7860
« Reply #7 on: February 28, 2012, 11:55:53 am »
Can we just stop using precompiled headers all together ?
+1 :)
I hate it, when I change something in cbplugin.h and then I have to wait a full recompile...
(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: 9613
Re: Error building codeblocks 7860
« Reply #8 on: February 28, 2012, 05:21:33 pm »
Can we just stop using precompiled headers all together ?
+1 :)
Are you aware that in that case compiling the whole C::B workspace takes roughly twice (if not even more!) the time? We introduced PCH for a good reason. A better thing would be to create a pre-build step that deletes the gch files every time the SDK or C::B main app is compiled. Tat would do it, too but still speed-up the later compile steps.

Still my favourite is to fix the actual error (if any) - however, I usually don't have this trouble. But I also don't know what is different, except the platform (Windows / Linux).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13195
    • Travis build status
Re: Error building codeblocks 7860
« Reply #9 on: February 28, 2012, 05:48:25 pm »
Morten:
Yes, if we just disable the pre-compiled headers and leave all the includes the way they are it will be slower. Because every file includes every file from the SDK, no mater if it needs it or not.
Also as far as I've read about pre-compiled headers, there should be used only for external libs, not for internal stuff, because they cause the pains I'm having.

Removing the PCH should be involving process and will take a lot of effort.

p.s. the full build (full as a build with all plugins, bootstrapping and make install phaze)  on linux without pre-compiled headers using autotools takes around 10 minutes. I've not tried what is the time with pch. I'll do a test later and will report my findings.

Still my favourite is to fix the actual error (if any) - however, I usually don't have this trouble. But I also don't know what is different, except the platform (Windows / Linux).
This is another matter and it is unrelated to the disabling of 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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Error building codeblocks 7860
« Reply #10 on: February 28, 2012, 06:14:34 pm »
Morten:
Yes, if we just disable the pre-compiled headers and leave all the includes the way they are it will be slower. Because every file includes every file from the SDK, no mater if it needs it or not.
Also as far as I've read about pre-compiled headers, there should be used only for external libs, not for internal stuff, because they cause the pains I'm having.

Removing the PCH should be involving process and will take a lot of effort.

p.s. the full build (full as a build with all plugins, bootstrapping and make install phaze)  on linux without pre-compiled headers using autotools takes around 10 minutes. I've not tried what is the time with pch. I'll do a test later and will report my findings.
Are you sure it's without pch's ?
By default the automake-system uses pch's (not autotools in general, but our configuration).

Still my favourite is to fix the actual error (if any) - however, I usually don't have this trouble. But I also don't know what is different, except the platform (Windows / Linux).
This is another matter and it is unrelated to the disabling of pch.
I think whatr Morten wants to say, is to fix the bug, that leads to the problems with pch's.
And that is not unrelated to disabling them in general.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13195
    • Travis build status
Re: Error building codeblocks 7860
« Reply #11 on: February 28, 2012, 06:29:17 pm »
Are you sure it's without pch's ?
By default the automake-system uses pch's (not autotools in general, but our configuration).
I'm always building with --disable-pch which is documented as disabling pchs, also it breaks when the pch build is broken.

I think whatr Morten wants to say, is to fix the bug, that leads to the problems with pch's.
I know and I agree that the bug should be fixed. As I'm the one who started this discussion. :)

And that is not unrelated to disabling them in general.
It is :)
(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: 9613
Re: Error building codeblocks 7860
« Reply #12 on: February 28, 2012, 06:35:55 pm »
Still my favourite is to fix the actual error (if any) - however, I usually don't have this trouble. But I also don't know what is different, except the platform (Windows / Linux).
This is another matter and it is unrelated to the disabling of pch.
I think whatr Morten wants to say, is to fix the bug, that leads to the problems with pch's.
And that is not unrelated to disabling them in general.
Yes, that's what I meant - find the reason why it doesn't work an fix it. However, as it seems to depend on the platform it may not be our fault at all, but the compiler used could be another reason. And the fact that I can hardly reproduce on Windows makes me believe so.

In fact what we do is plain right: If the header file is set to be compiled first (which is is due to the weight) and it has changed (which we figure out by its date and dependencies) it will be re-compiled. The rest is done by the compiler.

Reasons why it does not work maybe:
1.) The date is wrong
2.) The dependencies are calculated wrong
3.) The compiler pre-compiles wrong
4.) (for me most likely) when we start build processes in parallel we don't consider a special handling for PCHs. Consider you start 3 build processes, where the first two are the PCH's and the next one is already part of the SDK.

However, if 4.) is true it should always work in a second trial.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: Error building codeblocks 7860
« Reply #13 on: February 28, 2012, 06:36:42 pm »
I'm always building with --disable-pch which is documented as disabling pchs, also it breaks when the pch build is broken.
Yes, and I guess I know why that is - I'll commit a fix I had prepared for that... gimme some time...

UPDATE: Done.
« Last Edit: February 28, 2012, 06:39:17 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13195
    • Travis build status
Re: Error building codeblocks 7860
« Reply #14 on: February 28, 2012, 08:32:01 pm »
Some benchmarks:
Code
no pch all plugins

real    6m3.471s
user    17m28.232s
sys     1m4.067s

with pch all plugins
real    5m29.323s
user    15m29.386s
sys     1m4.443s

no pch core only
real    2m16.697s
user    6m47.092s
sys     0m22.004s

with pch core only
real    1m55.610s
user    5m17.441s
sys     0m21.784s
Linux, make -j5, gcc 4.5.3 core2quad 6600 @ 3.2 ghz.
I don't see what is the benefit of pch. I see only pain...
(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!]