Error during installation: libyade.so

Asked by YUFAN ZHAO on 2019-09-10

Hello everyone,

When I was trying to install yade_2018.02b from source code on Ubuntu 16.04 (64bit).
I have successfully finished the "cmake" without errors and the enabled and disabled options were shown as:
-- ===========================================================
-- Yade configured with following features: Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW TWOPHASEFLOW LINSOLV SPH DEFORM LIQMIGRATION GL2PS LBMFLOW MASK_ARBITRARY PROFILING PotentialParticles PotentialBlocks
-- Disabled features: CHOLMOD_GPU
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yufan/myYade/build

However, there is something wrong during the subsequent "make" step.
The log with errors:

root@yufan-virtual-machine:/home/yufan/myYade/build# sudo make -j2
[ 1%] Automatic moc for target boot
[ 2%] Automatic moc for target yade
[ 2%] Built target boot_automoc
[ 2%] Automatic moc for target _GLViewer
[ 2%] Built target _GLViewer_automoc
[ 3%] Automatic moc for target _polyhedra_utils
[ 3%] Built target _polyhedra_utils_automoc
[ 3%] Built target yade_automoc
[ 3%] Automatic moc for target _packSpheres
[ 3%] Automatic moc for target _packPredicates
[ 3%] Built target _packSpheres_automoc
[ 3%] Built target _packPredicates_automoc
[ 4%] Automatic moc for target wrapper
[ 4%] Automatic moc for target _packObb
[ 4%] Built target wrapper_automoc
[ 4%] Built target _packObb_automoc
[ 4%] Automatic moc for target WeightedAverage2d
[ 5%] Automatic moc for target _utils
[ 5%] Built target WeightedAverage2d_automoc
[ 5%] Built target _utils_automoc
[ 5%] Automatic moc for target _customConverters
[ 5%] Built target _customConverters_automoc
[ 6%] Built target _polyhedra_utils
[ 10%] Built target _GLViewer
[ 12%] Built target _packObb
[ 13%] Built target WeightedAverage2d
[ 13%] Linking CXX shared library lib/x86_64-linux-gnu/libyade.so
/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libbz2.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/yade.dir/build.make:4363: recipe for target 'lib/x86_64-linux-gnu/libyade.so' failed
make[2]: *** [lib/x86_64-linux-gnu/libyade.so] Error 1
CMakeFiles/Makefile2:171: recipe for target 'CMakeFiles/yade.dir/all' failed
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I will be appreciate if someone can give me some tips to solve the problem.
Thanks very much.

Question information

Language:
English Edit question
Status:
Open
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-09-15
Last reply:
2019-09-11
Robert Caulk (rcaulk) said : #1

Did you try to "recompile with -fPIC" ?

Jan Stránský (honzik) said : #2

@Robert:

> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -std=c++11")

this is from CMakeLists.txt of 2018.02b, -fPIC should be already there

@yufan: what does "make VERBOSE=ON" tells?

Jan

Robert Caulk (rcaulk) said : #3

Also try compiling without "sudo".

YUFAN ZHAO (zhao90215) said : #4

@Robert
>Also try compiling without "sudo".

Thanks for your advice, but it made no sense w/ or w/o "sudo".

YUFAN ZHAO (zhao90215) said : #5

@Jan
>what does "make VERBOSE=ON" tells?

Thanks for your reply. There was no change about the error after typing "make VERBOSE=ON".

The log shown as below:

[ 6%] Linking CXX shared library lib/x86_64-linux-gnu/libyade.so
/usr/bin/cmake -E cmake_link_script CMakeFiles/yade.dir/link.txt --verbose=ON
/usr/bin/c++ -fPIC -fPIC -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -std=c++11 -DYADE_VTK -DYADE_OPENMP -fopenmp -DYADE_GTS -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include -DQGLVIEWER_FOUND -DYADE_OPENGL -DYADE_QT5 -DYADE_CGAL -DFLOW_ENGINE -DTWOPHASEFLOW -DLINSOLV -DFLOW_ENGINE -DYADE_GL2PS -DLBM_ENGINE -Wl,--as-needed -shared -Wl,-soname,libyade.so -o lib/x86_64-linux-gnu/libyade.so CMakeFiles/yade.dir/core/ForceContainerSerial.cpp.o CMakeFiles/yade.dir/core/InteractionContainer.cpp.o CMakeFiles/yade.dir/core/Cell.cpp.o CMakeFiles/yade.dir/core/State.cpp.o CMakeFiles/yade.dir/core/ForceContainerParallel.cpp.o CMakeFiles/yade.dir/core/Material.cpp.o CMakeFiles/yade.dir/core/ThreadRunner.cpp.o CMakeFiles/yade.dir/core/Scene.cpp.o CMakeFiles/yade.dir/core/FileGenerator.cpp.o CMakeFiles/yade.dir/core/BodyContainer.cpp.o CMakeFiles/yade.dir/core/SimulationFlow.cpp.o CMakeFiles/yade.dir/core/Clump.cpp.o CMakeFiles/yade.dir/core/ThreadWorker.cpp.o CMakeFiles/yade.dir/core/corePlugins.cpp.o CMakeFiles/yade.dir/core/Interaction.cpp.o CMakeFiles/yade.dir/core/Omega.cpp.o CMakeFiles/yade.dir/core/Body.cpp.o CMakeFiles/yade.dir/pkg/dem/MeasureCapStress.cpp.o CMakeFiles/yade.dir/pkg/dem/BlockGen.cpp.o CMakeFiles/yade.dir/pkg/dem/PotentialBlock2AABB.cpp.o CMakeFiles/yade.dir/pkg/dem/BubbleMat.cpp.o CMakeFiles/yade.dir/pkg/dem/TriaxialStressController.cpp.o CMakeFiles/yade.dir/pkg/dem/Polyhedra.cpp.o CMakeFiles/yade.dir/pkg/dem/GeneralIntegratorInsertionSortCollider.cpp.o CMakeFiles/yade.dir/pkg/dem/Ip2_ElastMat.cpp.o CMakeFiles/yade.dir/pkg/dem/CapillaryPhys.cpp.o CMakeFiles/yade.dir/pkg/dem/FrictViscoPM.cpp.o CMakeFiles/yade.dir/pkg/dem/TriaxialTest.cpp.o CMakeFiles/yade.dir/pkg/dem/TriaxialCompressionEngine.cpp.o CMakeFiles/yade.dir/pkg/dem/ViscoelasticCapillarPM.cpp.o CMakeFiles/yade.dir/pkg/dem/SpheresFactory.cpp.o CMakeFiles/yade.dir/pkg/dem/ForceTorqueRecorder.cpp.o CMakeFiles/yade.dir/pkg/dem/FacetTopologyAnalyzer.cpp.o CMakeFiles/yade.dir/pkg/dem/PotentialBlock.cpp.o CMakeFiles/yade.dir/pkg/dem/ThreeDTriaxialEngine.cpp.o CMakeFiles/yade.dir/pkg/dem/VTKRecorder.cpp.o CMakeFiles/yade.dir/pkg/dem/UniaxialStrainer.cpp.o CMakeFiles/yade.dir/pkg/dem/ViscoelasticPM.cpp.o CMakeFiles/yade.dir/pkg/dem/Ig2_PP_PP_ScGeom.cpp.o CMakeFiles/yade.dir/pkg/dem/Ig2_Facet_Sphere_ScGeom.cpp.o CMakeFiles/yade.dir/pkg/dem/Polyhedra_splitter.cpp.o CMakeFiles/yade.dir/pkg/dem/CapillaryPhys1.cpp.o CMakeFiles/yade.dir/pkg/dem/TesselationWrapper.cpp.o CMakeFiles/yade.dir/pkg/dem/KnKsPBLaw.cpp.o CMakeFiles/yade.dir/pkg/dem/PotentialParticle2AABB.cpp.o CMakeFiles/yade.dir/pkg/dem/SimpleShear.cpp.o CMakeFiles/yade.dir/pkg/dem/ElectrostaticMat.cpp.o CMakeFiles/yade.dir/pkg/dem/FrictPhys.cpp.o CMakeFiles/yade.dir/pkg/dem/Integrator.cpp.o CMakeFiles/yade.dir/pkg/dem/RockBolt.cpp.o CMakeFiles/yade.dir/pkg/dem/KinemC__Engine.cpp.o CMakeFiles/yade.dir/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp.o CMakeFiles/yade.dir/pkg/dem/STLImporter.cpp.o CMakeFiles/yade.dir/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity1.cpp.o CMakeFiles/yade.dir/pkg/dem/ElasticContactLaw.cpp.o CMakeFiles/yade.dir/pkg/dem/GlobalStiffnessTimeStepper.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Bo1_DeformableElement_Aabb.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Lin4NodeTetra_Lin4NodeTetra_InteractionElement.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Gl1_Node.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/DeformableCohesiveElement.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/FEInternalForceDispatchers.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Gl1_DeformableElement.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/DeformableElement.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Lin4NodeTetra.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/LinElastMat.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/CohesiveMat.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Bo1_Node_Aabb.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/Node.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/FEInternalForceEngine.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/If2_2xLin4NodeTetra_LinCohesiveStiffPropDampElastMat.cpp.o CMakeFiles/yade.dir/pkg/dem/deformablecohesive/If2_Lin4NodeTetra_LinIsoRayleighDampElast.cpp.o CMakeFiles/yade.dir/pkg/dem/ConcretePM.cpp.o CMakeFiles/yade.dir/pkg/dem/PotentialParticle.cpp.o CMakeFiles/yade.dir/pkg/dem/JointedCohesiveFrictionalPM.cpp.o CMakeFiles/yade.dir/pkg/dem/Ig2_Sphere_Sphere_ScGeom.cpp.o CMakeFiles/yade.dir/pkg/dem/Disp2DPropLoadEngine.cpp.o CMakeFiles/yade.dir/pkg/dem/Ig2_PB_PB_ScGeom.cpp.o CMakeFiles/yade.dir/pkg/dem/MicroMacroAnalyser.cpp.o CMakeFiles/yade.dir/pkg/dem/LudingPM.cpp.o CMakeFiles/yade.dir/pkg/dem/CohesiveFrictionalContactLaw.cpp.o CMakeFiles/yade.dir/pkg/dem/ScGeom.cpp.o CMakeFiles/yade.dir/pkg/dem/Shop_01.cpp.o CMakeFiles/yade.dir/pkg/dem/CapillaryStressRecorder.cpp.o CMakeFiles/yade.dir/pkg/dem/SampleCapillaryPressureEngine.cpp.o CMakeFiles/yade.dir/pkg/dem/TriaxialStateRecorder.cpp.o CMakeFiles/yade.dir/pkg/dem/CapillaryTriaxialTest.cpp.o CMakeFiles/yade.dir/pkg/dem/InelastCohFrictPM.cpp.o CMakeFiles/yade.dir/pkg/dem/DomainLimiter.cpp.o CMakeFiles/yade.dir/pkg/dem/SnapshotEngine.cpp.o CMakeFiles/yade.dir/pkg/dem/MortarMat.cpp.o CMakeFiles/yade.dir/pkg/dem/L3Geom.cpp.o CMakeFiles/yade.dir/pkg/dem/KinemSimpleShearBox.cpp.o CMakeFiles/yade.dir/pkg/dem/RockLiningGlobal.cpp.o CMakeFiles/yade.dir/pkg/dem/NewtonIntegrator.cpp.o CMakeFiles/yade.dir/pkg/dem/SpherePack.cpp.o CMakeFiles/yade.dir/pkg/dem/PeriIsoCompressor.cpp.o CMakeFiles/yade.dir/pkg/dem/WirePM.cpp.o CMakeFiles/yade.dir/pkg/dem/HertzMindlin.cpp.o CMakeFiles/yade.dir/pkg/dem/Polyhedra_support.cpp.o CMakeFiles/yade.dir/pkg/dem/UnbalancedForceCallbacks.cpp.o CMakeFiles/yade.dir/pkg/dem/CohesiveTriaxialTest.cpp.o CMakeFiles/yade.dir/pkg/dem/RungeKuttaCashKarp54Integrator.cpp.o CMakeFiles/yade.dir/pkg/dem/Polyhedra_Ig2.cpp.o CMakeFiles/yade.dir/pkg/dem/KnKsLaw.cpp.o CMakeFiles/yade.dir/pkg/dem/Tetra.cpp.o CMakeFiles/yade.dir/pkg/dem/Lubrication.cpp.o CMakeFiles/yade.dir/pkg/dem/Ig2_Box_Sphere_ScGeom.cpp.o CMakeFiles/yade.dir/pkg/dem/Shop_02.cpp.o CMakeFiles/yade.dir/pkg/dem/FlatGridCollider.cpp.o CMakeFiles/yade.dir/pkg/lbm/LBMnode.cpp.o CMakeFiles/yade.dir/pkg/lbm/HydrodynamicsLawLBM.cpp.o CMakeFiles/yade.dir/pkg/pfv/DummyFlowEngine.cpp.o CMakeFiles/yade.dir/pkg/pfv/DFNFlow.cpp.o CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o CMakeFiles/yade.dir/pkg/pfv/TwoPhaseFlowEngine.cpp.o CMakeFiles/yade.dir/pkg/pfv/PeriodicFlowEngine.cpp.o CMakeFiles/yade.dir/pkg/pfv/SoluteFlowEngine.cpp.o CMakeFiles/yade.dir/pkg/pfv/UnsaturatedEngine.cpp.o CMakeFiles/yade.dir/pkg/common/SpatialQuickSortCollider.cpp.o CMakeFiles/yade.dir/pkg/common/PFacet.cpp.o CMakeFiles/yade.dir/pkg/common/SPHEngine.cpp.o CMakeFiles/yade.dir/pkg/common/Gl1_Primitives.cpp.o CMakeFiles/yade.dir/pkg/common/ResetRandomPosition.cpp.o CMakeFiles/yade.dir/pkg/common/InteractionLoop.cpp.o CMakeFiles/yade.dir/pkg/common/Facet.cpp.o CMakeFiles/yade.dir/pkg/common/Wall.cpp.o CMakeFiles/yade.dir/pkg/common/ForceEngine.cpp.o CMakeFiles/yade.dir/pkg/common/GravityEngines.cpp.o CMakeFiles/yade.dir/pkg/common/HydroForceEngine.cpp.o CMakeFiles/yade.dir/pkg/common/Collider.cpp.o CMakeFiles/yade.dir/pkg/common/Bo1_Aabb.cpp.o CMakeFiles/yade.dir/pkg/common/Gl1_NormPhys.cpp.o CMakeFiles/yade.dir/pkg/common/Dispatching.cpp.o CMakeFiles/yade.dir/pkg/common/Cylinder.cpp.o CMakeFiles/yade.dir/pkg/common/Grid.cpp.o CMakeFiles/yade.dir/pkg/common/MatchMaker.cpp.o CMakeFiles/yade.dir/pkg/common/Gl1_PotentialParticle.cpp.o CMakeFiles/yade.dir/pkg/common/ParallelEngine.cpp.o CMakeFiles/yade.dir/pkg/common/Grid_GUI.cpp.o CMakeFiles/yade.dir/pkg/common/Gl1_PotentialBlock.cpp.o CMakeFiles/yade.dir/pkg/common/InsertionSortCollider.cpp.o CMakeFiles/yade.dir/pkg/common/common.cpp.o CMakeFiles/yade.dir/pkg/common/OpenGLRenderer.cpp.o CMakeFiles/yade.dir/pkg/common/KinematicEngines.cpp.o CMakeFiles/yade.dir/pkg/common/PersistentTriangulationCollider.cpp.o CMakeFiles/yade.dir/pkg/common/ZECollider.cpp.o CMakeFiles/yade.dir/pkg/common/Gl1_PFacet.cpp.o CMakeFiles/yade.dir/lib/base/Math.cpp.o CMakeFiles/yade.dir/lib/factory/ClassFactory.cpp.o CMakeFiles/yade.dir/lib/factory/DynLibManager.cpp.o CMakeFiles/yade.dir/lib/serialization/Serializable.cpp.o CMakeFiles/yade.dir/lib/pyutil/gil.cpp.o CMakeFiles/yade.dir/core/main/pyboot.cpp.o CMakeFiles/yade.dir/lib/opengl/GLUtils.cpp.o CMakeFiles/yade.dir/lib/triangulation/TriaxialState.cpp.o CMakeFiles/yade.dir/lib/triangulation/Timer.cpp.o CMakeFiles/yade.dir/lib/triangulation/KinematicLocalisationAnalyser.cpp.o CMakeFiles/yade.dir/lib/triangulation/Tenseur3.cpp.o CMakeFiles/yade.dir/lib/triangulation/basicVTKwritter.cpp.o CMakeFiles/yade.dir/lib/computational-geometry/MarchingCube.cpp.o CMakeFiles/yade.dir/yade_automoc.cpp.o -lboost_python -lboost_thread -lboost_filesystem -lboost_iostreams -lboost_regex -lboost_serialization -lboost_system -lboost_date_time -lboost_chrono -lboost_atomic -lpthread -lpython2.7 /usr/local/lib/libbz2.a -lz -lCGAL -lgmp -lgmpxx -lcholmod -lamd -lcamd -lcolamd -lccolamd -lopenblas -lmetis -lgl2ps -lopenblas -llapack -lClp -lOsiClp -lCoinUtils -lopenblas -llapack -lrt -lz -ljpeg -lpng -ltiff /usr/lib/x86_64-linux-gnu/libvtkIOXML-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkIOGeometry-6.2.so.6.2.0 -ljsoncpp /usr/lib/x86_64-linux-gnu/libvtkIOXMLParser-6.2.so.6.2.0 -lexpat /usr/lib/x86_64-linux-gnu/libvtkRenderingCore-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonColor-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkFiltersExtraction-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkFiltersStatistics-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkImagingFourier-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkalglib-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkFiltersGeometry-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkFiltersSources-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkImagingGeneral-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkImagingSources-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkImagingHybrid-6.2.so.6.2.0 gui/lib/x86_64-linux-gnu/_GLViewer.so -lglut -lXmu -lXi -lQGLViewer -lmetis -lClp -lOsiClp -lCoinUtils -lrt -ljpeg -lpng -ltiff -ljsoncpp -lexpat /usr/lib/x86_64-linux-gnu/libvtkFiltersGeneral-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkFiltersCore-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonComputationalGeometry-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkIOImage-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkDICOMParser-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkIOCore-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkmetaio-6.2.so.6.2.0 -lz /usr/lib/x86_64-linux-gnu/libvtkImagingCore-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonExecutionModel-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonDataModel-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonMisc-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonSystem-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtksys-6.2.so.6.2.0 -ldl /usr/lib/x86_64-linux-gnu/libvtkCommonTransforms-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonMath-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libvtkCommonCore-6.2.so.6.2.0 /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.5.1 /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5.5.1 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.5.1 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.5.1 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.5.1 -lGLU -lGL -lGLU -lGL -lboost_python -lboost_thread -lboost_filesystem -lboost_iostreams -lboost_regex -lboost_serialization -lboost_system -lboost_date_time -lboost_chrono -lboost_atomic -lpthread -lpython2.7 -lgl2ps -lglut -lXmu -lXi -lQGLViewer -Wl,-rpath,/home/yufan/myYade/build/gui/lib/x86_64-linux-gnu::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libbz2.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/yade.dir/build.make:4363: recipe for target 'lib/x86_64-linux-gnu/libyade.so' failed
make[2]: *** [lib/x86_64-linux-gnu/libyade.so] Error 1
make[2]: Leaving directory '/home/yufan/myYade/build'
CMakeFiles/Makefile2:171: recipe for target 'CMakeFiles/yade.dir/all' failed
make[1]: *** [CMakeFiles/yade.dir/all] Error 2
make[1]: Leaving directory '/home/yufan/myYade/build'
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Could you help me to point out the problem and give any advice?
Thank you in advance!

Jan Stránský (honzik) said : #6

> There was no change about the error after typing "make VERBOSE=ON".
>
> /usr/bin/c++ -fPIC ...

the point was that now it is clear that -fPIC was used

why you want to build Yade 2018.02b from source?

A solution **could** be to use a newer version of Ubuntu (with no guarantee of success and all the disadvantages of system upgraging).

cheers
Jan

Hi, please try to build again in a new folder and show the output of cmake this time.
Bruno

YUFAN ZHAO (zhao90215) said : #8

@Jan

Thank you very much.

 >A solution **could** be to use a newer version of Ubuntu (with no guarantee of success and all the disadvantages of system upgrading).

Actually, I tried to install 2019 at first, but I encountered the problem that I described above. Then I turned to a different version (2018.02b) and the same problem occurred.

YUFAN ZHAO (zhao90215) said : #9

@Bruno

>please try to build again in a new folder and show the output of cmake this time.

Thanks very much for your response. I built again into another folder and the info. is shown as below:

root@yufan-virtual-machine:/home/yufan/Yade/Building# cmake -DCMAKE_INSTALL_PREFIX=../Installation ../Source -DENABLE_POTENTIAL_BLOCKS=1 -DENABLE_POTENTIAL_PARTICLES=1 -DENABLE_DEFORM=1 -DCHOLMOD_GPU=1 -DENABLE_SPH=1 -DENABLE_LIQMIGRATION=1 -DENABLE_MASK_ARBITRARY=1 -DENABLE_PROFILING=1
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.7")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Version is set to 2019.01a
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Found GL2PS: /usr/lib/libgl2ps.so
-- Found CGAL: /usr/include, /usr/lib/x86_64-linux-gnu/libCGAL.so
-- Found NumPy: version "1.11.0" /usr/lib/python2.7/dist-packages/numpy/core/include
-- Found Loki: /usr/include
-- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0
-- GCC Version >= 4.8. Adding -save-temps
-- GCC Version >= 4.9. Adding -fstack-protector-strong
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- python
-- thread
-- filesystem
-- iostreams
-- regex
-- serialization
-- system
-- date_time
-- chrono
-- atomic
-- Boost_VERSION: 105800
-- Boost_LIB_VERSION: 1_58
-- Boost_INCLUDE_DIRS: /usr/include
-- Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_python.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_iostreams.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_serialization.so/usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
-- Found BZip2: /usr/local/lib/libbz2.a (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.12")
-- Found Eigen3, version: 3.2.92
-- Disable vectorization
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- Found VTK
-- Found OpenMP
-- GTS using gts-config /usr/bin/gts-config
-- Using GTS from /usr
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0 /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- Found GTS
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so
-- USE QT5
-- Found QGLVIEWER-qt5: /usr/include/QGLViewer
-- Found GUI-Qt5-LIBS
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found GMP: /usr/include/x86_64-linux-gnu
-- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so
-- Found CGAL
-- SuiteSparse version 4.4.6 found, CHOLMOD direct solver for CPU activated.
-- Found Cholmod: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found OpenBlas: /usr/lib/libopenblas.so
-- Found Metis: /usr/include
-- Found Cholmod in /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found OpenBlas in /usr/lib/libopenblas.so
-- Found Metis in /usr/lib/x86_64-linux-gnu/libmetis.so
-- Could NOT find CuBlas (missing: CUBLAS_LIBRARY CUDART_LIBRARY)
-- Found Lapack: /usr/lib/liblapack.so
-- Missing dependency for CHOLMOD_GPU, disabled
-- Found GL2PS
LBMFLOW is still experimental, building and running LBM engine are at your own risk!
MASK_ARBITRARY_SIZE = 256
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- Found OpenBlas
-- Found Lapack
-- Found CLP: /usr/include/coin, /usr/lib/x86_64-linux-gnu/libClp.so
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Found CLP
Yade will be installed to /home/yufan/Yade/Installation
-- Suffix is set to -2019.01a
-- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu
-- runtimePREFIX is set to /home/yufan/Yade/Installation
-- Found gts: /usr/lib/python2.7/dist-packages/gts
-- Use system gts version
-- Found minieigen: /usr/lib/python2.7/dist-packages/minieigen.so
-- Found Tkinter: /usr/lib/python2.7/lib-tk/Tkinter.pyc
-- VTK version >5 and <8 is found
-- ===========================================================
-- Yade configured with following features: Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW LINSOLV TWOPHASEFLOW SPH DEFORM LIQMIGRATION GL2PS LBMFLOW MASK_ARBITRARY PROFILING PotentialParticles PotentialBlocks
-- Disabled features: CHOLMOD_GPU THERMAL
-- Optimized build
-- ===========================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yufan/Yade/Building

Is there any issue reflected from the above output that would be related to the problem?
Thanks for your concerning!

YUFAN ZHAO (zhao90215) said : #10

@Bruno Chareyre @Jan Stránský

I want to provide additional information that the Ubuntu is running through a Vmware (virtual machine).
Is it correlated with the problem?

Jan Stránský (honzik) said : #11

> Actually, I tried to install 2019 at first, but I encountered the problem that I described above. Then I turned to a different version (2018.02b) and the same problem occurred.

my note was about trying different version of **operating system**, not Yade. In your case, you have quite new Yade version running on quite old Ubuntu. There could be some mismatch with used libraries (new Yade expecting something which is not present yet on the system).
The problem is, that nobody will happy to trying this case, not saying about fixing the issue..

cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask YUFAN ZHAO for more information if necessary.

To post a message you must log in.