Dear Alex:
i get a problem while i am trying to build lammps as a shared lib.
Here is the problem
[100%] Linking CXX executable lmp liblammps.so.0: undefined reference to
PyString_FromString' liblammps.so.0: undefined reference to
PyCObject_FromVoidPtr’ liblammps.so.0: undefined reference toPyInt_AsLong' liblammps.so.0: undefined reference to
PyString_AsString’ liblammps.so.0: undefined reference to `PyInt_FromLong’ collect2: error: ld returned 1 exit status CMakeFiles/lmp.dir/build.make:101: recipe for target ‘lmp’ failed make[2]: *** [lmp] Error 1 CMakeFiles/Makefile2:168: recipe for target ‘CMakeFiles/lmp.dir/all’ failed make[1]: *** [CMakeFiles/lmp.dir/all] Error 2 Makefile:129: recipe for target ‘all’ failed make: *** [all] Error 2
before raise this error, I have done the following steps:
- download the latest version of lammps: 7 Aug 2019
- mkdir build && cd build
- cmake -C …/cmake/presets/minimal.cmake -D BUILD_LIB=on -D BUILD_SHARED_LIBS=on -D CMAKE_INSTALL_PREFIX=$VIRTUAL_ENV -D PKG_GPU=off -D PYTHON_LIBRARY=/usr/local/lib/libpython3.8.so …/cmake
- sudo make -j4 && sudo make install
This problem is out of what i can solve, please tell me how to figure it out; If any information you need that i omitted, i will provide it as soon as possible.
Thanks for your kindly help in advance !
Roy