GCC v4 Problems


#1

I’m having some serious problems using GCC v4 on linux with JUCE v1.25. Everything compiles fine (after adding the Graphics predeclare valley mentioned in another thread), but every app I’ve tried (Twindy, jucedemo, and the wee example app in the projects directory) is broken in some way.

The jucedemo crashes immediately on startup, while Twindy and the example app both run, but the drawing’s messed up (as far as I can tell, the only drawing that actually takes place is simple fill commands). You can still click on the buttons in Twindy (and close the example app by clicking), but as soon as you click a button or a tab that does anything remotely complicated, it crashes.

  • Niall.

#2

I’ve seent the same thing, only in release builds. I think it’s some kind of compiler error that’s generating dodgy floating point code that crashes, but I’m not enough of a gcc expert to know how to go about fixing or working around it.


#3

[quote=“NiallM”]
The jucedemo crashes immediately on startup, while Twindy and the example app both run[/quote]

I have a half formed theory that this has something to do with video card drivers. I have two machines both installed from the same SuSE CD. One can compile JUCE apps successfully, the other can’t. With that machine, I get exactly the same problems that you describe.

The only difference between the two machines is that the working one is using generic X drivers, whereas the other has the nVidia driver installed.


#4

Ah, yeah, turning off optimisations fixes it. I guess I need to go through the various optimisation options and track down which one is breaking it if I want to find a simple workaround :(.

[quote=“valley”]I have a half formed theory that this has something to do with video card drivers. I have two machines both installed from the same SuSE CD. One can compile JUCE apps successfully, the other can’t. With that machine, I get exactly the same problems that you describe.

The only difference between the two machines is that the working one is using generic X drivers, whereas the other has the nVidia driver installed.[/quote]
That might make sense (I’m using the nvidia drivers here at uni - don’t have gcc v4 at home yet), but I just switched the driver back to the standard X one, and it didn’t seem to fix it. The nvidia drivers are a disgrace though - I ran valgrind on the software for my PhD project and discovered the nvidia-installed GL libraries leak memory all over the place. I’m also stuck with an old version of the drivers (6629, I think) because every version since then has caused the entire system to lock up on starting the X server. If only I didn’t need the 3d acceleration, I’d ditch them in a second.

  • Niall.

#5