LammpsInterface.cpp:1540: undefined reference to `typeinfo for LAMMPS_NS::PairEAM'

Dear all,

In building LAMMPS with user-atc as following I get the below error, would you please let me know where the error is originated from? and how to get rid of it?

…/lib/linalg> make -f Makefile.mpi

…/src/> make lib-atc args="-m mpi -e linalg"

…/src/> make yes-user-atc

…/src/> make -j 8 mpi

most likely you have inconsistent compiler flags or inconsistent compilers, i.e. different versions or different vendors.

if you see “-fno-rtti” somewhere in a makefile. delete it.


Dear Axel,

Thanks for your response.
I use the Makefile.mpi in the src/MAKE directory, but No “-fno-rtti” I can see there.

I have already made (make mpi) lammps with other package I have already installed with no problem, but make mpi after considering USER-ATC leads to the mentioned error.



after some digging around, the solution to this is simple and bit unexpected. There is an interface to EAM potentials in the ATC library, which in turn requires that the MANYBODY package must be installed, if you want to use the USER-ATC package. I’ve submitted a pull-request that modifies the installation of the USER-ATC package in such a way, that you can only install it, if the MANYBODY package is already installed. Otherwise it refuses and prints a suitable message. i supposed it went undetected for a long time, since most people install the MANYBODY package (it is available by default when you download a tarball) and few people compile/install the USER-ATC package.