| Attachment | Size |
|---|---|
| wei_xin_tu_pian_20180728173345.jpg | 24.21 KB |
Forums
When I want to build my LIGGGHTS to be a shared library, I always got this problem. And I have install MPICH as the tutorials, but the problem is still exist. I am a new learner of liggghts, I will very appreciate if you can help me
foo == type of makefile
Hello,
foo refers to the the makefile you would like to use (for example auto)
so you could use the command
make -f Makefile.shlib auto
In reply to foo == type of makefile by mschramm
Thank you very much for your
Thank you very much for your suggestion, I have tried auto, but it still have some problem I do not know how to solve them.
make[1]: Entering directory '/home/ljc/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:815: *** 'Could not obtain VTK_MAJOR_VERSION. As AUTOINSTALL_VTK is not set to "ON" we cannot continue'。 停止。
make[1]: Leaving directory '/home/ljc/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile.shlib:62: recipe for target 'auto' failed
make: *** [auto] Error 2
In reply to Thank you very much for your by ljc
What operating system are you
What operating system are you using and did you install vtk? If yes, how did you install it?
In reply to Thank you very much for your by ljc
makefile.user
When you use makefile.auto for the first time it generates makefile.user. If you haven't installed and don't intend to use VTK in your application, change the line:
USE_VTK = "ON"
to:
USE_VTK = "OFF"
and recompile
Problems when making shared library
Hi Arnom,
I tried to build shared library for LIGGGHTS3.20, following the guidance given in Manual.
make makeshlib
make -f Makefile.shlib fedora
Following error is shown:
/usr/bin/ld: angle.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
angle.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [shlib] Error 1
make[1]: Leaving directory `/home/.../LIGGGHTS3.20_LBM/src/Obj_shlib_fedora'
make: *** [fedora] Error 2
Do you have any ideas about this issue ?
Thank you
Nathan,
In reply to Problems when making shared library by Nathan
Edit the MAKE/Makefile.fedora
Edit the MAKE/Makefile.fedora file and add a -fPIC to your CCFLAGS and LINKFLAGS. Make sure to do a make clean-fedora and recompile.
In reply to Edit the MAKE/Makefile.fedora by arnom
Hi Arnom,
Hi Arnom,
I am new to LIGGGHTS and computer modelling. I have the same problem as above to build the shared library. Could you please give me a specific guide? I am not sure what you mean "add a -fPIC" ? In my Makefile.fedora , CCFLAGS = -02\ and LINKFLAGS = -02 , so does it mean I should change it to CCFLAGS = -02\ -fPIC and LINKFLAGS = -02 fPIC ?
Thank you
Hi Arnom,
Hi Arnom,
I am new to LIGGGHTS and computer modelling. I have the same problem as above to build the shared library. Could you please give me a specific guide? I am not sure what you mean "add a -fPIC" ? In my Makefile.fedora , CCFLAGS = -02\ and LINKFLAGS = -02 , so does it mean I should change it to CCFLAGS = -02\ -fPIC and LINKFLAGS = -02 fPIC ?
Thank you