probles when compiling yade

Asked by JIPEIQI

Hello everyone! I am still working on installing yade on my centos6.6....
When I type "make" after "cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk -DUSE_QT5=off -DENABLE_GUI=off"
the error reports like:
Scanning dependencies of target yade
[ 1%] Building CXX object CMakeFiles/yade.dir/core/corePlugins.cpp.o
[ 1%] Building CXX object CMakeFiles/yade.dir/core/ThreadWorker.cpp.o
[ 2%] Building CXX object CMakeFiles/yade.dir/core/FileGenerator.cpp.o
[ 3%] Building CXX object CMakeFiles/yade.dir/core/Clump.cpp.o
[ 3%] Building CXX object CMakeFiles/yade.dir/core/Scene.cpp.o
[ 4%] Building CXX object CMakeFiles/yade.dir/core/InteractionContainer.cpp.o
[ 4%] Building CXX object CMakeFiles/yade.dir/core/Material.cpp.o
[ 5%] Building CXX object CMakeFiles/yade.dir/core/State.cpp.o
[ 5%] Building CXX object CMakeFiles/yade.dir/core/ForceContainerParallel.cpp.o
[ 6%] Building CXX object CMakeFiles/yade.dir/core/Body.cpp.o
[ 6%] Building CXX object CMakeFiles/yade.dir/core/ThreadRunner.cpp.o
[ 7%] Building CXX object CMakeFiles/yade.dir/core/SimulationFlow.cpp.o
[ 7%] Building CXX object CMakeFiles/yade.dir/core/ForceContainerSerial.cpp.o
[ 8%] Building CXX object CMakeFiles/yade.dir/core/Interaction.cpp.o
[ 9%] Building CXX object CMakeFiles/yade.dir/core/Omega.cpp.o
[ 9%] Building CXX object CMakeFiles/yade.dir/core/BodyContainer.cpp.o
[ 10%] Building CXX object CMakeFiles/yade.dir/core/Cell.cpp.o
[ 10%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/TwoPhaseFlowEngine.cpp.o
[ 11%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/DummyFlowEngine.cpp.o
[ 11%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/PeriodicFlowEngine.cpp.o
[ 12%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/DFNFlow.cpp.o
[ 12%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/UnsaturatedEngine.cpp.o
[ 13%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o
[ 13%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/SoluteFlowEngine.cpp.o
[ 14%] Building CXX object CMakeFiles/yade.dir/pkg/dem/MeasureCapStress.cpp.o
[ 15%] Building CXX object CMakeFiles/yade.dir/pkg/dem/HertzMindlin.cpp.o
[ 15%] Building CXX object CMakeFiles/yade.dir/pkg/dem/Tetra.cpp.o
[ 16%] Building CXX object CMakeFiles/yade.dir/pkg/dem/MicroMacroAnalyser.cpp.o
[ 16%] Building CXX object CMakeFiles/yade.dir/pkg/dem/Polyhedra_splitter.cpp.o
[ 17%] Building CXX object CMakeFiles/yade.dir/pkg/dem/Disp2DPropLoadEngine.cpp.o
[ 17%] Building CXX object CMakeFiles/yade.dir/pkg/dem/SampleCapillaryPressureEngine.cpp.o
[ 18%] Building CXX object CMakeFiles/yade.dir/pkg/dem/KinemSimpleShearBox.cpp.o
[ 18%] Building CXX object CMakeFiles/yade.dir/pkg/dem/PotentialBlock.cpp.o
[ 19%] Building CXX object CMakeFiles/yade.dir/pkg/dem/BubbleMat.cpp.o
[ 19%] Building CXX object CMakeFiles/yade.dir/pkg/dem/Ip2_ElastMat.cpp.o
[ 20%] Building CXX object CMakeFiles/yade.dir/pkg/dem/MortarMat.cpp.o
[ 21%] Building CXX object CMakeFiles/yade.dir/pkg/dem/FlatGridCollider.cpp.o
[ 21%] Building CXX object CMakeFiles/yade.dir/pkg/dem/WirePM.cpp.o
[ 22%] Building CXX object CMakeFiles/yade.dir/pkg/dem/UnbalancedForceCallbacks.cpp.o
[ 22%] Building CXX object CMakeFiles/yade.dir/pkg/dem/VTKRecorder.cpp.o
[ 23%] Building CXX object CMakeFiles/yade.dir/pkg/dem/ThreeDTriaxialEngine.cpp.o
[ 23%] Building CXX object CMakeFiles/yade.dir/pkg/dem/GeneralIntegratorInsertionSortCollider.cpp.o
[ 24%] Building CXX object CMakeFiles/yade.dir/pkg/dem/TesselationWrapper.cpp.o
[ 24%] Building CXX object CMakeFiles/yade.dir/pkg/dem/ConcretePM.cpp.o
[ 25%] Building CXX object CMakeFiles/yade.dir/pkg/dem/RungeKuttaCashKarp54Integrator.cpp.o
In file included from /usr/local/include/boost/fusion/container/list/cons_iterator.hpp:18:0,
                 from /usr/local/include/boost/fusion/container/list/cons.hpp:19,
                 from /usr/local/include/boost/fusion/iterator/segmented_iterator.hpp:14,
                 from /usr/local/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp:12,
                 from /usr/local/include/boost/fusion/sequence/intrinsic/begin.hpp:18,
                 from /usr/local/include/boost/fusion/sequence/intrinsic/front.hpp:12,
                 from /usr/local/include/boost/fusion/include/front.hpp:11,
                 from /usr/local/include/boost/numeric/odeint/util/is_resizeable.hpp:26,
                 from /usr/local/include/boost/numeric/odeint/util/ublas_wrapper.hpp:32,
                 from /usr/local/include/boost/numeric/odeint.hpp:25,
                 from /data/pqji/MyYade/trunk/pkg/dem/RungeKuttaCashKarp54Integrator.hpp:5,
                 from /data/pqji/MyYade/trunk/pkg/dem/RungeKuttaCashKarp54Integrator.cpp:2:
/usr/local/include/boost/fusion/container/list/list_fwd.hpp:15:72: fatal error: boost/fusion/container/list/detail/preprocessed/list_fwd.hpp: No such file or directory
 #include <boost/fusion/container/list/detail/preprocessed/list_fwd.hpp>
                                                                        ^
compilation terminated.
make[2]: *** [CMakeFiles/yade.dir/pkg/dem/RungeKuttaCashKarp54Integrator.cpp.o] Error 1
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
make: *** [all] Error 2

The most strange thing is I open these files and the #include line is not like this, for example the line 18 of /usr/local/include/boost/fusion/container/list/cons_iterator.hpp is like this: #include <boost/fusion/container/list/list_fwd.hpp>, and this list_fwd.hpp actually exists.
I have tried boost version of 1.59 and 1.66, the error message is exactly the same.
The version of yade is 2018.02b

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
Robert Caulk (rcaulk) said :
#1

This might be a permissions issue.

To test it, you could try running your make install commend with a prepended 'sudo':

sudo make -jX install

Cheers,

Robert

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

Hi Robert! I have solved this problem by setting :
SET(BOOST_ROOT /home/pqji/usr)
SET(BOOST_INCLUDE_DIRS /home/pqji/usr/include)
SET(BOOST_LIBRARIES /home/pqji/usr/lib)
in my cmakelist.txt. and the make and make install command works well.
 However when I type yade command, the error reports like:
 /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found

This happens mainly because there are two versions of gcc in my computer. One libstdc++ is in /usr/lib and one libstdc++ is in /home/pqji/usr/lib. When installing yade it always found the former one which can not found GLIBCXX_3.4.15.
The question is how to make cmake found the libstdc++ in /home/pqji/usr/lib first. I don't have root permission so I can't just delete the former one.
I have also tried set LD_LIBRARY_PATH or add -L/home/pqji/usr/lib -Wl,-rpath-link,/home/pqji/usr/lib flags to CMAKE_CXX_FLAGS:STRING, however none of them works. The install procedure always found the /usr/lib/libstdc++ first.

Revision history for this message
Robert Caulk (rcaulk) said :
#3

Try using the LD_PRELOAD environment variable to set precedence:

export LD_PRELOAD = /home/pqji/usr/lib/libstdc++.so

or if you are using tsch instead of bash, use setenv instead of export.

Cheers,

Robert

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

Hi robert! I have solved the two problems. There is something wrong with the boost.
I installed yade successfully... with about 20days.....

I really think the installtion instruction for compiling from sources should be updated. It is far more out-dated.

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

I have not checked if yade works well. I will report this in next few days .....

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

>I really think the installtion instruction for compiling from sources should be updated

Which instructions are you speaking about? Boost or Yade?
Since I don't remember any instructions for CentOS compilation in the doc I doubt they can be out of date. If you could describe a walkthrough it could be useful for others probably.
If you see anything out-dated please let us know.

This being said it seems most of your problems come from the use of custom libraries.
Having boost and gcc in /home is really not a standard situation (or, say, people doing that usually know how to handle it), and it was your problem more than compiling yade as it seems.

Bruno

Revision history for this message
Robert Caulk (rcaulk) said :
#7

In addition to Bruno's comments:

>>
Hi robert! I have solved the two problems. There is something wrong with the boost.
I installed yade successfully... with about 20days.....
>>

Please post here *how* you solved your problems (or indicate which post solved the problem) so that people landing here in the future don't end up on a dangling thread.

Best,

Robert

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

Hi Robert and Bruno!
Some of the examples are: the gcc version should be greater than 4.8 (4.8.5 in my case)
version of python should be greater than 2.7 cause if you choose python 2.6, ipython 1.2.1 for python 2.6 seems go wrong in yade command.
the boost should be installed through gcc 4.4.7 (at least should not be installed by 4.8.5, cause this will go wrong in my case )
Some other problems happens because I'm new to linux, just read the instruction of each external software and you can get rid of most of them (set the environment variables or set extra flags). But the most confusing problems for me listed above may be important for someone who wants to install yade on centos6.6.
Or maybe the problems I mentioned are just mistakes I made? If that, just forget it...

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

>the most confusing problems for me listed above may be important for someone who wants to install yade on centos6.6.

Sure, however most of us are using debian systems which do not require to checkout specific versions of packages nor to tune env variables. We are thus clueless on your specific problems.
"Some examples" of the problems are not helpful, what would be helpful would be a more comprehensive step-by-step explanation of what you did to get yade compiled on CentOS.
Bruno

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

Hi Bruno!
It might be a little difficult for me to write a step by step explantion cause I have forgot some of the details..... I'm really sorry for that. And I'm a new comer for linux, maybe someone who wants to install yade on centos has sufficent konwledge about linux, and probably will not make mistakes like mine.
Hoping the listed problems above which stuck me so long will save some of their time....
If you think the step by step explantion is very important, I'll try to reinstall my yade and write my steps here.
Thank you!

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

No I will not force you to reinstall linux. ;)
Overall I was just asking more specific feedback since you mentionned "the installation instruction for compiling from sources should be updated. It is far more out-dated."
It is still unclear what should be changed.
Bruno