ISSUE COMPILING CFDEM-coupling LIGGGHTS public 3.7.0 WITH VORONOI package

Robertliggghts's picture
Submitted by Robertliggghts on Wed, 07/31/2019 - 12:41

Hey,

I want to add the VORONOI package to the 3.7.0 CFDEM-coupling LIGGGHTS public.

So I sticked to the tutorials and installed voro++

sudo apt install g++
cd ~
wget http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz
tar -zxvf voro++-0.4*.tar.gz
cd $HOME/voro++-0.4.*
make all
sudo make install
which voro++
/usr/local/bin/voro++

then i changed the text file package-liggghts-list.txt like this:

#syntax: packageName/dir
#note: dir is not a path, just a keyword here
###############################################
#POEMS/dir
#PASCAL/dir
VORONOI/dir

Compiling the package with cfdemCompCFDEMAll brings up the following issue:

lvoro++
/usr/bin/ld: /usr/local/lib/libvoro++.a(container.o): relocation R_X86_64_PC32 against symbol `_ZN4voro14container_baseD2Ev' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:917: recipe for target 'shlib' failed
make[1]: *** [shlib] Error 1
make[1]: Leaving directory '/home/dreisiebennullvornoi/LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile.shlib:43: recipe for target 'auto' failed
make: *** [auto] Error 2

We reproduced the compilation issue on 2 different machines.
Whats the problem here? Can anyone give advice? How can we solve the problem?

Please do not suggest to use LIGGGHTS 3.8.0. We have to stick with 3.7.0.

THANKs

AttachmentSize
Plain text icon log_compileliggghts.txt158.65 KB

Marzi | Tue, 03/26/2024 - 10:47

use this too fix the problem
'make -j CFLAGS=-fPIC' to regenernate the voro++.a as a share lib not a satic lib
it can make voro and liggghts as a share lib