diff --git a/doc/src/Build_basics.rst b/doc/src/Build_basics.rst index df99c8643d..6abfa9806a 100644 --- a/doc/src/Build_basics.rst +++ b/doc/src/Build_basics.rst @@ -270,17 +270,35 @@ Serial build with GNU gcc (see ``src/MAKE/Makefile.serial``): LINK = g++ LINKFLAGS = -g -O + .. note:: - If you build LAMMPS with any :doc:`accelerator packages ` - included, there may be specific optimization flags that are either - required or recommended to enable required features and to achieve - optimal performance. You need to include these in the CCFLAGS and - LINKFLAGS settings above. For details, see the individual package - doc pages listed on the :doc:`Speed packages ` doc - page. Or examine these files in the src/MAKE/OPTIONS directory. - They correspond to each of the 5 accelerator packages and their - hardware variants: + If compilation stops with a message like the following: + + .. code-block:: + + g++ -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I../STUBS -c ../main.cpp + In file included from ../pointers.h:24:0, + from ../input.h:17, + from ../main.cpp:16: + ../lmptype.h:34:2: error: #error LAMMPS requires a C++11 (or later) compliant compiler. Enable C++11 compatibility or upgrade the compiler. + + then you have either an unsupported (old) compiler or you have to + turn on C++11 mode. The latter applies to GCC 4.8.x shipped with + RHEL 7.x and CentOS 7.x. For those compilers, you need to add the + ``-std=c++11`` flag. Otherwise, you would have to install a newer + compiler that supports C++11; either as a binary package or through + compiling from source. + +If you build LAMMPS with any :doc:`accelerator packages +` included, there may be specific optimization flags +that are either required or recommended to enable required features and +to achieve optimal performance. You need to include these in the +CCFLAGS and LINKFLAGS settings above. For details, see the individual +package doc pages listed on the :doc:`Speed packages ` +doc page. Or examine these files in the src/MAKE/OPTIONS directory. +They correspond to each of the 5 accelerator packages and their hardware +variants: .. code-block:: bash diff --git a/doc/src/Build_make.rst b/doc/src/Build_make.rst index bc294175e0..af5e319121 100644 --- a/doc/src/Build_make.rst +++ b/doc/src/Build_make.rst @@ -20,7 +20,9 @@ with :doc:`CMake `. The makefiles of the traditional make based build process and the scripts they are calling expect a few additional tools to be available and functioning. - * a working C/C++ compiler toolchain; on Linux these are often the GNU compilers + * a working C/C++ compiler toolchain supporting the C++11 standard; on + Linux these are often the GNU compilers. Some older compilers + require adding flags like ``-std=c++11`` to enable the C++11 mode. * a Bourne shell compatible "Unix" shell program (often this is ``bash``) * a few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname`` * python (optional, required for ``make lib-`` in the src folder).