Author Topic: Crash Compiling Code::Blocks in Linux  (Read 5671 times)

Ryu

  • Guest
Crash Compiling Code::Blocks in Linux
« on: May 22, 2006, 10:21:28 pm »
Hey, everybody.

From a revisions to here i have very much problems for compiling a new version.
The last in the current revision 2484 is the most extrange.

When the project is compiling the cbthreadpool.cpp he give a
internal compiler error ???!!(segmentation fault) maybe this is rigth and i
must send the bug to the compiler manteiners.
but how is the first time in all the programs that i compiled and is happend
to this version where you add this file i think i must tell you first.
so please tell me if this happend to other person for verify and change my compiler
version or give me a fix if you can.

thank you  :D

PD: I have gcc(g++) version 3.3.6 ; slackware 10.2 ; wxWidgets 2.6.2.

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Crash Compiling Code::Blocks in Linux
« Reply #1 on: May 22, 2006, 10:29:11 pm »
cbthreadpool.cpp has been there for quite a while now, even though I replaced it a few days ago, but that's no reason to produce an ICE (Internal Compiler Error).

I see your g++ version is a bit old. I'm pretty sure if you send a bug report it'll be marked as duplicated (which means it's already known).

Please try again with a newer version of gcc/g++ like 3.4.5 or 4.0.3. It should work just fine with any of those.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Crash Compiling Code::Blocks in Linux
« Reply #2 on: May 22, 2006, 11:54:21 pm »
It crashes on Mac OS X 10.3 too, using GCC 3.3...
(it is not possible to upgrade the compiler there)

I got around it by using -O0 for this file (only),
as it won't compile (segfaults) with the usual -O2.

tplas

  • Guest
Re: Crash Compiling Code::Blocks in Linux
« Reply #3 on: May 30, 2006, 09:43:21 pm »
It crashes on Mac OS X 10.3 too, using GCC 3.3...
(it is not possible to upgrade the compiler there)

I got around it by using -O0 for this file (only),
as it won't compile (segfaults) with the usual -O2.


With the actual version from SVN the -O0 workaround does not work for my Mac (10.3.9, GCC 3.3).
But I found an other solution: remove -ffast-math switch and replace -O2 by -O0 in CXXFLAGS.

Code
$ man g++
...
       -ffast-math
...
           This option should never be turned on by any -O option since it can
           result in incorrect output for programs which depend on an exact
           implementation of IEEE or ISO rules/specifications for math func-
           tions.
Standard CXXFLAGS: -O2 -ffast-math
Maybe thats the reason for internal compiler error...

tplas
« Last Edit: June 15, 2006, 08:46:38 pm by tplas »

Offline Evil Azrael

  • Single posting newcomer
  • *
  • Posts: 5
Re: Crash Compiling Code::Blocks in Linux
« Reply #4 on: June 11, 2006, 02:05:22 pm »
I am using Slackware 10.2 and can confirm the problem. The removal of -ffast-math and -O2 does not work for me :(

Offline oz

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: Crash Compiling Code::Blocks in Linux
« Reply #5 on: June 11, 2006, 02:12:13 pm »
it works well for me on GCC 4.1.1

Offline Howard

  • Single posting newcomer
  • *
  • Posts: 8
Re: Crash Compiling Code::Blocks in Linux
« Reply #6 on: June 13, 2006, 07:58:03 pm »
Code
g++ -Wall -g `wx-config --cflags` -fmessage-length=0 -fexceptions -Winvalid-pch -fPIC -DcbDEBUG -DCB_PRECOMP -D__WXMAC__ -O0  -Isdk/wxscintilla/include -Isdk -Isdk/as/source -Isdk/as/include -Isdk/propgrid/include -Isdk/wxFlatNotebook -I/usr/include -Isdk -c sdk/cbthreadpool.cpp -o .objs/sdk/cbthreadpool.o
[address=45e500f4 pc=000e6b3c]
sdk/cbthreadpool.cpp: In member function `bool cbThreadPool::WaitingThread()':
sdk/cbthreadpool.cpp:151: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
Process terminated with status 1 (1 minutes, 25 seconds)
1 errors, 0 warnings
 

I cant get past this error. Even with -O0,

Here is the line from the .cbp. How do you put -O0 or turn off -ffast-math in it?
I can't find any -o2 or -ffast-math in the .cbp.

Code
		<Unit filename="sdk/cbthreadpool.cpp">
<Option compilerVar="CPP" />
<Option target="sdk" />


Edit: Is there a way to get back the older threadpool.cpp?
« Last Edit: June 13, 2006, 09:45:58 pm by Howard »

Offline polygon7

  • Multiple posting newcomer
  • *
  • Posts: 104
    • Home site
Re: Crash Compiling Code::Blocks in Linux
« Reply #7 on: June 15, 2006, 09:42:19 am »
@Howard:
...
But I found an other solution: remove -ffast-math switch and replace -O2 by -O0 in src/sdk/Makefile CXXFLAGS.

You want to change CXXFLAGS for C::B?
Try this when you compiling C::B:
Quote
./configure CXXFLAGS="-O0 -fno-fast-math"
best regards,
p7
 Free open source UML modeling tool: ArgoUML

tplas

  • Guest
Re: Crash Compiling Code::Blocks in Linux
« Reply #8 on: June 15, 2006, 08:44:29 pm »
You want to change CXXFLAGS for C::B?
No! if he wants just to compile it that was an option to make it. Of course you should never checkin this changes! But your configure option is better. I will delete the message above, just for security reason.