Hallo everyone,
since few days we try to install the current version of Liggghts on our Linux cluster (Ubuntu 14.04). The first steps were no problem, but we always get an error during the compiling process:
/usr/bin/ld: cannot find -ljpeg
/usr/bin/ld: cannot find -lpng
/usr/bin/ld: cannot find -lvtkCommon
/usr/bin/ld: cannot find -lvtkFiltering
/usr/bin/ld: cannot find -lvtkIO
collect2: error: ld returned 1 exit status
make[1]: *** [../lmp_ubuntuVTK] Error 1
make[1]: Leaving directory `/opt/liggghts/LIGGGHTS-PUBLIC/src/Obj_ubuntuVTK'
make: *** [ubuntuVTK] Error 2
It would be really nice if someone has a solution. The log file of the compiling process is attached.
Thank you in advance
Tobias
Attachment | Size |
---|---|
![]() | 71.58 KB |
Daniel Queteschiner | Fri, 11/06/2015 - 12:36
Makefiles
You're trying to compile LIGGGHTS with VTK support which requires the VTK libraries and headers to be present on your system (here: VTK 5.8). If you want to use VTK 6 instead, you have to use the ubuntuVTK6 makefile. If you don't need VTK support, you should use the fedora makefile.
PaulWinkler | Wed, 11/11/2015 - 15:14
Hi,
Hi,
since jpg and png support is not activated by default, you might have modified your make file already. If you don't use VTK, JPG and PNG you may delete -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_VTK from your make file. Else you may take a look at my latest tutorial for LIGGGHTS 3.3.0, just the snippet about LIGGGHTS. I have to insert the tutorial in code below, no opportunity for attachments in reply here.
Are you using Ubuntu on a cluster?
Regards
Paul
## 2 Install Liggghts 3.x by compiling
## 2.1 Install Packages
sudo apt-get install git libvtk5-dev libeigen2-dev openmpi-bin openmpi-doc libopenmpi-dev
which mpirun
/usr/bin/mpirun comes up?
which mpic++
/usr/bin/mpic++ comes up?
## 2.2 Get Liggghts via Git
cd ~
git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC $HOME/LIGGGHTS-PUBLIC3.3.0
## 2.3 Compiling Liggghts with VORONOI and jpg, png support
cd $HOME/LIGGGHTS-PUBLIC3.3.0/src
if you need extra packages install with sudo make yes-packagename
gedit /$HOME/LIGGGHTS-PUBLIC3.3.0/src/MAKE/Makefile.ubuntuVTK
# add "-DLAMMPS_JPEG -DLAMMPS_PNG" in line 32
# add "-I/usr/include" in line 63
# add "-ljpeg -lpng" in line 65
# save and close gedit
# replace compute_pair_gran_local.cpp
make clean-all
make ubuntuVTK
sudo ln -s /$HOME/LIGGGHTS-PUBLIC3.3.0/src/lmp_ubuntuVTK /usr/bin/liggghts330
# sudo ln -s /$HOME/LIGGGHTS-PUBLIC3.3.0/src/lmp_serial /usr/bin/liggghts330
liggghts330
Liggghts comes up, telling version, compiling date etc.
Ctr+d