Home › Forum › SOFA › Building SOFA › [SOLVED] Error building SOFA : ConstraintResolution.h not found
Tagged: building, ConstraintResolution.h, GCC, Linux_ubuntu, ninja, SOFA_2012
- This topic has 4 replies, 2 voices, and was last updated 3 years, 8 months ago by Mathieu.
-
AuthorPosts
-
10 March 2021 at 10:38 #18833MathieuBlocked
Hello,
I try to build SOFA on a Ubuntu 18.04 VM using ninja, but I get a message error regarding a file named ConstraintResolution.h. Here is a copy of the error:
(base) srl@ubuntu:~/sofa/build/v20.12$ ninja [47/79] Building CXX object external_directories/S...t/constraint/PartialRigidificationConstraint.cpp.o FAILED: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp.o /usr/bin/g++ -DNDEBUG -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DSOFA_BUILD_SOFTROBOTS -DSoftRobots_EXPORTS -I/home/srl/sofa-plugins/SoftRobots/src -Iinclude -Iinclude/SoftRobots -I/home/srl/sofa/src/SofaKernel/modules/SofaCore/src -Iinclude/SofaFramework -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/src -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/../SofaSimulationCore/src -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/../SofaDefaultType/src -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/../SofaCore/src -Iinclude/GTest -I/home/srl/sofa/src/SofaKernel/modules/SofaDefaultType/src -I/home/srl/sofa/src/modules/SofaConstraint/src -Iinclude/SofaConstraint -I/home/srl/sofa/src/SofaKernel/modules/SofaMeshCollision/src -Iinclude/SofaMeshCollision -I/home/srl/sofa/src/SofaKernel/modules/SofaObjectInteraction/src -Iinclude/SofaObjectInteraction -I/home/srl/sofa/src/SofaKernel/modules/SofaDeformable/src -Iinclude/SofaDeformable -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseTopology/src -Iinclude/SofaBaseTopology -I/home/srl/sofa/src/SofaKernel/modules/SofaSimulationCommon/.. -Iinclude/SofaSimulation -I/home/srl/sofa/src/SofaKernel/modules/SofaSimulationCore/src -I/home/srl/sofa/src/SofaKernel/modules/SofaEigen2Solver/src -Iinclude/SofaEigen2Solver -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseLinearSolver/src -Iinclude/SofaBaseLinearSolver -I/home/srl/sofa/src/SofaKernel/modules/SofaRigid/src -Iinclude/SofaRigid -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseMechanics/src -Iinclude/SofaBaseMechanics -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseCollision/src -Iinclude/SofaBaseCollision -I/home/srl/sofa/src/SofaKernel/modules/SofaSimpleFem/src -Iinclude/SofaSimpleFem -I/home/srl/sofa/src/SofaKernel/modules/SofaImplicitOdeSolver/src -Iinclude/SofaImplicitOdeSolver -I/home/srl/sofa/src/modules/SofaUserInteraction/src -Iinclude/SofaUserInteraction -I/home/srl/sofa/src/modules/SofaGeneralMeshCollision/src -Iinclude/SofaGeneralMeshCollision -I/home/srl/sofa/src/modules/SofaGeneralVisual/src -Iinclude/SofaGeneralVisual -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseVisual/src -Iinclude/SofaBaseVisual -I/home/srl/sofa/src/modules/SofaTopologyMapping/src -Iinclude/SofaTopologyMapping -I/home/srl/sofa/src/modules/SofaGeneralTopology/src -Iinclude/SofaGeneralTopology -I/home/srl/sofa/src/modules/SofaGeneralSimpleFem/src -Iinclude/SofaGeneralSimpleFem -I/home/srl/sofa/src/modules/SofaBoundaryCondition/src -Iinclude/SofaBoundaryCondition -I/home/srl/sofa/src/modules/SofaGraphComponent/src -Iinclude/SofaGraphComponent -I/home/srl/sofa/src/SofaKernel/modules/SofaSimulationTree/.. -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseUtils/src -Iinclude/SofaBaseUtils -I/home/srl/sofa/src/modules/SofaMiscMapping/src -Iinclude/SofaMiscMapping -I/home/srl/sofa/src/modules/SofaSparseSolver/src -Iinclude/SofaSparseSolver -I/home/srl/sofa/src/modules/SofaGeneralLinearSolver/src -Iinclude/SofaGeneralLinearSolver -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/metis-5.1.0/GKlib -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/metis-5.1.0/libmetis -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/metis-5.1.0/include -Iinclude/Metis -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/csparse/.. -Iinclude/CSparse -I/home/srl/sofa/src/SofaKernel/modules/SofaEngine/src -Iinclude/SofaEngine -isystem /home/srl/sofa/src/SofaKernel/extlibs/json -isystem /home/srl/sofa/src/extlibs/gtest/include -isystem /usr/include/eigen3 -isystem /home/srl/sofa/src/modules/SofaSparseSolver/extlibs/csparse -isystem /home/srl/Qt/5.15.2/gcc_64/include -isystem /home/srl/Qt/5.15.2/gcc_64/include/QtNetwork -isystem /home/srl/Qt/5.15.2/gcc_64/include/QtCore -isystem /home/srl/Qt/5.15.2/gcc_64/./mkspecs/linux-g++ -Wall -W -Wno-padded -O3 -DNDEBUG -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DSOFA_BUILD_SOFTROBOTS -DFRAMEWORK_TEST_RESOURCES_DIR=\"/home/srl/sofa/src/SofaKernel/SofaFramework/resources/tests\" -pthread -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -fPIC -std=gnu++1z -MD -MT external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp.o -MF external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp.o.d -o external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp.o -c /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp In file included from /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/PartialRigidificationConstraint.inl:34:0, from /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/PartialRigidificationConstraint.cpp:31: /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/PartialRigidificationConstraint.h:35:10: fatal error: sofa/core/behavior/ConstraintResolution.h: No such file or directory #include <sofa/core/behavior/ConstraintResolution.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [48/79] Building CXX object external_directories/S...mponent/constraint/SurfacePressureConstraint.cpp.o FAILED: external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o /usr/bin/g++ -DNDEBUG -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DSOFA_BUILD_SOFTROBOTS -DSoftRobots_EXPORTS -I/home/srl/sofa-plugins/SoftRobots/src -Iinclude -Iinclude/SoftRobots -I/home/srl/sofa/src/SofaKernel/modules/SofaCore/src -Iinclude/SofaFramework -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/src -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/../SofaSimulationCore/src -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/../SofaDefaultType/src -I/home/srl/sofa/src/SofaKernel/modules/SofaHelper/../SofaCore/src -Iinclude/GTest -I/home/srl/sofa/src/SofaKernel/modules/SofaDefaultType/src -I/home/srl/sofa/src/modules/SofaConstraint/src -Iinclude/SofaConstraint -I/home/srl/sofa/src/SofaKernel/modules/SofaMeshCollision/src -Iinclude/SofaMeshCollision -I/home/srl/sofa/src/SofaKernel/modules/SofaObjectInteraction/src -Iinclude/SofaObjectInteraction -I/home/srl/sofa/src/SofaKernel/modules/SofaDeformable/src -Iinclude/SofaDeformable -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseTopology/src -Iinclude/SofaBaseTopology -I/home/srl/sofa/src/SofaKernel/modules/SofaSimulationCommon/.. -Iinclude/SofaSimulation -I/home/srl/sofa/src/SofaKernel/modules/SofaSimulationCore/src -I/home/srl/sofa/src/SofaKernel/modules/SofaEigen2Solver/src -Iinclude/SofaEigen2Solver -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseLinearSolver/src -Iinclude/SofaBaseLinearSolver -I/home/srl/sofa/src/SofaKernel/modules/SofaRigid/src -Iinclude/SofaRigid -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseMechanics/src -Iinclude/SofaBaseMechanics -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseCollision/src -Iinclude/SofaBaseCollision -I/home/srl/sofa/src/SofaKernel/modules/SofaSimpleFem/src -Iinclude/SofaSimpleFem -I/home/srl/sofa/src/SofaKernel/modules/SofaImplicitOdeSolver/src -Iinclude/SofaImplicitOdeSolver -I/home/srl/sofa/src/modules/SofaUserInteraction/src -Iinclude/SofaUserInteraction -I/home/srl/sofa/src/modules/SofaGeneralMeshCollision/src -Iinclude/SofaGeneralMeshCollision -I/home/srl/sofa/src/modules/SofaGeneralVisual/src -Iinclude/SofaGeneralVisual -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseVisual/src -Iinclude/SofaBaseVisual -I/home/srl/sofa/src/modules/SofaTopologyMapping/src -Iinclude/SofaTopologyMapping -I/home/srl/sofa/src/modules/SofaGeneralTopology/src -Iinclude/SofaGeneralTopology -I/home/srl/sofa/src/modules/SofaGeneralSimpleFem/src -Iinclude/SofaGeneralSimpleFem -I/home/srl/sofa/src/modules/SofaBoundaryCondition/src -Iinclude/SofaBoundaryCondition -I/home/srl/sofa/src/modules/SofaGraphComponent/src -Iinclude/SofaGraphComponent -I/home/srl/sofa/src/SofaKernel/modules/SofaSimulationTree/.. -I/home/srl/sofa/src/SofaKernel/modules/SofaBaseUtils/src -Iinclude/SofaBaseUtils -I/home/srl/sofa/src/modules/SofaMiscMapping/src -Iinclude/SofaMiscMapping -I/home/srl/sofa/src/modules/SofaSparseSolver/src -Iinclude/SofaSparseSolver -I/home/srl/sofa/src/modules/SofaGeneralLinearSolver/src -Iinclude/SofaGeneralLinearSolver -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/metis-5.1.0/GKlib -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/metis-5.1.0/libmetis -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/metis-5.1.0/include -Iinclude/Metis -I/home/srl/sofa/src/modules/SofaSparseSolver/extlibs/csparse/.. -Iinclude/CSparse -I/home/srl/sofa/src/SofaKernel/modules/SofaEngine/src -Iinclude/SofaEngine -isystem /home/srl/sofa/src/SofaKernel/extlibs/json -isystem /home/srl/sofa/src/extlibs/gtest/include -isystem /usr/include/eigen3 -isystem /home/srl/sofa/src/modules/SofaSparseSolver/extlibs/csparse -isystem /home/srl/Qt/5.15.2/gcc_64/include -isystem /home/srl/Qt/5.15.2/gcc_64/include/QtNetwork -isystem /home/srl/Qt/5.15.2/gcc_64/include/QtCore -isystem /home/srl/Qt/5.15.2/gcc_64/./mkspecs/linux-g++ -Wall -W -Wno-padded -O3 -DNDEBUG -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -DSOFA_BUILD_SOFTROBOTS -DFRAMEWORK_TEST_RESOURCES_DIR=\"/home/srl/sofa/src/SofaKernel/SofaFramework/resources/tests\" -pthread -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -fPIC -std=gnu++1z -MD -MT external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o -MF external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o.d -o external_directories/SoftRobots/CMakeFiles/SoftRobots.dir/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp.o -c /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp In file included from /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/SurfacePressureConstraint.inl:34:0, from /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/SurfacePressureConstraint.cpp:31: /home/srl/sofa-plugins/SoftRobots/src/SoftRobots/component/constraint/SurfacePressureConstraint.h:38:10: fatal error: sofa/core/behavior/ConstraintResolution.h: No such file or directory #include <sofa/core/behavior/ConstraintResolution.h> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [49/79] Linking CXX executable bin/SofaMiscFem_test ninja: build stopped: subcommand failed.
Can anyone help me with this ?
Thank you in advance,
Mathieu12 March 2021 at 11:54 #18846GuillaumeKeymasterHi Mathieu,
Could you make sure that
/home/srl/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/behavior/ConstraintResolution.h
exists?If yes, please paste here your CMakeCache.txt (located in the build directory).
Thanks,
Guillaume.12 March 2021 at 12:24 #18847MathieuBlockedHi Guillaume,
The file
/home/srl/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/behavior/ConstraintResolution.h
does not exist! Here a list of the files contained in this folder:
(base) srl@ubuntu:~/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/behavior$ ls BaseAnimationLoop.cpp BaseAnimationLoop.h BaseConstraintCorrection.cpp BaseConstraintCorrection.h BaseConstraint.cpp BaseConstraint.h BaseConstraintSet.cpp BaseConstraintSet.h BaseController.h BaseForceField.cpp BaseForceField.h BaseInteractionConstraint.h BaseInteractionForceField.cpp BaseInteractionForceField.h BaseInteractionProjectiveConstraintSet.h BaseLMConstraint.cpp BaseLMConstraint.h BaseMass.cpp BaseMass.h BaseMechanicalState.cpp BaseMechanicalState.h BaseProjectiveConstraintSet.cpp BaseProjectiveConstraintSet.h BaseRotationFinder.h BaseVectorOperations.h ConstraintCorrection.cpp ConstraintCorrection.h ConstraintCorrection.inl Constraint.cpp Constraint.h Constraint.inl ConstraintSolver.cpp ConstraintSolver.h ForceField.cpp ForceField.h ForceField.inl InertiaForce.h LinearSolver.cpp LinearSolver.h LMConstraint.cpp LMConstraint.h LMConstraint.inl Mass.cpp Mass.h Mass.inl MechanicalState.cpp MechanicalState.h MixedInteractionConstraint.cpp MixedInteractionConstraint.h MixedInteractionConstraint.inl MixedInteractionForceField.cpp MixedInteractionForceField.h MixedInteractionForceField.inl MultiMatrixAccessor.cpp MultiMatrixAccessor.h MultiMatrix.cpp MultiMatrix.h MultiVec.h OdeSolver.cpp OdeSolver.h PairInteractionConstraint.cpp PairInteractionConstraint.h PairInteractionConstraint.inl PairInteractionForceField.cpp PairInteractionForceField.h PairInteractionForceField.inl PairInteractionProjectiveConstraintSet.cpp PairInteractionProjectiveConstraintSet.h PairInteractionProjectiveConstraintSet.inl ProjectiveConstraintSet.cpp ProjectiveConstraintSet.h ProjectiveConstraintSet.inl RotationFinder.h RotationMatrix.h
What should I do now ? Create/copy this file ?
Do you still need the CMakeCache.txt file?Thank you for your help,
Mathieu12 March 2021 at 17:00 #18848GuillaumeKeymasterThe file is new, it was added in SOFA master by #1847.
You have 2 solutions:
– Keep your SOFA on v20.12 branch and switch SoftRobots to its v20.12 branch.
OR
– Switch your SOFA to master branch and keep SoftRobots on its master branch.Hope that helps,
Guillaume.15 March 2021 at 07:25 #18849MathieuBlockedOption 1, i.e. using the v20.12 for SOFA and Softrobots work fine for me.
Thank you for your help! -
AuthorPosts
- You must be logged in to reply to this topic.