When building the latest stable release (Update 3 for Stable release 29 September 2021) with the latest Intel compilers on a machine with the latest GCC, the build fails at this point:
[ 59%] Building CXX object CMakeFiles/lammps.dir/home/user1/Applications/PKG_LMP/src/lammps/src/math_eigen.cpp.o
In file included from /usr/include/c++/12.1.0/random(49),
from /home/user1/Applications/PKG_LMP/src/lammps/src/math_eigen_impl.h(50),
from /home/user1/Applications/PKG_LMP/src/lammps/src/math_eigen.cpp(20):
/usr/include/c++/12.1.0/bits/random.h(104): error: expected a declaration
{ __extension__ using type = unsigned __int128; };
^