Home › Forum › SOFA › Building SOFA › [SOLVED] Errors while building sofa
Tagged: 64_bits, GCC, Linux_ubuntu, SOFA_1806
- This topic has 15 replies, 6 voices, and was last updated 6 years ago by Hugo.
-
AuthorPosts
-
17 September 2018 at 12:18 #11953lnnx2006Blocked
Hello everyone,
I was trying to use SOFA. However, I’ve always got problems while building SOFA.
My system is Ubuntu 16.04, and I used v18.06 of SOFA. I followed exactly the same instructions on the web using cmake-gui (https://www.sofa-framework.org/community/doc/getting-started/build/linux/).
—————————————————————————
Error INFO – 1:The first time after I run cmake-gui. I do “Configure”. The error comes out.
CMake Error at package.cmake:56 (add_subdirectory): The binary directory /home/fei/sofa_ws/sofa/v18.06/build09152/extlibs/gtest is already used to build a source directory. It cannot be used to build source directory /home/fei/sofa_ws/sofa/v18.06/src/extlibs/gtest Specify a unique binary directory name. Call Stack (most recent call first): CMakeLists.txt:354 (include)
Then I do nothing, just by click the “Configure” again, this error seems disappear. I don’t know why.
————————————————————————————————
————————————————————————————————
Error INFO – 2:
When I checked the PLUGIN_CGALPLUGIN. The following error is coming out.Adding Plugin CGALPlugin CMake Error at /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake:83 (message): The imported target "CGAL::CGAL_Qt5" references the file "/usr/lib/x86_64-linux-gnu/libCGAL_Qt5.so.11.0.1" 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/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake" but not all the files it references. Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake:12 (include) applications/plugins/CGALPlugin/CMakeLists.txt:36 (find_package)
After then I followed the steps on : https://www.sofa-framework.org/community/doc/using-sofa/optional-features/cgal-library/
I downloaded a newer version of CGAL-4.12.1 on https://github.com/CGAL/cgal/releases
Then I do “make” of this CGAL-4.12.1 in a “build” directory.
Then I pointed the CGAL_DIR to this “build”
directory.This error passed after I click “Configure” again.
————————————————————————————————
————————————————————————————————
Error INFO – 3:[ 95%] Building CXX object applications/plugins/SofaMiscCollision/CMakeFiles/SofaMiscCollision.dir/RayTriangleVisitor.cpp.o [ 95%] Linking CXX shared library ../../../lib/libSofaMiscCollision.so [ 95%] Built target SofaMiscCollision [ 95%] Building CXX object applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/TriangularConvexHull3D.cpp.o In file included from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:47:23: error: ‘Vertex’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex Vertex; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:48:23: error: ‘Vertex_iterator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex_iterator Vertex_iterator; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:49:23: error: ‘Vertex_handle’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex_handle Vertex_handle; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:50:23: error: ‘Facet_iterator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Facet_iterator Facet_iterator; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:51:23: error: ‘Facet’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Facet Facet; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:57:23: error: ‘Halfedge_around_facet_circulator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Halfedge_around_facet_circulator HF_circulator; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In member function ‘void cgal::TriangularConvexHull3D<DataTypes>::update()’: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:120:5: error: ‘Vertex_iterator’ was not declared in this scope Vertex_iterator vIt; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:121:5: error: ‘Facet_iterator’ was not declared in this scope Facet_iterator fIt; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:124:27: error: ‘Vertex_handle’ was not declared in this scope CGAL::Unique_hash_map<Vertex_handle, int > V; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:124:46: error: template argument 1 is invalid CGAL::Unique_hash_map<Vertex_handle, int > V; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:125:7: error: request for member ‘clear’ in ‘V’, which is of non-class type ‘int’ V.clear(); ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:10: error: ‘vIt’ was not declared in this scope for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:17: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ In file included from /usr/local/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /usr/local/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:44: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ In file included from /usr/local/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /usr/local/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:10: error: ‘fIt’ was not declared in this scope for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:17: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ In file included from /usr/local/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /usr/local/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:42: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ In file included from /usr/local/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /usr/local/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:146:9: error: ‘HF_circulator’ was not declared in this scope HF_circulator h = fIt->facet_begin(); ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:150:26: error: ‘h’ was not declared in this scope t[order] = V[h->vertex()]; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:154:16: error: ‘h’ was not declared in this scope while( h != fIt->facet_begin() && order < 3); ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In instantiation of ‘void cgal::TriangularConvexHull3D<DataTypes>::update() [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<3, double>, sofa::defaulttype::Vec<3, double>, double>]’: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:51:42: required from here /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:115:18: error: ‘cgal::Polyhedron_3 P’ has incomplete type Polyhedron_3 P; ^ /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In instantiation of ‘void cgal::TriangularConvexHull3D<DataTypes>::update() [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<3, float>, sofa::defaulttype::Vec<3, float>, float>]’: /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:54:42: required from here /home/fei/sofa_ws/v18.06/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:115:18: error: ‘cgal::Polyhedron_3 P’ has incomplete type applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/build.make:110: recipe for target 'applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/TriangularConvexHull3D.cpp.o' failed make[2]: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/TriangularConvexHull3D.cpp.o] Error 1 CMakeFiles/Makefile2:5526: recipe for target 'applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/all' failed make[1]: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2
I can not fix it.
————————————————————————————————————————————————————————————————
Error INFO – 4:If I compile without CGAL. I manage to make it.
However, when I runSofa, the following error is coming out :The constructor with a QGLFormat is deprecated, use the regular contructor instead. [ERROR] [FileRepository] File icons/back.png NOT FOUND in :/home/fei/sofa_ws/buildvsoft0914:/home/fei/sofa_ws/buildvsoft0914:/home/fei/sofa_ws/buildvsoft0914 [ERROR] [FileRepository] File icons/home.png NOT FOUND in :/home/fei/sofa_ws/buildvsoft0914:/home/fei/sofa_ws/buildvsoft0914:/home/fei/sofa_ws/buildvsoft0914 [ERROR] [FileRepository] File docs/runsofa.html NOT FOUND in :/home/fei/sofa_ws/buildvsoft0914:/home/fei/sofa_ws/buildvsoft0914:/home/fei/sofa_ws/buildvsoft0914
————————————————————————————————
Could you help on the above problems ? Thanks a lot for your help!
17 September 2018 at 12:54 #11954ElDiwinyBlockedHi lnnx2006,
I agree with you, I face the same problems, did you install stable or non stable version?
In the mean time, please follows these steps:Create folder “sofa”, in this folder create two folders
The first one :”src”
The second one: “build”In the “src”, download this version “https://github.com/SofaDefrost/sofa.git”
then run cmake-gui, double click on configure, and then generateCheck this first, and see whether there is still errors
After that go to the build directory and run “ninja” command.
Please let me know whether you still has the same errors, I would do my best to help.
Best,
Marwa17 September 2018 at 15:33 #11955lnnx2006BlockedHi Marwa,
I used the codes in “https://github.com/SofaDefrost/sofa.git”.
The problems seemed to be solved without including “CGAL”. There’re no errors anymore.However, when I include “CGAL” plugin. The cmake-gui is able to pass. But the “make” step comes with errors :
In file included from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:47:23: error: ‘Vertex’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex Vertex; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:48:23: error: ‘Vertex_iterator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex_iterator Vertex_iterator; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:49:23: error: ‘Vertex_handle’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex_handle Vertex_handle; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:50:23: error: ‘Facet_iterator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Facet_iterator Facet_iterator; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:51:23: error: ‘Facet’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Facet Facet; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:57:23: error: ‘Halfedge_around_facet_circulator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Halfedge_around_facet_circulator HF_circulator; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In member function ‘void cgal::TriangularConvexHull3D<DataTypes>::update()’: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:120:5: error: ‘Vertex_iterator’ was not declared in this scope Vertex_iterator vIt; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:121:5: error: ‘Facet_iterator’ was not declared in this scope Facet_iterator fIt; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:124:27: error: ‘Vertex_handle’ was not declared in this scope CGAL::Unique_hash_map<Vertex_handle, int > V; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:124:46: error: template argument 1 is invalid CGAL::Unique_hash_map<Vertex_handle, int > V; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:125:7: error: request for member ‘clear’ in ‘V’, which is of non-class type ‘int’ V.clear(); ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:10: error: ‘vIt’ was not declared in this scope for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:17: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ In file included from /home/fei/Programs/CGAL-4.12.1/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.12.1/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:44: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ In file included from /home/fei/Programs/CGAL-4.12.1/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.12.1/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:10: error: ‘fIt’ was not declared in this scope for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:17: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ In file included from /home/fei/Programs/CGAL-4.12.1/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.12.1/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:42: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ In file included from /home/fei/Programs/CGAL-4.12.1/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.12.1/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:146:9: error: ‘HF_circulator’ was not declared in this scope HF_circulator h = fIt->facet_begin(); ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:150:26: error: ‘h’ was not declared in this scope t[order] = V[h->vertex()]; ^ /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:154:16: error: ‘h’ was not declared in this scope while( h != fIt->facet_begin() && order < 3); ^ [ 41%] Building CXX object SofaGeneral/SofaDenseSolver/CMakeFiles/SofaDenseSolver.dir/NewMatCGLinearSolver.cpp.o /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In instantiation of ‘void cgal::TriangularConvexHull3D<DataTypes>::update() [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<3, double>, sofa::defaulttype::Vec<3, double>, double>]’: /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:51:42: required from here /home/fei/sofa_ws/vDefrost/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:115:18: error: ‘cgal::Polyhedron_3 P’ has incomplete type Polyhedron_3 P;
I would like to know which version of “CGAL” is compatible with this version of codes SOFA ?
I am using version : CGAL 4.12.1
Thanks a lot!
Best, Fei
20 September 2018 at 21:57 #11975ElDiwinyBlockedHi Fei,
Sorry for the late reply! I have checked the CGAL plugin on the same sofa version that you have already tested and it works fine. I do think that there is no required version if you check the softrobots deforst page
I do think that the problem is after you build sofa and try to add CGAL plugin, it will give you bunch of errors and this because the build folder and its dependencies are locked so just type that in the terminal in the path of sofa
chmod 777 build -R
Then run the double configurations in cmake-gui and generate, it will be added.
Please try this and let me know whether do you still have the same problem.
21 September 2018 at 11:12 #11978lnnx2006BlockedHi Marwa,
Actually the error is the same. It seems the figure you posted is not the last step for building. I can pass the cmake-gui configuration and generation as well with CGAL plugin. However, the errors appears during the “make” step.
FYI: I tested with different version of CGAL. I could only pass make procedure for the version “CGAL-4.8.2”. As far as I think the maximum version is <=4.8.2.
Thanks.
Best regards,
Fei25 September 2018 at 15:57 #12007jnbrunetModeratorThere is a compilation issue with the current Sofa CGALPlugin and the CGAL library versions 4.10+
I’ve just submitted the following PR to fix it : https://github.com/sofa-framework/sofa/pull/783
Until the PR is merged, you can try to manually add the changes from the PR into your Sofa’s source code.
25 September 2018 at 16:03 #12010HugoKeymasterThank you so much JN for this!
Thumbs up!26 September 2018 at 11:24 #12028HugoKeymasterIt’s merged in SOFA master branch.
BestHugo
4 October 2018 at 12:42 #12094lnnx2006BlockedHi All,
I tried with the new master branch merged with CGAL again. It’s still encountering problems with CGAL 4.13 as well. Here are the errors :
[100%] Building CXX object applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/MeshGenerationFromImage.cpp.o In file included from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:47:23: error: ‘Vertex’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex Vertex; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:48:23: error: ‘Vertex_iterator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex_iterator Vertex_iterator; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:49:23: error: ‘Vertex_handle’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Vertex_handle Vertex_handle; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:50:23: error: ‘Facet_iterator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Facet_iterator Facet_iterator; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:51:23: error: ‘Facet’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Facet Facet; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:57:23: error: ‘Halfedge_around_facet_circulator’ in ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ does not name a type typedef Polyhedron_3::Halfedge_around_facet_circulator HF_circulator; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In member function ‘void cgal::TriangularConvexHull3D<DataTypes>::update()’: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:120:5: error: ‘Vertex_iterator’ was not declared in this scope Vertex_iterator vIt; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:121:5: error: ‘Facet_iterator’ was not declared in this scope Facet_iterator fIt; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:124:27: error: ‘Vertex_handle’ was not declared in this scope CGAL::Unique_hash_map<Vertex_handle, int > V; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:124:46: error: template argument 1 is invalid CGAL::Unique_hash_map<Vertex_handle, int > V; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:125:7: error: request for member ‘clear’ in ‘V’, which is of non-class type ‘int’ V.clear(); ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:10: error: ‘vIt’ was not declared in this scope for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:17: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ In file included from /home/fei/Programs/CGAL-4.13/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.13/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:127:44: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (vIt = P.vertices_begin(); vIt != P.vertices_end() ; ++vIt) ^ In file included from /home/fei/Programs/CGAL-4.13/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.13/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:10: error: ‘fIt’ was not declared in this scope for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:17: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ In file included from /home/fei/Programs/CGAL-4.13/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.13/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:142:42: error: invalid use of incomplete type ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ for (fIt = P.facets_begin(); fIt != P.facets_end() ; fIt++) ^ In file included from /home/fei/Programs/CGAL-4.13/include/CGAL/Convex_hull_traits_3.h:28:0, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:35, from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31: /home/fei/Programs/CGAL-4.13/include/CGAL/Polyhedron_3_fwd.h:41:9: note: declaration of ‘cgal::Polyhedron_3 {aka class CGAL::Polyhedron_3<CGAL::Convex_hull_traits_3<CGAL::Epick> >}’ class Polyhedron_3; ^ In file included from /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:31:0: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:146:9: error: ‘HF_circulator’ was not declared in this scope HF_circulator h = fIt->facet_begin(); ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:150:26: error: ‘h’ was not declared in this scope t[order] = V[h->vertex()]; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:154:16: error: ‘h’ was not declared in this scope while( h != fIt->facet_begin() && order < 3); ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In instantiation of ‘void cgal::TriangularConvexHull3D<DataTypes>::update() [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<3, double>, sofa::defaulttype::Vec<3, double>, double>]’: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:51:42: required from here /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:115:18: error: ‘cgal::Polyhedron_3 P’ has incomplete type Polyhedron_3 P; ^ /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl: In instantiation of ‘void cgal::TriangularConvexHull3D<DataTypes>::update() [with DataTypes = sofa::defaulttype::StdVectorTypes<sofa::defaulttype::Vec<3, float>, sofa::defaulttype::Vec<3, float>, float>]’: /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.cpp:54:42: required from here /home/fei/sofa_ws/vCGAL/src/applications/plugins/CGALPlugin/TriangularConvexHull3D.inl:115:18: error: ‘cgal::Polyhedron_3 P’ has incomplete type applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/build.make:110: recipe for target 'applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/TriangularConvexHull3D.cpp.o' failed make[2]: *** [applications/plugins/CGALPlugin/CMakeFiles/CGALPlugin.dir/TriangularConvexHull3D.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs....
The errors are mainly related to “TriangularConvexHull3D” files.
Anybody tested it ? Thanks!Fei
7 November 2018 at 13:14 #12348a0a0BlockedHi!
facing the same problem with arch linux after including the cgal plugin.
any workaround yet?Thank you
7 November 2018 at 16:21 #12350lnnx2006BlockedHi,
Could you post your error here? I think I may help you somehow. Thanks.
Fei
7 November 2018 at 18:30 #12351NouraBlockedHello,
I faced the same issue before with CGAL. Fortunately, I noticed that I could compile SOFA with CGAL successfully using
clang
I know that this doesn’t solve the problem, but it could be a temporary solution until the issue is fixed.I’m running:
Ubuntu 18.04.1 LTS
CGAL-4.11
clang version 6.0.0-1ubuntu2In order to compile using clang: In the cmake-gui interface, you have to define clang instead of gcc.
CMAKE_CXX_COMPILER /usr/bin/clang++
CMAKE_C_COMPILER /usr/bin/clangHope this helps!
Noura
8 November 2018 at 08:15 #12352a0a0BlockedThank you for your replys. Acually I’m using clang because it is a way fast.
clang 7.0.0-1
cgal 4.13-1the error I get is:
(your web inface declares my message as spam so I used pastebin:)
https://pastebin.com/i12H15JE8 November 2018 at 10:54 #12353jnbrunetModeratorCGAL 4.12+ now forward declares its package Polyhedron (see CGAL/cgal@76ccc9a , hence the implicit instantiation of undefined template compilation error you see here.
I’ve added a PR to fix this : https://github.com/sofa-framework/sofa/pull/812
Until then, you can simply add the following line
#include <CGAL/Polyhedron_3.h>
At the beginning of the file
applications/plugins/CGALPlugin/TriangularConvexHull3D.inl12 November 2018 at 18:35 #12361a0a0BlockedThank you!
jnbrunet’s suggestion solved the problem.
Now I can start working again 🙂14 November 2018 at 19:09 #12454 -
AuthorPosts
- You must be logged in to reply to this topic.