explain error message when using a non-c++11 compliant compiler.
This commit is contained in:
@ -270,17 +270,35 @@ Serial build with GNU gcc (see ``src/MAKE/Makefile.serial``):
|
|||||||
LINK = g++
|
LINK = g++
|
||||||
LINKFLAGS = -g -O
|
LINKFLAGS = -g -O
|
||||||
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you build LAMMPS with any :doc:`accelerator packages <Speed_packages>`
|
If compilation stops with a message like the following:
|
||||||
included, there may be specific optimization flags that are either
|
|
||||||
required or recommended to enable required features and to achieve
|
.. code-block::
|
||||||
optimal performance. You need to include these in the CCFLAGS and
|
|
||||||
LINKFLAGS settings above. For details, see the individual package
|
g++ -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I../STUBS -c ../main.cpp
|
||||||
doc pages listed on the :doc:`Speed packages <Speed_packages>` doc
|
In file included from ../pointers.h:24:0,
|
||||||
page. Or examine these files in the src/MAKE/OPTIONS directory.
|
from ../input.h:17,
|
||||||
They correspond to each of the 5 accelerator packages and their
|
from ../main.cpp:16:
|
||||||
hardware variants:
|
../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
|
||||||
|
<Speed_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 <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
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,9 @@ with :doc:`CMake <Build_cmake>`. The makefiles of the traditional
|
|||||||
make based build process and the scripts they are calling expect a few
|
make based build process and the scripts they are calling expect a few
|
||||||
additional tools to be available and functioning.
|
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 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``
|
* a few shell utilities: ``ls``, ``mv``, ``ln``, ``rm``, ``grep``, ``sed``, ``tr``, ``cat``, ``touch``, ``diff``, ``dirname``
|
||||||
* python (optional, required for ``make lib-<pkg>`` in the src folder).
|
* python (optional, required for ``make lib-<pkg>`` in the src folder).
|
||||||
|
|||||||
Reference in New Issue
Block a user