Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
How can I biuld codeblocks with codeblocks on linux
Jenna:
--- Quote from: MortenMacFly on July 01, 2009, 03:58:06 pm ---
--- Quote from: jens on July 01, 2009, 03:25:20 pm ---And I think you should manually remove sdk_precom.h.gch and rebuild the whole project.
--- End quote ---
Probably that was the real problem here...?!
IMHO GCC always uses the GCH file if present (and can be found due to include folders). But I might be wrong...
--- End quote ---
I know and I deleted it of course.
--- Quote from: MortenMacFly on July 01, 2009, 03:58:06 pm ---
--- Quote from: jens on July 01, 2009, 03:25:20 pm ---just right-click sdk_precomp.h in the project tree, click properties, chose tab Build and uncheck Compile file.
--- End quote ---
This is exactly what happens if you setup the specific #defines accordingly. -> Inspect the header file, it's basically "empty" even if you compile it by then.
--- End quote ---
I did not manage to get a gch-file with less than 3.5 MByte (the normal has about 120 MByte).
Only tried on debian 64-bit, so I do not know if something works different on windows or on 32-bit.
Nevertheless it would be fine to be able to debug with precompiled headers on, and as posted before it works with gcc < 4.3 .
oBFusCATed:
--- Quote from: jens on June 30, 2009, 07:13:58 pm ---I found just one post about this issue, but without a solution: http://gcc.gnu.org/ml/gcc-help/2008-10/msg00209.html.
--- End quote ---
I've not seen anywhere the guy stating that he is using precompiled headers.
Jen have you reported that issue to the gcc guys?
--- Quote ---I think a simple checkbox ("Use precompiled headers"), that is checked by default would make sense (in the properties).
What does the other devs think about it ?
--- End quote ---
I support this change.
The current situation is quite confusing: you have 3 options, but none of them stops the precompiled header of being used and you have to read in the forum how to do that :(
Jenna:
--- Quote from: oBFusCATed on July 01, 2009, 07:41:04 pm ---
--- Quote from: jens on June 30, 2009, 07:13:58 pm ---I found just one post about this issue, but without a solution: http://gcc.gnu.org/ml/gcc-help/2008-10/msg00209.html.
--- End quote ---
I've not seen anywhere the guy stating that he is using precompiled headers.
Jen have you reported that issue to the gcc guys?
--- End quote ---
I didn't see it either, but the problem seems to be similar, the format the linenumbers are saved int (some) files (in his case shared libs) seems to have changed from gcc 4.2 to gcc 4.3 so that gdb cannot read them in some cases.
No, I did not report.
If I mention to create a test-case a little bit simpler than C::B I probably will.
Jenna:
Update:
all issues can be fixed, if two precompiled headers are used (as on windows).
That means adding the compile-flag to sdk.h and all problems seem to be gone.
Without that and sdk_precom.h.gch as pch, the compiler seems to be unable to examine correctly the file information.
Just force an error in a file of debugger-plugin (for example debugtree.cpp) and gcc always says the error is in the last include-file, but uses an incorrect large linenumber.
If you check the libdebugger.so-file with nm -l (to show line-numbers) you see the incorrect association between functions, files and linenumbers (that's how I found the possible solution).
Instead of precompiling sdk.h we can also include sdk_precomp.h, but that might lead to issues on windows.
What makes me wonder is, why it makes a difference whether we include sdk_precomp.h directly or indirectly via sdk.h .
So (pre)compile sdk.h seems to be the most simple solution and should (hopefully) not have any sideeffects.
Any comments or objections from users and devs that have more experience with precompiled headers are (as always) welcome.
Jenna:
--- Quote from: jens on July 03, 2009, 12:27:15 am ---So (pre)compile sdk.h seems to be the most simple solution and should (hopefully) not have any sideeffects.
Any comments or objections from users and devs that have more experience with precompiled headers are (as always) welcome.
--- End quote ---
Again:
are there any objections (especially by other dev) against using two precompiled headers ?
Or other solutions to make C::B debuggable with gcc >= 4.3 .
If not, I would like to commit a patch.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version