Home › Forum › SOFA › Getting Started › [SOLVED] Problem in installing STlib
Tagged: 64_bits, Linux_ubuntu, Plugin_SoftRobots, SOFA_1912, Soft robot Plugin, STlib
- This topic has 8 replies, 3 voices, and was last updated 4 years, 4 months ago by
Amir.
-
AuthorPosts
-
23 April 2020 at 08:46 #15914
Amir
BlockedHello
I tried to add Softrobot Plugin as you explained in the before comments:
1-download Softrobot Plugin fromgit clone https://github.com/SofaDefrost/SoftRobots
2-make a separate folder “plugin” outside src and put the downloaded file there
3-add the path of separate plugin folder to SOFA EXTERNAL DIRECTORIES
4-and configure Cmake GUI
But after configuration I found this warning message in Cmake log:-- -- The highly recommended 'STLIB' plugin is missing. You can compile SoftRobots but most of the provided examples will not work.
So as the message said I couldn’t open any example of this plugin
Now I added STLIB as an external directory to fix the problem and added the plugin at the same time. But when I want to compile again with ninja
it gets error: /usr/bin/ld: cannot find -lSofaComponentCommon
So Please let me know your thoughts23 April 2020 at 19:36 #15935Hugo
KeymasterHi @amir
With both STLIB and SoftRobot, what was the full output of CMake?
What was the full error (before/usr/bin/ld: cannot find -lSofaComponentCommon
)Hugo
24 April 2020 at 10:01 #15940Amir
BlockedDear @Hugo
I add these two addresses to external directory together
/home/user/sofa/STLIB;/home/user/sofa/plugins
and turning plugin_sofapython onthis is the output of Cmake after configuration and generation:
Adding module SofaPreconditioner Adding module SofaHaptics Adding module SofaOpenglVisual Adding plugin CImgPlugin CImgPlugin: TIFF Image Format enabled CImgPlugin: JPEG Image Format enabled CImgPlugin: PNG Image Format enabled Adding plugin SofaMiscCollision SofaMiscModule: build all maintained sofa components. SofaMiscCollision: optional dependency SofaSphFluid not found de-activing: <SpatialGridPointModel> -- PSL is an experimental feature, use it at your own risk. Adding application runSofa Write Plugin list at /home/amir/sofa/build/lib/plugin_list.conf.default Adding external directory: STLIB (/home/amir/sofa/STLIB) Install prefix: /home/amir/sofa/build/install Adding external directory: plugins (/home/amir/sofa/plugins) Install prefix: /home/amir/sofa/build/install -- Found dependency : 'STLIB' plugin . Configuring done Generating done
it seems everything is ok in Cmake
this is the output after compiling with ninja:
[13/13] Linking CXX executable bin/SoftRobots_test FAILED: : && /usr/bin/g++ -Wall -W -O3 -DNDEBUG -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -rdynamic external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/constraint/SurfacePressureConstraintTest.cpp.o external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/constraint/UnilateralPlaneConstraintTest.cpp.o external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/controller/AnimationEditorTest.cpp.o external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/controller/DataVariationLimiterTest.cpp.o external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/controller/SerialPortBridgeGenericTest.cpp.o external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/engine/VolumeFromTrianglesTest.cpp.o external_directories/plugins/tests/CMakeFiles/SoftRobots_test.dir/component/engine/VolumeFromTetrahedronsTest.cpp.o -o bin/SoftRobots_test -Wl,-rpath,/home/amir/sofa/build/lib:/home/amir/Qt/5.14.2/gcc_64/lib lib/libSofaTest.so.0.1 lib/libSofaGTestMain.a lib/libSoftRobots.so.1.0 -lSofaComponentCommon lib/libSceneCreator.so.0.1 lib/libSofaSimulationGraph.so.20.06.99 lib/libSofaPython.so.0.1 lib/libSofaGuiCommon.so.20.06.99 lib/libSofaComponentAll.so.1.0 lib/libSofaBase.so.20.06.99 lib/libSofaCommon.so.20.06.99 lib/libSofaEngine.so.20.06.99 lib/libSofaExplicitOdeSolver.so.20.06.99 lib/libSofaGeneral.so.20.06.99 lib/libSofaConstraint.so.20.06.99 lib/libSofaImplicitOdeSolver.so.20.06.99 lib/libSofaUserInteraction.so.20.06.99 lib/libSofaGeneralRigid.so.20.06.99 lib/libSofaGeneralVisual.so.20.06.99 lib/libSofaBaseVisual.so.20.06.99 lib/libSofaGraphComponent.so.20.06.99 lib/libSofaBaseUtils.so.20.06.99 lib/libSofaGeneralAnimationLoop.so.20.06.99 lib/libSofaGeneralDeformable.so.20.06.99 lib/libSofaGeneralExplicitOdeSolver.so.20.06.99 lib/libSofaGeneralImplicitOdeSolver.so.20.06.99 lib/libSofaGeneralLinearSolver.so.20.06.99 lib/libSofaGeneralObjectInteraction.so.20.06.99 lib/libSofaGeneralEngine.so.20.06.99 lib/libSofaValidation.so.20.06.99 lib/libSofaLoader.so.20.06.99 lib/libSofaGeneralLoader.so.20.06.99 /usr/lib/x86_64-linux-gnu/libz.so lib/libSofaAdvanced.so.20.06.99 lib/libSofaMisc.so.20.06.99 lib/libSofaMiscExtra.so.20.06.99 lib/libSofaGeneralMeshCollision.so.20.06.99 lib/libSofaMeshCollision.so.20.06.99 lib/libSofaBaseCollision.so.20.06.99 lib/libSofaObjectInteraction.so.20.06.99 lib/libSofaTopologyMapping.so.20.06.99 lib/libSofaMiscEngine.so.20.06.99 lib/libSofaNonUniformFem.so.20.06.99 lib/libSofaGeneralSimpleFem.so.20.06.99 lib/libSofaDenseSolver.so.20.06.99 lib/libSofaMiscFem.so.20.06.99 lib/libnewmat.a lib/libSofaMiscForceField.so.20.06.99 lib/libSofaDeformable.so.20.06.99 lib/libSofaBoundaryCondition.so.20.06.99 lib/libSofaEigen2Solver.so.20.06.99 lib/libSofaBaseLinearSolver.so.20.06.99 lib/libSofaGeneralTopology.so.20.06.99 lib/libSofaMiscSolver.so.20.06.99 lib/libSofaSimulationTree.so.20.06.99 lib/libSofaMiscTopology.so.20.06.99 /usr/lib/x86_64-linux-gnu/libz.so -lpython2.7 lib/libSofaMiscMapping.so.20.06.99 lib/libSofaRigid.so.20.06.99 lib/libSofaBaseMechanics.so.20.06.99 lib/libSofaSimpleFem.so.20.06.99 lib/libSofaBaseTopology.so.20.06.99 lib/libSofaSimulationCommon.so.20.06.99 lib/libSofaSimulationCore.so.20.06.99 lib/libSofaCore.so.20.06.99 lib/libSofaDefaultType.so.20.06.99 lib/libSofaHelper.so.20.06.99 lib/libgtest.so.2.6.2 /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLEW.so /usr/lib/x86_64-linux-gnu/libboost_filesystem.so /usr/lib/x86_64-linux-gnu/libboost_program_options.so /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_chrono.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_atomic.so -pthread /home/amir/Qt/5.14.2/gcc_64/lib/libQt5Network.so.5.14.2 /home/amir/Qt/5.14.2/gcc_64/lib/libQt5Core.so.5.14.2 -Wl,-rpath-link,/home/amir/sofa/build/lib && : /usr/bin/ld: cannot find -lSofaComponentCommon collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
26 April 2020 at 11:41 #15947Hugo
KeymasterHi @amir
I guess you are using both SOFA and SoftRobot (recent) source version, are you?
If so, could you try to add at line 223 of the CMakeList.txt at the root of the SoftRobot plugin: SofaComponentCommon to the list of target_link_libraries ?Hugo
26 April 2020 at 14:54 #15949Amir
BlockedDear @Hugo
Thank you, As you told I added the SofaComponentCommon but after compile, the error is not solved:-- Build files have t written to: /home/amir/sofa/build [13/15] Linking CXX shared library lib/libSoftRobots.so.1.0 FAILED: : && /usr/bin/g++ -fPIC -Wall -W -O3 -DNDEBUG -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wl,--no-undefined -lc -shared -Wl,-soname,libSoftRobots.so.1.0 -o lib/libSoftRobots.so.1.0 external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/initSoftRobots.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/behavior/SoftRobotsBaseConstraint.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/behavior/SoftRobotsConstraint.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/CableConstraint.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/UnilateralPlaneConstraint.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/model/CableModel.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/model/SurfacePressureModel.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/AnimationEditor.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/DataVariationLimiter.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/InteractiveControl.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/modules/Network.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/modules/SplitFloat.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/modules/Serial.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/controller/SerialPortBridgeGeneric.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/engine/CenterOfMass.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/engine/VolumeFromTriangles.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/engine/VolumeFromTetrahedrons.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/forcefield/PartialRigidificationForceField.cpp.o external_directories/plugins/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/forcefield/PipeForceField.cpp.o -Wl,-rpath,/home/amir/Qt/5.14.2/gcc_64/lib:/home/amir/sofa/build/lib: -lSofaComponentCommon /home/amir/Qt/5.14.2/gcc_64/lib/libQt5Network.so.5.14.2 lib/libSofaPython.so.0.1 /home/amir/Qt/5.14.2/gcc_64/lib/libQt5Core.so.5.14.2 lib/libSofaGuiCommon.so.20.06.99 lib/libSofaComponentAll.so.1.0 lib/libSofaBase.so.20.06.99 lib/libSofaCommon.so.20.06.99 lib/libSofaEngine.so.20.06.99 lib/libSofaExplicitOdeSolver.so.20.06.99 lib/libSofaAdvanced.so.20.06.99 lib/libSofaMisc.so.20.06.99 lib/libSofaMiscMapping.so.20.06.99 lib/libSofaMiscExtra.so.20.06.99 lib/libSofaMiscEngine.so.20.06.99 lib/libSofaNonUniformFem.so.20.06.99 lib/libSofaMiscFem.so.20.06.99 lib/libSofaMiscForceField.so.20.06.99 lib/libSofaMiscSolver.so.20.06.99 lib/libSofaMiscTopology.so.20.06.99 /usr/lib/x86_64-linux-gnu/libz.so lib/libSofaGeneral.so.20.06.99 lib/libSofaConstraint.so.20.06.99 lib/libSofaImplicitOdeSolver.so.20.06.99 lib/libSofaUserInteraction.so.20.06.99 lib/libSofaGeneralRigid.so.20.06.99 lib/libSofaGeneralVisual.so.20.06.99 lib/libSofaBaseVisual.so.20.06.99 lib/libSofaTopologyMapping.so.20.06.99 lib/libSofaBoundaryCondition.so.20.06.99 lib/libSofaEigen2Solver.so.20.06.99 lib/libSofaGraphComponent.so.20.06.99 lib/libSofaBaseUtils.so.20.06.99 lib/libSofaGeneralTopology.so.20.06.99 lib/libSofaGeneralAnimationLoop.so.20.06.99 lib/libSofaGeneralDeformable.so.20.06.99 lib/libSofaGeneralExplicitOdeSolver.so.20.06.99 lib/libSofaGeneralImplicitOdeSolver.so.20.06.99 lib/libSofaGeneralLinearSolver.so.20.06.99 lib/libSofaGeneralObjectInteraction.so.20.06.99 lib/libSofaGeneralSimpleFem.so.20.06.99 lib/libSofaSimpleFem.so.20.06.99 lib/libSofaGeneralEngine.so.20.06.99 lib/libSofaGeneralMeshCollision.so.20.06.99 lib/libSofaValidation.so.20.06.99 lib/libSofaMeshCollision.so.20.06.99 lib/libSofaRigid.so.20.06.99 lib/libSofaBaseMechanics.so.20.06.99 lib/libSofaObjectInteraction.so.20.06.99 lib/libSofaDeformable.so.20.06.99 lib/libSofaBaseTopology.so.20.06.99 lib/libSofaBaseCollision.so.20.06.99 lib/libSofaGeneralLoader.so.20.06.99 /usr/lib/x86_64-linux-gnu/libz.so lib/libSofaLoader.so.20.06.99 lib/libSofaSimulationTree.so.20.06.99 lib/libSofaDenseSolver.so.20.06.99 lib/libSofaBaseLinearSolver.so.20.06.99 lib/libSofaSimulationCommon.so.20.06.99 lib/libSofaSimulationCore.so.20.06.99 lib/libSofaCore.so.20.06.99 lib/libSofaDefaultType.so.20.06.99 lib/libSofaHelper.so.20.06.99 /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLEW.so /usr/lib/x86_64-linux-gnu/libboost_filesystem.so /usr/lib/x86_64-linux-gnu/libboost_program_options.so /usr/lib/x86_64-linux-gnu/libboost_thread.so /usr/lib/x86_64-linux-gnu/libboost_chrono.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_atomic.so lib/libgtest.so.2.6.2 -pthread lib/libnewmat.a -lpython2.7 -Wl,-rpath-link,/home/amir/sofa/build/lib && : /usr/bin/ld: cannot find -lSofaComponentCommon collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
26 April 2020 at 15:17 #15950Hugo
KeymasterSorry @amir
I replied without carefully checking.
A recent pull-request (#1314) removed what is called collections in SOFA, it had some impacts on the Cmake configurations. See here for SofaComponentCommon.Could you just delete your CMakeCache, reconfigure SOFA (+SoftRobot) and recompile both.
Hugo
26 April 2020 at 19:52 #15951Amir
BlockedDear @Hugo
I didn’t get it what you mean? removing SofaComponentCommon from Cmakelist and delete Cmake cache and recompile and rebuild again? if that is what you mean I did it again and the error is the same.I always recompile SOFA+Softrobot togetherMany thanks for your support
Amir26 April 2020 at 21:09 #15952jnbrunet
ModeratorHi @amir,
It seems to be the tests of SofaRobots that are failing to link.
Edit the file
SoftRobots/tests/CMakeLists.txt
, at line 26 you will find something like:target_link_libraries(${PROJECT_NAME} SofaTest SofaGTestMain SoftRobots SofaCore SofaConstraint SofaBaseMechanics SofaUserInteraction SofaComponentCommon)
Remove that
SofaComponentCommon
from there and replace it withSofaCommon
.If it solves your problem, don’t hesitate to create an issue on the github of SofaRobots
J-N
28 April 2020 at 11:11 #15967 -
AuthorPosts
- You must be logged in to reply to this topic.