An error occurred during the compilation of LAMMPS:ld returned 1 exit status

Hi,

I installed openmpi 4.0.7—fftw 3.3.10—module load openmpi—make mpi (version 22Jul2025), but failed to compile successfully. The error message is as follows. Could you please help me figure out the reason? Thank you very much.
############################
/usr/bin/ld: ./liblammps_mpi.a: error adding symbols: malformed archive
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:105: …/lmp_mpi] Error 1
make[1]: Leaving directory ‘/nas/longleaf/home/minzhi/lammps/lammps-22Jul2025/src/Obj_mpi’
make: *** [Makefile:400: mpi] Error 2
##############################
Thank you very much!

Best grads
Shuting Wang

This has to have a local reason so to give specific advice, one would have to have physical access to your compilation folder and inspect the files and file system. From remote one can only guess.

Two guesses for possible reasons are:

  1. a previous attempt to create the archive file was interrupted and a damaged file was left behind. In that case, deleting the file and compiling again should be sufficient
  2. you have exhausted your disk storage or storage quota and thus writes to the archive fail. In that case you may need to delete files to ensure you have sufficient space available and then also follow the advice from point 1.

Thank you so much for your reply. It was indeed insufficient disk space that caused the installation to fail. I have now successfully installed it. Thank you very much!