Compiling sci-physics/lammps-20230328 works in principle, but when one tries to run the program, this error is shown: gfaccin@piranha ~ $ lmp lmp: error while loading shared libraries: libmpi_cxx.so.20: cannot open shared object file: No such file or directory Thus, the binary produced with the -mpi flag (default) is expecting mpi libraries in the system. The system had openmpi installed before compilation took place. It looks that, by default, the mpich implementation is used when compiling lammps. Perhaps this could be connected to the problem? Temporary workaround: mask the mpich package in portage. Then, add the "mpi" use flag to the lammps package and involved libraries and recompile it using openmpi. Then, it will work. Looks like the ebuild configuration step is missing something. Reproducible: Always Steps to Reproduce: 1. emerge lammps on a fresh install without the mpi use flag enabled and having openmpi previously available on the system 2. 3. Actual Results: Compilation works, but the produced binary won't because expected libraries won't be installed. The system had previously openmpi installed. Expected Results: Produced binary does not work. Executed as expected.
We do set `-DBUILD_MPI=$(usex mpi)`, but perhaps this is not respected somewhere?