I installed the voronoi as the manual said by typing
$ python setup.py
in the pyth of lammps/lib/vornoi/, then I enter in the lammps/src/ and typed
make yes-voronoi
make mpi mode=shlib
to make lammps for python use. But it failed during the compiling processing, which gives
"
/usr/bin/ld: …/…/lib/voronoi/liblink/libvoro++.a(cell.o): relocation R_X86_64_32 against `.rodata.str1.1’ can not be used when making a shared object; recompile with -fPIC
…/…/lib/voronoi/liblink/libvoro++.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
".
The LAMMPS manual has described this error but didn’t give useful solution for this package.
So how to install this package for lammps shlib mode?
I installed the voronoi as the manual said by typing python setup\.py
in the pyth of lammps/lib/vornoi/, then I enter in the lammps/src/ and typed
make yes-voronoi
$ make mpi mode=shlib
to make lammps for python use. But it failed during the compiling
processing, which gives
"
/usr/bin/ld: ../../lib/voronoi/liblink/libvoro++.a(cell.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared
object; recompile with -fPIC
../../lib/voronoi/liblink/libvoro++.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
".
The LAMMPS manual has described this error but didn't give useful solution
for this package.
please explain: what does the LAMMPS manual say about this error and
why is that not a useful solution for you?
So how to install this package for lammps shlib mode?
the error message from the linker already tells you what to do. why
don't you just follow its advice?
Thanks for your reply.
The manual says the package (for the lmp in shlib mode) should be installed as a shared library, and gives a example for MPICH library, as
Thanks for your reply.
The manual says the package (for the lmp in shlib mode) should be installed
as a shared library, and gives a example for MPICH library, as
----------------------------------------------------
./configure --enable-shared
make
make install
----------------------------------------------------
But I don't how to build voronoi like that way or recompile it with -fPIC.
then you should find somebody local to help you, that knows more about
compiling software.
it is not really needed to build a shared library for voronoi, but it
is sufficient to edit the makefile for the voronoi library to include
-fPIC in addition to other compilation flags.
on x86_64 linux the situation is the following: you can build static
libraries and executables from object files that have been compiled
with or without -fPIC, but to build shared libraries *all* objects and
libraries *must* have been compiled with -fPIC.