Problem 1070

Summary: Dependency generation on SUN Solaris
Product: Geant4 Reporter: Florian Uhlig <f.uhlig>
Component: configAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED INVALID    
Severity: enhancement    
Priority: P5    
Version: other   
Hardware: Sun   
OS: Solaris   

Description Florian Uhlig 2009-06-10 12:34:23 CEST
Hi

The build process on Sun Solaris uses the CC compiler, but the dependency generation uses g++. This results in a situation where the dependencies are not generated if only the CC compiler is installed. The project is build correctly.
The remarks below are only sugestions, If i am the only one using this setup i can live with patching the files on my own.

To use the CC for dependency generation one has to do some changes in config/common.gmk .

First one has to change g++ to CC in the following line

        g++ $(GPPFLAGS) $(CPPFLAGS) -w $< |\
 
The second change is in the definition of GPPFLAGS which is -xM1 for the CC
compiler instaed of -M for g++. With -xM1 one excludes the system directories.

A clean way would be to use a system specific compiler definition from config/sys/<architecture>.gmk and move also the GPPFLAGS definition to a system specific definition in config/sys/<architecture>.gmk .

Ciao

Florian
Comment 1 Gabriele Cosmo 2009-06-10 15:23:37 CEST
The presence of GNU/g++ and make is mandatory for any platform used to build Geant4 (see also section 1.2 of the Installation Manual). g++ is used for the generation of dependencies at the unique standard which is required (native compilers often follow different techniques for the generation of dependencies making impossible to treat them in a uniform way).
SUN/Solaris must also be noticed is no longer part of the list of supported platforms for Geant4; any update to the specific configuration (i.e. affecting .gmk scripts inside config/sys) for systems no longer under support can only be accepted as user's contributions but no guarantees can be given for their correctness.