Installation on centOS7 (loki pb)

Asked by Cédric

Hi,

I am trying to compile the latest 2017 yade software (on a centOS 7 distribution).
I followed the steps indicated by the installation page/compilation but I have troubles at the cmake step:
 - the script ends up with a loki library not found error,
 - the complete messages are:
-- Version is set to 2017.01a
-- GSL using pkgconfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- PKGCONFIG() indicates that gts is not installed (install the package which contains gts.pc if you want to support this feature)
FindGTS.cmake: gts-config/pkg-config gts not found. Please set it manually. GTS_CONFIG=GTS_CONFIG-NOTFOUND
-- ERROR: GTS was not found.
-- Could NOT find GL2PS (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
-- CGAL not found.
-- Could NOT find Loki (missing: LOKI_INCLUDE_DIR)
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0 and -save-temps
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- Boost_VERSION: 105300
-- Boost_LIB_VERSION: 1_53
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib64/libboost_python-mt.so/usr/lib64/libboost_thread-mt.so/usr/lib64/libboost_filesystem-mt.so/usr/lib64/libboost_iostreams-mt.so/usr/lib64/libboost_regex-mt.so/usr/lib64/libboost_serialization-mt.so/usr/lib64/libboost_system-mt.so/usr/lib64/libboost_date_time-mt.so
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find Loki (missing: LOKI_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  cMake/FindLoki.cmake:14 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:104 (FIND_PACKAGE)

I suppose I misunderstood how to install the libloki library (I also add to compile it ...)
Could you please help: Is there any way to check if the library is properly installed ?

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Hi,

well, loki library should probably replaced by standard C++
constructions in Yade. But now you need to install it from
RPM-packages [1].

Regards

[1] https://rpms.remirepo.net/rpmphp/zoom.php?rpm=loki-lib

Anton

Revision history for this message
Cédric (cedric2080) said :
#2

Hi,

Many thanks for your reply.

Well, I did not install from rpm because I thought I would need to install a fedora repos to do so according to the link you provide (did not find any equivalence for centOS, neither for redhat).
As I read every(some)where that it is not a good idea to mix fedora repositories with the centOS repos because it would become risky for dependencies stuff managed by Yum... and it was also a good exercise to compile from scratch.

But your reply provided me a different vision on the topic: I think I simply can download the .rpm and install it without breaking any dependancies :)
Am I right ?

Will try it tomorrow though.

Thanks.

Revision history for this message
Anton Gladky (gladky-anton) said :
#3

Please be careful. The link was just an example, that the RPM package
exist. You should install it from your repo! Just find the package in
your package manager. Sorry for confusion.

Regards

Anton

2017-06-13 20:08 GMT+02:00 Cédric <email address hidden>:
> But your reply provided me a different vision on the topic: I think I simply can download the .rpm and install it without breaking any dependancies :)
> Am I right ?

Revision history for this message
Deepak (deepak-kn1990) said :
#4

hi,

if you have compiled loki, you could go to trunk/cMake/FindLoki.cmake

and add your include dir in the FIND_PATH command :

FIND_PATH(LOKI_INCLUDE_DIR /path/'to/your/loki/include/loki/)

and edit the FIND_LIBRARY command:
FIND_LIBRARY(LOKI_LIBRARY NAMES /path/'to/your/loki//lib)

On Tue, Jun 13, 2017 at 8:18 PM, Anton Gladky <
<email address hidden>> wrote:

> Question #643703 on Yade changed:
> https://answers.launchpad.net/yade/+question/643703
>
> Status: Open => Answered
>
> Anton Gladky proposed the following answer:
> Please be careful. The link was just an example, that the RPM package
> exist. You should install it from your repo! Just find the package in
> your package manager. Sorry for confusion.
>
> Regards
>
> Anton
>
> 2017-06-13 20:08 GMT+02:00 Cédric <email address hidden>:
> > But your reply provided me a different vision on the topic: I think I
> simply can download the .rpm and install it without breaking any
> dependancies :)
> > Am I right ?
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Cédric (cedric2080) said :
#5

Anton: yes, will proceed slowly. The problems is that I cannot find a centOs repos containing this lib.

Hi Deepak, thanks, I will better check then:
I already tried to "tweak" the "trunk/cMake/FindLoki.cmake", but I think I made:
 - either some mistake in the way I included the paths => will try to follow your notation,
 - or I in fact badly compiled the libloki, I obtained that as root with ldconfig:
"
# ldconfig -n -v /usr/lib
/usr/lib:
 libloki.so.0.1.7 -> libloki.so.0.1.7
"

It is still a bit experimental for me...

Revision history for this message
Cédric (cedric2080) said :
#6

In "trunk/cMake/FindLoki.cmake", I did that:

"
#FIND_PATH(LOKI_INCLUDE_DIR /home/myUserName/Downloads/loki-0.1.7/include/loki/Typelist.h)
#FIND_LIBRARY(LOKI_LIBRARY NAMES /usr/lib/libloki.so.0.1.7 )

set(LOKI_INCLUDE_DIR "/home/myUserName/Downloads/loki-0.1.7/include/loki")
set(LOKI_LIBRARY "/usr/lib/libloki.so.0.1.7")
"

Yes, I compiled the lib from ./Downloads/, it looks like a quite dirty practice :)

Now, cmake does not complain about loki but about eigen3, this is also a difficult library to find I believe.
"
-- Version is set to 2017.01a
-- GSL using pkgconfig
-- WARNING: you are using the obsolete 'PKGCONFIG' macro, use FindPkgConfig
-- PKGCONFIG() indicates that gts is not installed (install the package which contains gts.pc if you want to support this feature)
FindGTS.cmake: gts-config/pkg-config gts not found. Please set it manually. GTS_CONFIG=GTS_CONFIG-NOTFOUND
-- ERROR: GTS was not found.
-- Could NOT find GL2PS (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
-- CGAL not found.
-- Found Loki: /home/crenzi-centOS/Downloads/loki-0.1.7/include/loki
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0 and -save-temps
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- Boost_VERSION: 105300
-- Boost_LIB_VERSION: 1_53
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib64/libboost_python-mt.so/usr/lib64/libboost_thread-mt.so/usr/lib64/libboost_filesystem-mt.so/usr/lib64/libboost_iostreams-mt.so/usr/lib64/libboost_regex-mt.so/usr/lib64/libboost_serialization-mt.so/usr/lib64/libboost_system-mt.so/usr/lib64/libboost_date_time-mt.so
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
  (Required is at least version "2.91.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  cMake/FindEigen3.cmake:76 (find_package_handle_standard_args)
  CMakeLists.txt:107 (FIND_PACKAGE)
"

Thanks you Anton and Deepak, I will try to tackle the same way the eigen3 lib.

Revision history for this message
Yatagarasu (samjoko) said :
#7

Salutations Cedric. I have been trying to compile Yade 2017 on a Scientific Linux 7 distribution and have managed to achieve a running installation. However, I only am able to run it with the ENABLE_GUI option disabled. Here are the installation instructions I have put together thus far.

For 2017 yade specifically:

Open a new terminal:
wget "https://launchpad.net/yade/trunk/yade-1.00.0/+download/yade-2017.01a.tar.gz"
tar -xvf yade-2017.01a.tar.gz
sudo rm yade-2017.01a.tar.gz
mkdir yade17
mv trunk-2017.01a yade17/
cd yade17
mv trunk-2017.01a trunk
mkdir build
mkdir install
mkdir DEPENDENCIES
cd
sudo mv yade17 /usr/share/

Alternatively for 2016 yade specifically:

Open a new terminal:
wget "https://launchpad.net/yade/trunk/yade-1.00.0/+download/yade-2016.06a.tar.gz "
mkdir yade16
mv yade-2016.06a.tar. yade16/
cd yade16
tar -xvf yade-2016.06a.tar.gz
sudo rm yade-2016.06a.tar.gz
mv trunk-2016.01a trunk
mkdir build
mkdir install
mkdir DEPENDENCIES
cd
sudo mv yade16 /usr/share/
sudo cp -r /usr/include/vtk/* /usr/include/
vi /usr/share/yade16/trunk/py/wrapper/yadeWrapper.cpp

Append the following to the bottom of the includes section:
 #include <csignal>

For either, or both installations:

sudo yum remove pyqt4
sudo yum groupinstall 'Development Tools' && sudo yum install curl file git irb python-setuptools ruby boost-devel python34-setuptools eigen3-devel bzip2-devel libXmu-devel tkinter scons qt3-devel freeglut-devel boost-devel boost-date-time boost-filesystem boost-thread boost-regex fakeroot gcc gcc-c++ boost-iostreams log4cxx log4cxx-devel python-devel boost-python ipython python-matplotlib sqlite-devel gnuplot doxygen graphviz-python s bzr python-xlib gmp-devel metis metis-devel mpfr mpfr-devel netpbm-devel netpbm && sudo yum install qt5* qt4* --skip-broken
cd /usr/share/yade17/DEPENDENCIES/
wget "https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.3/sip-4.19.3.tar.gz"
tar -xzf sip-4.19.3.tar.gz
cd sip-4.19.3/
python configure.py
make -j8
sudo make install -j8
cd /usr/share/yade17/DEPENDENCIES/
wget "https://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-4.12.1/PyQt4_gpl_x11-4.12.1.tar.gz?r=&ts=1499644245&use_mirror=iweb"
mv PyQt4_gpl_x11-4.12.1.tar.gz\?r\=\&ts\=1499644245\&use_mirror\=iweb PyQt4_gpl_x11-4.12.1.tar.gz
tar -xzf PyQt4_gpl_x11-4.12.1.tar.gz
cd PyQt4_gpl_x11-4.12.1
python configure.py --qmake /usr/lib64/qt5/bin/qmake
make -j8
sudo make install -j8
cd /usr/share/yade17/DEPENDENCIES/
wget "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.9/PyQt5_gpl-5.9.tar.gz"
tar -xzf PyQt5_gpl-5.9.tar.gz
cd PyQt5_gpl-5.9
python configure.py --qmake /usr/lib64/qt5/bin/qmake
make -j8
sudo make install -j8
cd /usr/share/yade17/DEPENDENCIES/
cd /etc/yum.repos.d/
sudo curl -s -SLO https://copr.fedoraproject.org/coprs/rineau/libQGLViewer-qt5/repo/epel-7/rineau-libQGLViewer-qt5-epel-7.repo
rpm --import https://copr-be.cloud.fedoraproject.org/results/rineau/libQGLViewer-qt5/pubkey.gpg
sudo yum install libQGLViewer-qt5-devel.x86_64
yum clean all
wget "https://pypi.python.org/packages/dc/bc/24261f50af82ab2bec92b3aa73d4c05d98a39be9d393dba0e81c1cab7e31/minieigen-0.5.3.tar.gz#md5=b9cd1a29a03419129ae52192e0b8a847"
tar -xzf minieigen-0.5.3.tar.gz
cd minieigen-0.5.3/
sudo python setup.py install
cd /usr/share/yade17/DEPENDENCIES/
wget "https://downloads.sourceforge.net/project/loki-lib/Loki/Loki%200.1.7/loki-0.1.7.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Floki-lib%2Ffiles%2FLoki%2FLoki%25200.1.7%2F&ts=1499401735&use_mirror=svwh"
mv loki-0.1.7.tar.gz\?r\=https\:%2F%2Fsourceforge.net%2Fprojects%2Floki-lib%2Ffiles%2FLoki%2FLoki%200.1.7%2F\&ts\=1499401735\&use_mirror\=svwh loki-0.1.7.tar.gz
tar -xvf loki-0.1.7.tar.gz
cd loki-0.1.7
make -j8
sudo make install
cd /usr/share/yade17/DEPENDENCIES/
wget "https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-4.8/CGAL-4.8.tar.xz"
tar -xvf CGAL-4.8.tar.xz
cd CGAL-4.8/
cmake .
make -j8
sudo make install
cd /usr/share/yade17/DEPENDENCIES/
wget "http://www.graphviz.org/pub/graphviz/stable/redhat/el7/x86_64/os/gts-0.7.6-21.20111025.el7.x86_64.rpm"
wget "http://www.graphviz.org/pub/graphviz/stable/redhat/el7/x86_64/os/gts-devel-0.7.6-21.20111025.el7.x86_64.rpm"
sudo rpm -Uhv gts-0.7.6-21.20111025.el7.x86_64.rpm
sudo rpm -Uhv gts-devel-0.7.6-21.20111025.el7.x86_64.rpm
cd /usr/share/yade17/build/
cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk -DENABLE_GUI=OFF
make -j8
sudo make install

.bashrc additions
LIBGL_ALWAYS_SOFTWARE=1
export LIBGL_ALWAYS_SOFTWARE
export PATH=$PATH:/usr/lib64/openmpi/bin
export PATH=/usr/local/bin/:/usr/local/sbin/:$PATH
export PATH=${PATH}:/usr/bin/
export CONDOR_CONFIG=/etc/condor/condor_config
export PATH=$PATH:/usr/lib64/qt5/bin/
export PATH=$PATH/usr/lib64/
export PATH=$PATH:/usr/local/lib/
export PATH=$PATH:/usr/local/include/
export PATH=$PATH:/usr/include/
export PATH=$PATH:/usr/share/Qt5.1.1/5.1.1/*
export PATH=$PATH:/usr/local/cuda/bin/
export PATH=$PATH:/usr/local/cuda-7.5/lib64/
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/
alias crcondor='cp -r /usr/condor_submission/* ./ && mkdir ./condor_output'
alias rmcondor='rm cs.submit executable.sh'

Can you help with this problem?

Provide an answer of your own, or ask Cédric for more information if necessary.

To post a message you must log in.