This is what I get:
~/lammps-4May2022$ make -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
~/lammps-4May2022$ cmake --version
cmake version 3.25.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
This when try to use make serial in the scr folder (I am going to put the full output):
~/lammps-4May2022/src$ make serial
make[1]: Entering directory ‘/home/XX/lammps-4May2022/src/STUBS’
g++ -O -fPIC -I. -c mpi.cpp
ar rs libmpi_stubs.a mpi.o
ar: creating libmpi_stubs.a
make[1]: Leaving directory ‘/home/XX/lammps-4May2022/src/STUBS’
Gathering installed package information (may take a little while)
make[1]: Entering directory ‘/home/XX/lammps-4May2022/src’
Gathering git version information
make[1]: Leaving directory ‘/home/XX/lammps-4May2022/src’
Compiling LAMMPS for machine serial
make[1]: Entering directory ‘/home/XX/lammps-4May2022/src/Obj_serial’
cc -O -o fastdep.exe …/DEPEND/fastdep.c
Segmentation fault
make[1]: *** [Makefile:119: depend] Error 1
make[1]: Leaving directory ‘/home/XX/lammps-4May2022/src/Obj_serial’
make[1]: Entering directory ‘/home/XX/lammps-4May2022/src/Obj_serial’
g++ -g -O3 -std=c++11 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I…/STUBS -c …/main.cpp
In file included from /home/XX/.guix-profile//include/c++/bits/move.h:57,
from /home/XX/.guix-profile//include/c++/bits/stl_pair.h:59,
from /home/XX/.guix-profile//include/c++/bits/stl_algobase.h:64,
from /home/XX/.guix-profile//include/c++/bits/char_traits.h:39,
from /home/XX/.guix-profile//include/c++/string:40,
from …/pointers.h:30,
from …/atom.h:17,
from …/accelerator_kokkos.h:38,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/type_traits:1017:25: error: there are no arguments to ‘__is_nothrow_constructible’ that depend on a template parameter, so a declaration of ‘__is_nothrow_constructible’ must be available [-fpermissive]
1017 | = __bool_constant<__is_nothrow_constructible(_Tp, _Args…)>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/type_traits:1017:25: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/XX/.guix-profile//include/c++/type_traits:1017:66: error: template argument 1 is invalid
1017 | = __bool_constant<__is_nothrow_constructible(_Tp, _Args…)>;
| ^
/home/XX/.guix-profile//include/c++/type_traits:1023:45: error: expected template-name before ‘<’ token
1023 | : public __is_nothrow_constructible_impl<_Tp, _Args…>::type
| ^
/home/XX/.guix-profile//include/c++/type_traits:1023:45: error: expected ‘{’ before ‘<’ token
/home/XX/.guix-profile//include/c++/type_traits:1032:30: error: there are no arguments to ‘__is_nothrow_constructible’ that depend on a template parameter, so a declaration of ‘__is_nothrow_constructible’ must be available [-fpermissive]
1032 | : public __bool_constant<__is_nothrow_constructible(_Tp)>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/type_traits:1032:61: error: template argument 1 is invalid
1032 | : public __bool_constant<__is_nothrow_constructible(_Tp)>
| ^
/home/XX/.guix-profile//include/c++/type_traits:1048:45: error: expected template-name before ‘<’ token
1048 | : public __is_nothrow_constructible_impl<_Tp, const _Tp&>
| ^
/home/XX/.guix-profile//include/c++/type_traits:1048:45: error: expected ‘{’ before ‘<’ token
/home/XX/.guix-profile//include/c++/type_traits:1071:45: error: expected template-name before ‘<’ token
1071 | : public __is_nothrow_constructible_impl<_Tp, _Tp&&>
| ^
/home/XX/.guix-profile//include/c++/type_traits:1071:45: error: expected ‘{’ before ‘<’ token
/home/XX/.guix-profile//include/c++/type_traits:1137:25: error: there are no arguments to ‘__is_nothrow_assignable’ that depend on a template parameter, so a declaration of ‘__is_nothrow_assignable’ must be available [-fpermissive]
1137 | = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/type_traits:1137:58: error: template argument 1 is invalid
1137 | = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
| ^
/home/XX/.guix-profile//include/c++/type_traits:1142:42: error: expected template-name before ‘<’ token
1142 | : public __is_nothrow_assignable_impl<_Tp, _Up>
| ^
/home/XX/.guix-profile//include/c++/type_traits:1142:42: error: expected ‘{’ before ‘<’ token
/home/XX/.guix-profile//include/c++/type_traits:1157:42: error: expected template-name before ‘<’ token
1157 | : public __is_nothrow_assignable_impl<_Tp&, const _Tp&>
| ^
/home/XX/.guix-profile//include/c++/type_traits:1157:42: error: expected ‘{’ before ‘<’ token
/home/XX/.guix-profile//include/c++/type_traits:1178:42: error: expected template-name before ‘<’ token
1178 | : public __is_nothrow_assignable_impl<_Tp&, _Tp&&>
| ^
/home/XX/.guix-profile//include/c++/type_traits:1178:42: error: expected ‘{’ before ‘<’ token
In file included from /home/XX/.guix-profile//include/c++/string:41,
from …/pointers.h:30,
from …/atom.h:17,
from …/accelerator_kokkos.h:38,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/bits/allocator.h:94:13: error: expected nested-name-specifier before ‘is_always_equal’
94 | using is_always_equal
| ^~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/bits/allocator.h:148:13: error: expected nested-name-specifier before ‘is_always_equal’
148 | using is_always_equal
| ^~~~~~~~~~~~~~~
In file included from /home/XX/.guix-profile//include/c++/bits/stl_function.h:1421,
from /home/XX/.guix-profile//include/c++/string:48,
from …/pointers.h:30,
from …/atom.h:17,
from …/accelerator_kokkos.h:38,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/backward/binders.h:130:6: error: expected ‘;’ before ‘_GLIBCXX11_DEPRECATED_SUGGEST’
130 | } _GLIBCXX11_DEPRECATED_SUGGEST(“std::bind”);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
/home/XX/.guix-profile//include/c++/backward/binders.h:165:6: error: expected ‘;’ before ‘_GLIBCXX11_DEPRECATED_SUGGEST’
165 | } _GLIBCXX11_DEPRECATED_SUGGEST(“std::bind”);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
In file included from /home/XX/.guix-profile//include/c++/ext/concurrence.h:34,
from /home/XX/.guix-profile//include/c++/bits/shared_ptr_base.h:62,
from /home/XX/.guix-profile//include/c++/bits/shared_ptr.h:53,
from /home/XX/.guix-profile//include/c++/memory:77,
from …/fmt/format.h:39,
from …/pointers.h:32,
from …/atom.h:17,
from …/accelerator_kokkos.h:38,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/exception:108:32: error: expected constructor, destructor, or type conversion before ‘(’ token
108 | _GLIBCXX17_DEPRECATED_SUGGEST(“std::uncaught_exceptions()”)
| ^
In file included from /home/XX/.guix-profile//include/c++/memory:82,
from …/fmt/format.h:39,
from …/pointers.h:32,
from …/atom.h:17,
from …/accelerator_kokkos.h:38,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/backward/auto_ptr.h:54:6: error: expected ‘;’ before ‘_GLIBCXX11_DEPRECATED’
54 | } _GLIBCXX11_DEPRECATED;
| ^~~~~~~~~~~~~~~~~~~~~~
| ;
/home/XX/.guix-profile//include/c++/backward/auto_ptr.h:287:6: error: expected ‘;’ before ‘_GLIBCXX11_DEPRECATED_SUGGEST’
287 | } _GLIBCXX11_DEPRECATED_SUGGEST(“std::unique_ptr”);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
In file included from /home/XX/.guix-profile//include/c++/bits/move.h:57,
from /home/XX/.guix-profile//include/c++/bits/stl_pair.h:59,
from /home/XX/.guix-profile//include/c++/bits/stl_algobase.h:64,
from /home/XX/.guix-profile//include/c++/bits/char_traits.h:39,
from /home/XX/.guix-profile//include/c++/string:40,
from …/pointers.h:30,
from …/atom.h:17,
from …/accelerator_kokkos.h:38,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/type_traits: In instantiation of ‘struct std::is_nothrow_move_constructible’:
/home/XX/.guix-profile//include/c++/type_traits:152:12: required from ‘struct std::_and<std::is_nothrow_move_constructible, std::is_nothrow_move_assignable >’
/home/XX/.guix-profile//include/c++/type_traits:2684:48: required from ‘std::_Require<std::_not<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = unsigned char; std::_Require<std::_not<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]’
…/fmt/format.h:322:37: required from here
/home/XX/.guix-profile//include/c++/type_traits:1077:12: error: invalid use of incomplete type ‘struct std::__is_nothrow_move_constructible_impl<unsigned char, true>’
1077 | struct is_nothrow_move_constructible
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/type_traits:1063:12: note: declaration of ‘struct std::__is_nothrow_move_constructible_impl<unsigned char, true>’
1063 | struct __is_nothrow_move_constructible_impl;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/type_traits: In instantiation of ‘struct std::_and<std::is_nothrow_move_constructible, std::is_nothrow_move_assignable >’:
/home/XX/.guix-profile//include/c++/type_traits:2684:48: required from ‘std::_Require<std::_not<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = unsigned char; std::_Require<std::_not<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]’
…/fmt/format.h:322:37: required from here
/home/XX/.guix-profile//include/c++/type_traits:152:12: error: ‘value’ is not a member of ‘std::is_nothrow_move_constructible’
152 | struct _and<_B1, _B2>
| ^~~~~~~~~~~~~~~~
/home/XX/.guix-profile//include/c++/type_traits: In instantiation of ‘std::_Require<std::_not<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = unsigned char; std::_Require<std::_not<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]’:
…/fmt/format.h:322:37: required from here
/home/XX/.guix-profile//include/c++/type_traits:2684:48: error: ‘value’ is not a member of ‘std::_and<std::is_nothrow_move_constructible, std::is_nothrow_move_assignable >’
2684 | is_nothrow_move_assignable<_Tp>>::value);
| ^~~~~
In file included from /home/XX/.guix-profile//include/c++/unordered_set:46,
from …/domain.h:21,
from …/accelerator_kokkos.h:41,
from …/main.cpp:16:
/home/XX/.guix-profile//include/c++/bits/hashtable.h: In instantiation of ‘class std::_Hashtable<LAMMPS_NS::Region*, LAMMPS_NS::Region*, std::allocator<LAMMPS_NS::Region*>, std::__detail::_Identity, std::equal_to<LAMMPS_NS::Region*>, std::hash<LAMMPS_NS::Region*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, true, true> >’:
/home/XX/.guix-profile//include/c++/bits/unordered_set.h:100:18: required from ‘class std::unordered_set<LAMMPS_NS::Region*>’
…/domain.h:176:32: required from here
/home/XX/.guix-profile//include/c++/bits/hashtable.h:340:67: error: ‘value’ is not a member of ‘std::is_nothrow_default_constructiblestd::__detail::_Mod_range_hashing’
340 | static_assert(is_nothrow_default_constructible<_RangeHash>::value,
| ^~~~~
/home/XX/.guix-profile//include/c++/bits/hashtable.h:349:68: error: ‘value’ is not a member of ‘std::is_nothrow_default_constructiblestd::__detail::_Identity’
349 | static_assert(is_nothrow_default_constructible<_ExtractKey>::value,
| ^~~~~
make[1]: *** [Makefile:114: main.o] Error 1
make[1]: Leaving directory ‘/home/XX/lammps-4May2022/src/Obj_serial’
make: *** [Makefile:392: serial] Error 2
Thank you for answering