Making lammps (cygwin error)

Hello everyone,

I’m trying to compile the lammps as a shared library in cygwin (I use windows 7 64 bits). I have installed cygwin with FFTW3 and MPI and when I type ‘make mode=shlib cygwin’ in the src directory, after some time I get:

/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/…/…/…/…/x86_64-pc-cygwin/bin/ld: cannot find -lmpich
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/…/…/…/…/x86_64-pc-cygwin/bin/ld: cannot find -lfftw
/usr/lib/gcc/x86_64-pc-cygwin/7.3.0/…/…/…/…/x86_64-pc-cygwin/bin/ld: cannot find -levent

Searching in the mail list I found that this is a linker problem, but I’m not being able to solve this. I’ve already went to the STUBS directory and typed make. I have the following lines in the makefile.cygwin:

MPI_PATH = -L/cygdrive/c/cygwin/mpich2-1.0.4p1/lib

FFT_PATH = -L/cygdrive/c/cygwin/usr/local/lib

I could not find these paths in the cygwin64 directory and I don’t know what paths I should give, and I also don’t know what is this levent. I’ve read in the documentation that the FFTW and MPI libraries should have been built as shared libraries for building lammps as shared library. I don’t know how this apply for cygwin.

I would appreciate any help!

a) make sure you are using the latest version of LAMMPS
b) make sure you can compile and run simple MPI test programs correctly before attempting to compile LAMMPS
c) make sure you can compile a standalone serial LAMMPS executable with no packages installed correctly with “make serial”
d) then try installing the packages you need and update the serial executable accordingly with “make serial”
e) then try compiling a standalone executable with MPI included using the generic MPI makefile via “make mpi”
f) only if all of the above steps work correctly, i would attempt to build a shared library. please note, that shared libraries on windows are a bit quirky and i have no experience what special steps may be needed to compile them using cygwin. i’ve only build executables for windows and am doing with on linux with a cross compiler. so there is not much more information i have beyond the rather generic steps listed above.

axel.