Chapter 1.  Getting Started

Geant4 uses CMake to configure a build system for compiling and installing the toolkit headers, libraries and support tools. This document covers the basics of using CMake to build and install Geant4 together with an overview of the most commonly used advanced features. We also provide a basic overview of how to build an application that uses Geant4. For more information on CMake itself, the CMake Help and Documentation should be consulted.

1.1.  Supported and Tested Platforms

Geant4 is officially supported on the following operating system and compiler combinations:

  • Scientific Linux CERN 6 with gcc >=4.8.2, >=4.9.X, >=5.2.X 64bit

    Linux CentOS 7 with gcc 4.8.4 (system compiler), 64bit.

    The required versions of GCC may be installed on SLC6 systems via the free Developer Toolset (GCC 4.8), or Software Collections 1.2 (GCC 4.9).

    Geant4 has also been successfully compiled on other Linux distributions, including Debian, Ubuntu and openSUSE. The main requirement is that the system has a GCC of sufficient version to support C++11 installed. Please note that distributions other than SLC are not officially supported. However, we welcome feedback and patches for non-SLC platforms!

  • Mac OS X 10.10 (Yosemite) with Apple-LLVM (Xcode) 7.0, 64bit.

    Geant4 has also been successfully compiled on Mac OS X 10.9 (Mavericks) with Apple-LLVM 6.0, but this version of Mac OS X is not officially supported. Please note that Mac OS X 10.11 (El Capitan) is not officially supported or tested in the initial 10.2 release. Geant4 has been successfully installed and applications built and run against it on El Capitan, and official testing and support is expected in subsequent patches.

  • Windows 7 with Visual Studio 2013 or 2015, 64bit.

    Multithreading of Geant4 is currently not supported on the Windows platform.

The Geant4 toolkit and applications can also be compiled for Intel Xeon Phi systems using the Intel C/C++ Compiler >=16.X. and Intel Manycore Platform Support Stack 3.4. Note that due to a bug in the MPSS GCC compatibility layer, only version 3.4 of MPSS can be used at the time of release. Though we cannot offer full support for the Xeon Phi architecture, a guide discussing our current experience with the platform is available separately.

The following platforms and compilers are also tested, but not officially supported:

  • Scientific Linux CERN 6 with Intel C/C++ Compiler >=15.X. Note that the Intel Compiler must be set up to use C++ headers and standard library supplied by GNU GCC 4.9 only to provide the required compatibility with the C++11 Standard.

  • Ubuntu Linux 14 with gcc 4.8.4 (system compiler).
  • Mac OS X 10.9 (Mavericks) Apple-LLVM (Xcode) 6.0.

We welcome user feedback and/or bug reports via our HyperNews Forum and Bugzilla.