Using the file ExN04PhysicsList.cc fromnovice/N04 example, I was suprised to get a `broken pipe' error at compilation time. I found it happened when the memory used was already 168Mb ! Too much for my poor 128Mb computer ! This was due to the non-usage of the G4DEBUG flag. Looking at the `architecture.gmk' config file I found that not asking for the G4DEBUG means asking for the G4OPTIMISE flag instead ! On Linux it means -O compilation option which is too good probably. Would it be possible to disantangle G4DEBUG and G4OPTIMISE ?
For the supported compiler egcs 1.1.2 on Linux, the actual compilation of ExN04PhysicsList.cc is forced to be non-optimised (see N04/GNUmakefile). You're probably not using the supported compiler. Try re-adapting that GNUmakefile in examples/novice/N04 for your system configuration. The reason why G4DEBUG and G4OPTIMISE are not disantagled is merely for porting purposes and maintenance issues, since on some compilers in the past we noticed misbehaviors when not specifying any optimisation level. We're anyhow going to review this issue and hopefully introduce this extra setup level in future releases. Thanks for reporting this.
Added G4NO_OPTIMISE flag to setup. If set (and G4DEBUG is not set), compilation will be performed with no optimisation levels. Will be available at the next public patch.