Home › Forum › SOFA › Building SOFA › [SOLVED] CGAL plugin 4.7 v21.06
Tagged: AppleClang, CGAL, MacOS, SOFA_2106
- This topic has 13 replies, 2 voices, and was last updated 3 years, 2 months ago by Sidaty.
-
AuthorPosts
-
1 September 2021 at 08:33 #20266mikhailBlocked
Hi Sofa Community,
I am struggling to build the CGAL plugin in Sofa. I followed the instructions and could successfully compile CGAL4.7. However, when I am attempting to build Sofa, the CGAL plugin cannot be built. I can build Sofa – it runs perfectly but without the plugin.
I would appreciate any help!
I am working on MacOS.
[ 99%] Built target CGALPlugin_relocatable_install Consolidate compiler generated dependencies of target CGALPlugin [ 99%] Building CXX object applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/src/CGALPlugin/DecimateMesh.cpp.o In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:24: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.h:70:13: error: no template named 'Vec' typedef Vec<3,Real> Vec3; ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:181:30: error: excess elements in scalar initializer outNormals.push_back(Vec3(0, 0, 0)); ^ ~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:190:18: error: use of undeclared identifier 'cross' Vec3 z = cross(b-a, c-a); ^ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:191:10: error: member reference base type 'cgal::DecimateMesh::Vec3' (aka 'int') is not a structure or union z.normalize(); ~^~~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:200:22: error: member reference base type 'std::__1::__vector_base<int, std::__1::allocator<int>>::value_type' (aka 'int') is not a structure or union outNormals[i].normalize(); ~~~~~~~~~~~~~^~~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:261:61: error: excess elements in scalar initializer bool toBeAdded = testVertexAndFindIndex(Vec3(p.x(), p.y(), p.z()), indices[tick++]); ^ ~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:300:32: error: member reference base type 'int' is not a structure or union if ( (outVertex-vertex).norm() < 0.0000001) ~~~~~~~~~~~~~~~~~~^~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:61:5: error: cannot initialize object parameter of type 'sofa::core::DataEngine' with an expression of type 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' addInput(&d_inVertices); ^~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:37:42: note: in instantiation of member function 'cgal::DecimateMesh<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3, double>, sofa::type::Vec<3, double>, double>>::init' requested here template class SOFA_CGALPLUGIN_API cgal::DecimateMesh<Vec3Types>; ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:62:5: error: cannot initialize object parameter of type 'sofa::core::DataEngine' with an expression of type 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' addInput(&d_inTriangles); ^~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:65:5: error: cannot initialize object parameter of type 'sofa::core::DataEngine' with an expression of type 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' addOutput(&d_outVertices); ^~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:66:5: error: cannot initialize object parameter of type 'sofa::core::DataEngine' with an expression of type 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' addOutput(&d_outTriangles); ^~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:67:5: error: cannot initialize object parameter of type 'sofa::core::DataEngine' with an expression of type 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' addOutput(&d_outNormals); ^~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:69:5: error: no matching member function for call to 'setDirtyValue' setDirtyValue(); ^~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/DDGNode.h:80:18: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' to 'sofa::core::objectmodel::DDGNode' for object argument virtual void setDirtyValue(); ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/DDGNode.h:79:18: note: candidate function not viable: requires 1 argument, but 0 were provided virtual void setDirtyValue(const core::ExecParams*) final = delete; ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:77:5: error: cannot initialize object parameter of type 'sofa::core::DataEngine' with an expression of type 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types>' update(); ^~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:37:42: note: in instantiation of member function 'cgal::DecimateMesh<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3, double>, sofa::type::Vec<3, double>, double>>::reinit' requested here template class SOFA_CGALPLUGIN_API cgal::DecimateMesh<Vec3Types>; ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:89:5: error: no matching function for call to 'notMuted' msg_info() << "Initial mesh has " << d_inVertices.getValue().size() << " vertices and " << d_inTriangles.getValue().size() << " triangles." << msgendl ^~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:145:23: note: expanded from macro 'msg_info' #define msg_info(...) MSGINFO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:143:60: note: expanded from macro 'MSGINFO_CHOOSER' #define MSGINFO_CHOOSER(...) MSGINFO_CHOOSE_FROM_ARG_COUNT(MSGINFO_NO_ARG_EXPANDER __VA_ARGS__ ()) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:142:36: note: expanded from macro 'MSGINFO_NO_ARG_EXPANDER' #define MSGINFO_NO_ARG_EXPANDER() ,MSGINFO_0 ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:135:67: note: expanded from macro 'TWO_FUNC_RECOMPOSER' #define TWO_FUNC_RECOMPOSER(argsWithParentheses) TWO_FUNC_CHOOSER argsWithParentheses ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:134:41: note: expanded from macro 'TWO_FUNC_CHOOSER' #define TWO_FUNC_CHOOSER(_f1, _f2 ,...) _f2 ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:139:26: note: expanded from macro 'MSGINFO_0' #define MSGINFO_0() if( sofa::helper::logging::notMuted(this) ) oldmsg_info(this) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:37:42: note: in instantiation of member function 'cgal::DecimateMesh<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3, double>, sofa::type::Vec<3, double>, double>>::doUpdate' requested here template class SOFA_CGALPLUGIN_API cgal::DecimateMesh<Vec3Types>; ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:78:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const ComponentInfo::SPtr' (aka 'const shared_ptr<sofa::helper::logging::ComponentInfo>') for 1st argument inline bool notMuted(const ComponentInfo::SPtr&){ return true; } ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:81:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const std::string' (aka 'const basic_string<char>') for 1st argument inline bool notMuted(const std::string&){ return true; } ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:573:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const sofa::core::objectmodel::Base *' for 1st argument inline bool notMuted(const sofa::core::objectmodel::Base* t){ return t->notMuted(); } ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:574:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'sofa::core::objectmodel::Base *' for 1st argument inline bool notMuted(sofa::core::objectmodel::Base* t){ return t->notMuted(); } ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:89:5: error: no matching function for call to 'getComponentInfo' msg_info() << "Initial mesh has " << d_inVertices.getValue().size() << " vertices and " << d_inTriangles.getValue().size() << " triangles." << msgendl ^~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:145:23: note: expanded from macro 'msg_info' #define msg_info(...) MSGINFO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:143:60: note: expanded from macro 'MSGINFO_CHOOSER' #define MSGINFO_CHOOSER(...) MSGINFO_CHOOSE_FROM_ARG_COUNT(MSGINFO_NO_ARG_EXPANDER __VA_ARGS__ ()) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:142:36: note: expanded from macro 'MSGINFO_NO_ARG_EXPANDER' #define MSGINFO_NO_ARG_EXPANDER() ,MSGINFO_0 ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:134:41: note: expanded from macro 'TWO_FUNC_CHOOSER' #define TWO_FUNC_CHOOSER(_f1, _f2 ,...) _f2 ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:139:66: note: expanded from macro 'MSGINFO_0' #define MSGINFO_0() if( sofa::helper::logging::notMuted(this) ) oldmsg_info(this) ^~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:110:124: note: expanded from macro 'oldmsg_info' #define oldmsg_info(emitter) sofa::helper::logging::MessageDispatcher::info(sofa::helper::logging::Message::Runtime, sofa::helper::logging::getComponentInfo(emitter), SOFA_FILE_INFO) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:67:34: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const std::string' (aka 'const basic_string<char>') for 1st argument inline const ComponentInfo::SPtr getComponentInfo(const std::string& s) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:73:34: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const ComponentInfo::SPtr' (aka 'const shared_ptr<sofa::helper::logging::ComponentInfo>') for 1st argument inline const ComponentInfo::SPtr getComponentInfo(const ComponentInfo::SPtr& s) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:592:28: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const sofa::core::objectmodel::Base *' for 1st argument inline ComponentInfo::SPtr getComponentInfo(const sofa::core::objectmodel::Base* t) ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:128:9: error: no matching function for call to 'getComponentInfo' msg_error() << "You must add a stop condition using either targetedNumberOfEdges or targetedRatioOfEdges" ; ^~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:168:24: note: expanded from macro 'msg_error' #define msg_error(...) MSGERROR_CHOOSER(__VA_ARGS__)(__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:166:62: note: expanded from macro 'MSGERROR_CHOOSER' #define MSGERROR_CHOOSER(...) MSGERROR_CHOOSE_FROM_ARG_COUNT(MSGERROR_NO_ARG_EXPANDER __VA_ARGS__ ()) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:165:37: note: expanded from macro 'MSGERROR_NO_ARG_EXPANDER' #define MSGERROR_NO_ARG_EXPANDER() ,MSGERROR_0 ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:134:41: note: expanded from macro 'TWO_FUNC_CHOOSER' #define TWO_FUNC_CHOOSER(_f1, _f2 ,...) _f2 ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:162:23: note: expanded from macro 'MSGERROR_0' #define MSGERROR_0() oldmsg_error(this) ^~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:113:125: note: expanded from macro 'oldmsg_error' #define oldmsg_error(emitter) sofa::helper::logging::MessageDispatcher::error(sofa::helper::logging::Message::Runtime, sofa::helper::logging::getComponentInfo(emitter), SOFA_FILE_INFO) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:67:34: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const std::string' (aka 'const basic_string<char>') for 1st argument inline const ComponentInfo::SPtr getComponentInfo(const std::string& s) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:73:34: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const ComponentInfo::SPtr' (aka 'const shared_ptr<sofa::helper::logging::ComponentInfo>') for 1st argument inline const ComponentInfo::SPtr getComponentInfo(const ComponentInfo::SPtr& s) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:592:28: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const sofa::core::objectmodel::Base *' for 1st argument inline ComponentInfo::SPtr getComponentInfo(const sofa::core::objectmodel::Base* t) ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:144:5: error: no matching function for call to 'notMuted' msg_info() << "DecimateMesh: Decimated mesh has " << d_outVertices.getValue().size() << " vertices and " << d_outTriangles.getValue().size() << " triangles."; ^~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:145:23: note: expanded from macro 'msg_info' #define msg_info(...) MSGINFO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:143:60: note: expanded from macro 'MSGINFO_CHOOSER' #define MSGINFO_CHOOSER(...) MSGINFO_CHOOSE_FROM_ARG_COUNT(MSGINFO_NO_ARG_EXPANDER __VA_ARGS__ ()) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:142:36: note: expanded from macro 'MSGINFO_NO_ARG_EXPANDER' #define MSGINFO_NO_ARG_EXPANDER() ,MSGINFO_0 ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:135:67: note: expanded from macro 'TWO_FUNC_RECOMPOSER' #define TWO_FUNC_RECOMPOSER(argsWithParentheses) TWO_FUNC_CHOOSER argsWithParentheses ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:134:41: note: expanded from macro 'TWO_FUNC_CHOOSER' #define TWO_FUNC_CHOOSER(_f1, _f2 ,...) _f2 ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:139:26: note: expanded from macro 'MSGINFO_0' #define MSGINFO_0() if( sofa::helper::logging::notMuted(this) ) oldmsg_info(this) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:78:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const ComponentInfo::SPtr' (aka 'const shared_ptr<sofa::helper::logging::ComponentInfo>') for 1st argument inline bool notMuted(const ComponentInfo::SPtr&){ return true; } ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:81:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const std::string' (aka 'const basic_string<char>') for 1st argument inline bool notMuted(const std::string&){ return true; } ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:573:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const sofa::core::objectmodel::Base *' for 1st argument inline bool notMuted(const sofa::core::objectmodel::Base* t){ return t->notMuted(); } ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:574:13: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'sofa::core::objectmodel::Base *' for 1st argument inline bool notMuted(sofa::core::objectmodel::Base* t){ return t->notMuted(); } ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/DecimateMesh.inl:144:5: error: no matching function for call to 'getComponentInfo' msg_info() << "DecimateMesh: Decimated mesh has " << d_outVertices.getValue().size() << " vertices and " << d_outTriangles.getValue().size() << " triangles."; ^~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:145:23: note: expanded from macro 'msg_info' #define msg_info(...) MSGINFO_CHOOSER(__VA_ARGS__)(__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:143:60: note: expanded from macro 'MSGINFO_CHOOSER' #define MSGINFO_CHOOSER(...) MSGINFO_CHOOSE_FROM_ARG_COUNT(MSGINFO_NO_ARG_EXPANDER __VA_ARGS__ ()) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:142:36: note: expanded from macro 'MSGINFO_NO_ARG_EXPANDER' #define MSGINFO_NO_ARG_EXPANDER() ,MSGINFO_0 ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:134:41: note: expanded from macro 'TWO_FUNC_CHOOSER' #define TWO_FUNC_CHOOSER(_f1, _f2 ,...) _f2 ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:139:66: note: expanded from macro 'MSGINFO_0' #define MSGINFO_0() if( sofa::helper::logging::notMuted(this) ) oldmsg_info(this) ^~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/Messaging.h:110:124: note: expanded from macro 'oldmsg_info' #define oldmsg_info(emitter) sofa::helper::logging::MessageDispatcher::info(sofa::helper::logging::Message::Runtime, sofa::helper::logging::getComponentInfo(emitter), SOFA_FILE_INFO) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:67:34: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const std::string' (aka 'const basic_string<char>') for 1st argument inline const ComponentInfo::SPtr getComponentInfo(const std::string& s) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaHelper/src/sofa/helper/logging/ComponentInfo.h:73:34: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const ComponentInfo::SPtr' (aka 'const shared_ptr<sofa::helper::logging::ComponentInfo>') for 1st argument inline const ComponentInfo::SPtr getComponentInfo(const ComponentInfo::SPtr& s) ^ /Users/mikhail/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:592:28: note: candidate function not viable: no known conversion from 'cgal::DecimateMesh<sofa::defaulttype::Vec3Types> *' to 'const sofa::core::objectmodel::Base *' for 1st argument inline ComponentInfo::SPtr getComponentInfo(const sofa::core::objectmodel::Base* t) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/src/CGALPlugin/DecimateMesh.cpp.o] Error 1 make[1]: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/all] Error 2 make: *** [all] Error 2
1 September 2021 at 09:59 #20271SidatyBlockedHi @mikhail,
Can you please try to change
using namespace sofa::defaulttype;
in line 56 of your DecimateMesh.h byusing namespace sofa::type;
Otherwise, It seems like your errors comes from the DecimateMesh component(Engine), if you are not willing to use this one you can just deactivate it in the CMakeLists file of the plugin.
Let me know if how it goes 🙂
Best,
Sid,
1 September 2021 at 10:51 #20272mikhailBlockedHi @Sidaty,
Thank you. I made the change you have suggested (defaulttype -> type).
It appears that it has solved the issue with DecimateMesh but it is still there for other components. What should I do?
Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/CylinderMesh.inl:511:50: error: no member named 'types' in namespace 'sofa::helper'; did you mean 'type'? vparams->drawTool()->drawPoints(points,8,helper::types::RGBAColor(0.0, 0.0, 1.0,1)); ^~~~~~~~~~~~~ type /Users/mikhail/sofa/src/SofaKernel/modules/Sofa.Type/src/sofa/type/SVector.h:26:17: note: 'type' declared here namespace sofa::type ^ In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/CylinderMesh.cpp:25: /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/CylinderMesh.inl:518:50: error: no member named 'types' in namespace 'sofa::helper'; did you mean 'type'?
1 September 2021 at 11:07 #20273mikhailBlockedA follow-up:
I took the suggestion of the compiler and replaced
helper::types
withtype
.I could compile CylinderMesh.
Now my error is in Refine2DMesh. Is there an universal fix?
/Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/Refine2DMesh.inl:387:51: error: no member named 'Vec3' in namespace 'sofa::defaulttype' sofa::type::vector<sofa::defaulttype::Vec3> points; ~~~~~~~~~~~~~~~~~~~^ /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/Refine2DMesh.inl:402:51: error: no member named 'Vec3' in namespace 'sofa::defaulttype' sofa::type::vector<sofa::defaulttype::Vec3> points; ~~~~~~~~~~~~~~~~~~~^
1 September 2021 at 11:13 #20274SidatyBlockedHi @mikhail,
Perfect,
As suggested by the compiler, for CylinderMesh.inl you have to change
helper::types
withtype
in the lines 511, 518, 525 and 549You may also have to change
sofa::defaulttype
bysofa::type
at the lines 387 and 402 in the Refine2DMesh.inl file.Let me know if it works,
Best,
Sid,1 September 2021 at 11:15 #20275mikhailBlockedYes,
so far I have figured it out. However, UpsamplePointCloud is more complicated. My C++ knowledge is rather limited 🙁
In file included from /Users/mikhail/sofa/src/applications/plugins/CGALPlugin/src/CGALPlugin/UpsamplePointCloud.cpp:25: In file included from /usr/local/include/CGAL/edge_aware_upsample_point_set.h:24: /usr/local/include/CGAL/compute_average_spacing.h:201:5: error: no matching constructor for initialization of 'Point_set_processing_3::internal::Callback_wrapper<Parallel_tag>' callback_wrapper (callback, nb_points); ^ ~~~~~~~~~~~~~~~~~~~
1 September 2021 at 11:25 #20276SidatyBlockedOk, this is probably because you are using CGAL4.7
You can Either try to update your CGAL version(recommended) or install a previous version of SOFA.
1 September 2021 at 11:27 #20277mikhailBlockedgit clone -b v21.06 https://github.com/sofa-framework/sofa.git sofa/src
What version should I be using instead. Please provide the right git clone command if not only the version is different. Thank you
1 September 2021 at 11:38 #20279SidatyBlockedThe thing is as you can see here
CGAL4.7
have been released in October 2015 so I am not sure it is a good idea to install a SOFA version that old.For Sofa 21.06 I am using
CGAL(5.0.2-3)
with the changes that we’ve discussed above, and I would recommend you the same.Best,
1 September 2021 at 11:55 #20280mikhailBlockedI took your advice and installed CGAL-5.0.2.
However, I still have my last error from the post #20275.
Could you please tell me how to fix it.1 September 2021 at 12:04 #20281SidatyBlockedDid you rebuild SOFA and updated the CGAL_DIR ?
Otherwise, As I said before if you are not willing to use the component UpsamplePointCloud you can comment it at the lines 19 and 33 in the CMakeLists file of CGALPlugin.
1 September 2021 at 12:17 #20282mikhailBlockedAlmost there 🙂
I disabled Upsampling and I could compile. But I forgot to include the PLUGIN_IMAGE. Now when I do it, I get
Adding plugin image CMake Error at SofaKernel/modules/Sofa.Config/cmake/SofaMacrosConfigure.cmake:343 (find_package): By not providing "FindDiffusionSolver.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "DiffusionSolver", but CMake did not find one. Could not find a package configuration file provided by "DiffusionSolver" with any of the following names: DiffusionSolverConfig.cmake diffusionsolver-config.cmake Add the installation prefix of "DiffusionSolver" to CMAKE_PREFIX_PATH or set "DiffusionSolver_DIR" to a directory containing one of the above files. If "DiffusionSolver" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): applications/plugins/image/CMakeLists.txt:15 (sofa_find_package)
It doesn’t appear to be in the src directory.
1 September 2021 at 12:27 #20283mikhailBlockedSomehow I made it work. I took the DiffusionSolverConfig.cmake from the binary installation of Sofa. I could load the example.
Thank you for your help!
1 September 2021 at 13:28 #20285 -
AuthorPosts
- You must be logged in to reply to this topic.