Several users had problems using 9.5-patch-01 on their MacOSX Lion (10.7.x) systems. The G4 installation would complete successfully with no errors or warnings, but they could not build any applications (e.g., examples/novice/*). The failure is due to G4SYSTEM being set to "Darwin-UNSUPPORTED", where the "UNSUPPORTED" tag itself is a consequence of the default Lion compiler being "clang" instead of "g++". In cmake/Modules/Geant4LibraryBuildOptions.cmake, the compiler string for G4SYSTEM is determined by: #------------------------------------------------------------------------------ # Determine the backward compatible compiler name # if(CMAKE_COMPILER_IS_GNUCXX) set(GEANT4_COMPILER "g++") elseif(MSVC) set(GEANT4_COMPILER "VC") elseif(CMAKE_CXX_COMPILER MATCHES "icpc.*") set(GEANT4_COMPILER "icc") else() set(GEANT4_COMPILER "UNSUPPORTED") endif() Notice that in 9.5-patch-01 (and also in the trunk of SVN), the "clang" string is not a valid option. I see that in SVN, the "icc" option has been modified. A further modification is needed, and ought to be tagged to include in 9.5-patch-02, to support "clang". As a temporary workaround, since g++ is available on Lion, I have instructed users to set the "CMAKE_COMPILER_IS_GNUCXX=ON" option.
This is in progress. You can also use the GNU compilers on 10.7 (On Xcode > 4.3, the command line tools are needed) by running CXX=g++ CC=gcc cmake <ARGS>
Changing summary to identify core issue clearly. Broaden platforms affect to all as Clang is cross-platform.
Preliminary fix committed in r60366. Tag 'cmake-V09-05-36' proposed for testing. Currently CMake > 2.8.1 is required as this has built in support for detecting Clang - Geant4's cmake system will need to backport this functionality for support of CMake 2.6.4-2.8.1, so I'm leaving this bug as ASSIGNED for now.
Marking as LATER - and postponing to after 9.6 Problem is resolved for CMake > 2.8.1, so will add note on this in installation guide
I am running OS X Mountain Lion (version 10.8). To jump over that issue type in your bash_profile export CXX=g++ //makes GNU the default compiler for C++ export CC=gcc //makes GNU the default compiler for C
Resolved by CMake > 2.8.1, and in now required CMake 3