User forums > Using Code::Blocks
Code::Blocks compiles in 64 bit Linux!!
Promit:
I played with the code some more, but I haven't managed to get it to not freeze when the code completion is invoked.
I suppose this would be a good time to test the gdb plugin's functionality, eh? :lol: I had to make one relatively minor change in the Code::Blocks source to get it to not crash at close when the plugin was loaded, but I'm pretty stumped with the freezing. I am not really too familiar with the internals, I just ran some quick searches looking for obvious places that would break under 64 bit.
But yeah, afaict things basically work. It looks like the -fPIC option to GCC is perfectly safe on x86, so you can add it permanently to the project compile options if you want. I'll submit the change I made to the core source as soon as I get back in Linux and remember what that change was :)
mandrav:
--- Quote ---It looks like the -fPIC option to GCC is perfectly safe on x86, so you can add it permanently to the project compile options if you want.
--- End quote ---
OK then :)
Yiannis.
Neutron:
Note that -fPIC should really only be used for compiling shared libraries and not executables. This option should probably be set by CodeBlocks when compiling shared library projects too. More information here: http://www.google.com/url?sa=U&start=2&q=http://gcc.fyxm.net/summit/2003/Porting%2520to%252064%2520bit.pdf&e=9707
I have compiled codeblocks-1.0-finalbeta on my AMD64 gentoo machine and can reproduce the code completion freeze. Disabling the code completion plugin, i was able to compile a hello world progrm using Code::Blocks. However, when i changed a compile option (enabled compiling debug information under project options), Code::Blocks seg faults when i click the compile button.
Here is beginning of the backtrace:
#0 0x00002aaaabdb4076 in regcomp () from /lib/libc.so.6
#1 0x00002aaaaf181704 in headers1 ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#2 0x00002aaaaf181945 in headers ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#3 0x00002aaaaf180a00 in depsScanForHeaders ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#4 0x00002aaaaf18a285 in DirectCommands::IsObjectOutdated ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#5 0x00002aaaaf18845a in DirectCommands::GetTargetCompileCommands ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#6 0x00002aaaaf18801e in DirectCommands::GetCompileCommands ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#7 0x00002aaaaf16f1c2 in CompilerGCC::Compile ()
from /home/joaander/test-codeblocks/codeblocks-1.0-finalbeta/src/output/share/CodeBlocks/plugins/libcompilergcc.so
#8 0x00002aaaaf170479 in CompilerGCC::OnCompile ()
mandrav:
I noticed it just this weekend. Here's what happens, in case anyone knows how to fix it.
The depslib contains a file regexp.c which defines regcomp(). When it crashes, the backtrace shows the crash in regcomp() inside libc6 (!). Somehow another regcomp is used instead of the included one.
A quick fix is to rename regcomp() to, say, myregcomp() in regexp.c, regexp.h and headers.c (under plugins/compilergcc/depslib/src). This stops the crash, but I don't understand why it's using a "foreign" regcomp() in the first place...
Unfortunately, with this fix, it stops working correctly with the dependencies (this is what it's all about).
I didn't have the chance to look into it more, but I plan to.
Yiannis.
Anonymous:
>> but I don't understand why it's using a "foreign" regcomp() in the first place...
well, it's part of libc, then "your regcomp" is less preferred than the one in libc.
usually you __don't __ use the same function name that is available in libc.
just my 2 cents
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version