problem in building lammps on macOS Catalina (10.15.3)

Dear lammps users,

I am trying to build lammps on macOS Catalina (10.15.3) using the attached makefile and getting the following errors:

src % make mpi

mpicxx -g -O3 -fopenmp -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I…/…/lib/smd/includelink -I…/…/lib/qmmm -DLMP_USER_OMP -DLMP_USER_INTEL -I…/…/lib/awpmd/ivutils/include -I…/…/lib/awpmd/systems/interact -DLMP_PYTHON -DLMP_MPIIO -DLMP_KOKKOS -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -DFFT_FFTW3 -I…/…/lib/includelink/eigen3 -I…/…/lib/molfile -iwithsysroot /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -iwithsysroot /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I./ -I…/…/lib/kokkos/core/src -I…/…/lib/kokkos/containers/src -I…/…/lib/kokkos/algorithms/src --std=c++11 -fopenmp=libomp -c …/angle.cpp

clang: error: unsupported argument ‘libomp’ to option ‘fopenmp=’

make[1]: *** [angle.o] Error 1

make: *** [mpi] Error 2

I have gone through the mailing list archive and followed the instructions given there ( If anyone has faced same problem, please help me to fix it. I was trying to install 22Feb,18 version.

Thanks and regards,

Makefile.mpi (3.1 KB)

please consider using a more recent version of LAMMPS and then consider using the cmake build system which is better at autodetecting your compiler and mpi library settings.
one of the packages that you have installed uses an incompatible flag, possibly because your LAMMPS version is much older than your OS version and it worked with the MacOS releases available at the time. thus don’t try to build a version with many packages installed right away, but start from compiling a version with no packages installed (it should still be able to run the melt example and the lj benchmark) and then install the packages you need. for cmake we offer some useful “presets” i.e. minimal and most. with cmake, same as with the conventional make, you can always go back to your compilation folder and add another package if you see that you need it and then recompile and continue. when you upgrade to a recent version of LAMMPS it can even tell you which package you have to install, if you are using a command that is not yet included, but available in one of the packages.