problem for compiling minieigen on centos

Asked by JIPEIQI

When I try to install yade on centos, it reports like this:

CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find minieigen (missing: PY_minieigen)
Call Stack (most recent call first):
  /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  cMake/FindPythonModule.cmake:22 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:519 (find_python_module)

I guess I should install minieigen, so I download minieigen source from [1] and type "python setup.py install". And it reports like this :
running install
running build
running build_ext
building 'minieigen' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DEIGEN_DONT_ALIGN -Isrc -I/usr/include/eigen3 -I/usr/local/include/eigen3 -Iminieigen -I/usr/include/python2.6 -c src/minieigen.cpp -o build/temp.linux-x86_64-2.6/src/minieigen.o
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DEIGEN_DONT_ALIGN -Isrc -I/usr/include/eigen3 -I/usr/local/include/eigen3 -Iminieigen -I/usr/include/python2.6 -c src/expose-boxes.cpp -o build/temp.linux-x86_64-2.6/src/expose-boxes.o
In file included from src/expose-boxes.cpp:1:
src/visitors.hpp:107: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:107: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:107: error: template argument 1 is invalid
src/visitors.hpp:107: error: expected identifier before ‘>’ token
src/visitors.hpp:107: error: expected ‘,’ or ‘...’ before ‘>’ token
src/visitors.hpp:108: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:108: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:108: error: template argument 1 is invalid
src/visitors.hpp:108: error: expected identifier before ‘>’ token
src/visitors.hpp:108: error: expected ‘,’ or ‘...’ before ‘>’ token
src/visitors.hpp:108: error: ‘template<class MatrixBaseT> template<class Scalar, class PyClass> static void MatrixBaseVisitor::visit_reductions_noncomplex(PyClass&, int)’ cannot be overloaded
src/visitors.hpp:107: error: with ‘template<class MatrixBaseT> template<class Scalar, class PyClass> static void MatrixBaseVisitor::visit_reductions_noncomplex(PyClass&, int)’
src/visitors.hpp:121: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:121: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:121: error: template argument 1 is invalid
src/visitors.hpp:121: error: expected identifier before ‘>’ token
src/visitors.hpp:121: error: expected ‘,’ or ‘...’ before ‘>’ token
src/visitors.hpp:122: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:122: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:122: error: template argument 1 is invalid
src/visitors.hpp:122: error: expected identifier before ‘>’ token
src/visitors.hpp:122: error: expected ‘,’ or ‘...’ before ‘>’ token
src/visitors.hpp:122: error: ‘template<class MatrixBaseT> template<class Scalar> static bool MatrixBaseVisitor::prune_element(const Scalar&, typename MatrixBaseT::RealScalar, int)’ cannot be overloaded
src/visitors.hpp:121: error: with ‘template<class MatrixBaseT> template<class Scalar> static bool MatrixBaseVisitor::prune_element(const Scalar&, typename MatrixBaseT::RealScalar, int)’
src/visitors.hpp:361: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:361: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:361: error: template argument 1 is invalid
src/visitors.hpp:361: error: expected identifier before ‘>’ token
src/visitors.hpp:361: error: expected ‘,’ or ‘...’ before ‘>’ token
src/visitors.hpp:363: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:363: error: ‘is_complex’ is not a member of ‘boost’
src/visitors.hpp:363: error: template argument 1 is invalid
src/visitors.hpp:363: error: expected identifier before ‘>’ token
src/visitors.hpp:363: error: expected ‘,’ or ‘...’ before ‘>’ token
In file included from src/expose-boxes.cpp:1:
src/visitors.hpp:363: error: ‘template<class MatrixT> template<class Scalar, class PyClass> static void MatrixVisitor::visit_if_decompositions_meaningful(PyClass&, int)’ cannot be overloaded
src/visitors.hpp:361: error: with ‘template<class MatrixT> template<class Scalar, class PyClass> static void MatrixVisitor::visit_if_decompositions_meaningful(PyClass&, int)’
error: command 'gcc' failed with exit status 1

It really confuses me.... BTW I have already installed Boost 1.66.0 and eigen 3.3.4. Any instructions?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
JIPEIQI
Solved:
Last query:
Last reply:
Revision history for this message
JIPEIQI (jpq-learning) said :
#1
Revision history for this message
Deepak (deepak-kn1990) said :
#2

Hi,

looking at this line :

 gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DEIGEN_DONT_ALIGN -Isrc -I/usr/include/eigen3 -I/usr/local/include/eigen3 -Iminieigen -I/usr/include/python2.6 -c src/minieigen.cpp -o build/temp.linux-x86_64-2.6/src/minieigen.o

I think that the boost libraries are not linked in your compilation, you can manually set the path to the boost libraries in the setup.py file (see lines 17 and 18 where you have to set the path for boost include directory and the libraries directory).

Revision history for this message
JIPEIQI (jpq-learning) said :
#3

Hello Deepak!

I followed your advices and changed line 25 of setup.py to:

library_dirs=['/usr/local/include/boost']

when its origin is "library_dirs=[]"

I don't konw If I folllow you right, but it seems it doesn't work. The error messege is exactly the same...

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

Hi,

Did you add the include directories as well?

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

i think the boost include files are in : /usr/include/boost and to find the library directory you could search for it using the locate command :
eg.:
locate boost_python.so
would give you the path of the boost libs. You need to add the path for both the include as well as the lib directories.
For example my setup.py file looks like this:
libraries=['boost_python']
 library_dirs=['/share/apps/boost_1_57_0-GCC48/lib']
 include_dirs=['/kareline/data/deepak/yade/mylibs/eigen_lib/install/include/eigen3','/share/apps/boost_1_57_0-GCC48/include','minieigen']

Revision history for this message
JIPEIQI (jpq-learning) said :
#6

Hi Deepak!

I change my lines into:
 library_dirs=['/usr/local/lib']
 include_dirs=['/usr/local/include/boost','/usr/local/include/eigen3','minieigen']

where in /usr/local/lib : the liboost_python.so exists (but no boost_python is found on my computer)
where in /usr/local/include/boost : a bunch of .hpp files is found, so i guess i get this path right

but the error message is still the same. Is there something wrong with my boost libs?

Revision history for this message
JIPEIQI (jpq-learning) said :
#7

Hi Deepak!

I test the boost libs and it works well. So i still cant figure this out.....

I'm if it is a mistake to try to install yade on centos....

Revision history for this message
JIPEIQI (jpq-learning) said :
#8

Even if the minieigen installlation succeed. the installation of yade still reports like :

Could NOT find minieigen (missing: PY_minieigen)
Call Stack (most recent call first):
  /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  cMake/FindPythonModule.cmake:22 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:519 (find_python_module)

Revision history for this message
JIPEIQI (jpq-learning) said :
#9

I will start a new question

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#10

Hi, I changed the title since the question was not about compiling yade.
Bruno