I am trying to build LAMMPS through CMake, but encountered error as below:
~/Documents/lammps-29Sep2021/build$ cmake -C …/cmake/presets/basic.cmake
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
loading initial cache file …/cmake/presets/basic.cmake
CMake Error at CMakeLists.txt:62 (include) :
include could not find requested file:
LAMMPSUtils
That is because you are not using the correct command line. Please have another look at the instructions in the LAMMPS manual and/or the CMake documentation.
I encountered the following issue while compiling LAMMPS using the CMake method provided on the official website. I’m unsure how to resolve it. Seeking assistance, thank you.
In file included from /home/tongmj/software/lammps20240228/lammps-7Feb2024/src/pointers.h:33:0,
from …/lammps-7Feb2024/src/angle.h:17,
from …/lammps-7Feb2024/src/angle.cpp:14:
…/lammps-7Feb2024/src/fmt/format.h:1082:29: error: ‘std::runtime_error::runtime_error’ names constructor
…/lammps-7Feb2024/src/fmt/format.h: In function ‘OutputIt fmt::v10_lmp::detail::write_bytes(OutputIt, fmt::v10_lmp::string_view, const fmt::v10_lmp::format_specs&)’:
…/lammps-7Feb2024/src/fmt/format.h:1824:39: error: no default argument for ‘Char’
…/lammps-7Feb2024/src/fmt/format.h:1824:39: error: no default argument for ‘OutputIt’
…/lammps-7Feb2024/src/fmt/format.h: At global scope:
…/lammps-7Feb2024/src/fmt/format.h:2488:25: error: bit-field ‘format’ with non-integral type
…/lammps-7Feb2024/src/fmt/format.h: In function ‘fmt::v10_lmp::detail::float_specs fmt::v10_lmp::detail::parse_float_type_spec(const fmt::v10_lmp::format_specs&)’:
…/lammps-7Feb2024/src/fmt/format.h:2504:12: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:2510:12: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:2516:12: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:2523:12: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:2530:12: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h: In lambda function:
…/lammps-7Feb2024/src/fmt/format.h:2680:16: error: ‘const struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:2681:16: error: ‘const struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h: In function ‘OutputIt fmt::v10_lmp::detail::do_write_float(OutputIt, const DecimalFP&, const fmt::v10_lmp::format_specs&, fmt::v10_lmp::detail::float_specs, fmt::v10_lmp::detail::locale_ref)’:
…/lammps-7Feb2024/src/fmt/format.h:2724:36: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h: In function ‘void fmt::v10_lmp::detail::adjust_precision(int&, int)’:
…/lammps-7Feb2024/src/fmt/format.h:2839:5: error: no matching function for call to ‘fmt::v10_lmp::format_error::format_error(const char [18])’
…/lammps-7Feb2024/src/fmt/format.h:2839:5: note: candidate is:
…/lammps-7Feb2024/src/fmt/format.h:1080:36: note: fmt::v10_lmp::format_error::format_error(const fmt::v10_lmp::format_error&)
…/lammps-7Feb2024/src/fmt/format.h:1080:36: note: no known conversion for argument 1 from ‘const char [18]’ to ‘const fmt::v10_lmp::format_error&’
…/lammps-7Feb2024/src/fmt/format.h: In function ‘int fmt::v10_lmp::detail::format_float(Float, int, fmt::v10_lmp::detail::float_specs, fmt::v10_lmp::detail::buffer&)’:
…/lammps-7Feb2024/src/fmt/format.h:3347:28: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h: In function ‘OutputIt fmt::v10_lmp::detail::write_float(OutputIt, T, fmt::v10_lmp::format_specs, fmt::v10_lmp::detail::locale_ref)’:
…/lammps-7Feb2024/src/fmt/format.h:3673:14: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:3682:14: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
…/lammps-7Feb2024/src/fmt/format.h:3687:21: error: ‘struct fmt::v10_lmp::detail::float_specs’ has no member named ‘format’
In file included from …/lammps-7Feb2024/src/angle.cpp:18:0:
…/lammps-7Feb2024/src/error.h: At global scope:
…/lammps-7Feb2024/src/error.h:26:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/error.h:27:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/error.h:30:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/error.h:37:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/error.h:57:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/error.h:75:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/error.h:76:3: error: expected unqualified-id before ‘[’ token
…/lammps-7Feb2024/src/angle.cpp:58:15: error: declaration of ‘virtual LAMMPS_NS::Angle::~Angle() noexcept (false)’ has a different exception specifier
In file included from …/lammps-7Feb2024/src/angle.cpp:14:0:
…/lammps-7Feb2024/src/angle.h:50:3: error: from previous declaration ‘virtual LAMMPS_NS::Angle::~Angle() noexcept (true)’
In file included from …/lammps-7Feb2024/src/angle.cpp:18:0:
…/lammps-7Feb2024/src/error.h: In instantiation of ‘void LAMMPS_NS::Error::all(const string&, int, const string&, Args&& …) [with Args = {}; std::string = std::basic_string]’:
…/lammps-7Feb2024/src/angle.cpp:73:84: required from here
…/lammps-7Feb2024/src/error.h:34:5: error: ‘_all’ was not declared in this scope
…/lammps-7Feb2024/src/error.h: In instantiation of ‘void LAMMPS_NS::Error::all(const string&, int, const string&, Args&& …) [with Args = {char*&, char*&}; std::string = std::basic_string]’:
…/lammps-7Feb2024/src/angle.cpp:87:89: required from here
…/lammps-7Feb2024/src/error.h:34:5: error: ‘_all’ was not declared in this scope
make[2]: *** [CMakeFiles/lammps.dir/build.make:63: CMakeFiles/lammps.dir/…/lammps-7Feb2024/src/angle.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1029: CMakeFiles/lammps.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
There is no enough information here to reproduce the error you are seeing and without the ability to reproduce it, there is no chance to give meaningful assistance.
Please provide:
the platform information (CPU, OS version etc.)
the information of which compiler and which version was used
the exact command line and output(!) from your CMake command
Dear Professor Kohlmeyer
After following your advice, my QUIP package has been successfully installed. However, when running the in.gap file, I encountered the error code ‘SYSTEM ABORT: IPModel_GAP_Initialise_str: must be compiled with HAVE_GAP.’ What should I do next to resolve this issue? Thank you for your guidance."