Oslandia / SFCGAL

MOVED TO GITLAB: https://gitlab.com/sfcgal/SFCGAL. A wrapper around CGAL that intents to implement 2D and 3D operations on OGC standards models
https://sfcgal.org
Other
112 stars 54 forks source link

sfcgal 1.2.0 compile error "CGAL/Point_inside_polyhedron_3.h: No such file" #113

Closed okanisis closed 8 years ago

okanisis commented 9 years ago

Upgraded CAL to 4.7 on Linux and when trying to compile SFCGAL 1.2.0 it results in the following error:

In file included from /tmp/makepkg/sfcgal/src/SFCGAL-1.2.0/src/algorithm/union.cpp:21:0:
/tmp/makepkg/sfcgal/src/SFCGAL-1.2.0/include/SFCGAL/algorithm/differencePrimitives.h:35:44: fatal error: CGAL/Point_inside_polyhedron_3.h: No such file or directory
compilation terminated.
src/CMakeFiles/SFCGAL.dir/build.make:998: recipe for target 'src/CMakeFiles/SFCGAL.dir/algorithm/union.cpp.o' failed
make[2]: *** [src/CMakeFiles/SFCGAL.dir/algorithm/union.cpp.o] Error 1

It looks like the Point_inside_polyhedron_3.h file isn't included in CGAL 4.7 anymore.

pacman -Ql cgal | grep -i polyhedron_3
cgal /usr/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h
cgal /usr/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h
cgal /usr/include/CGAL/Convex_hull_d_to_polyhedron_3.h
cgal /usr/include/CGAL/FaceGraph_to_Polyhedron_3.h
cgal /usr/include/CGAL/Mesh_polyhedron_3.h
cgal /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h
cgal /usr/include/CGAL/Nef_polyhedron_3.h
cgal /usr/include/CGAL/Polyhedron_3.h
cgal /usr/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h
cgal /usr/include/CGAL/Width_polyhedron_3.h
cgal /usr/include/CGAL/boost/graph/graph_traits_Polyhedron_3.h
cgal /usr/include/CGAL/boost/graph/halfedge_graph_traits_Polyhedron_3.h
cgal /usr/include/CGAL/boost/graph/properties_Polyhedron_3.h
cgal /usr/include/CGAL/convex_hull_3_to_polyhedron_3.h
TanuMalik commented 9 years ago

I am getting the same error. Any known fixes?

vmora commented 9 years ago

I changed the title to clearly state the source of the problem.

I haven't worked on the 4.7 support yet. I'll signal on this issue when I start working on that, @mhugo will do the same he gets there before I do.

I think it may just be a matter of looking for the function in the 4.7 version if it is somewhere else.

PR/funding are welcome to speed things up.

sebastic commented 9 years ago

The Reproducible Builds Team ran into this issue too as reported in Debian Bug #804589. That Release Critical bug will result in the removal of the sfcgal package from testing (and by extension the next stable release) if it remains unfixed.

I hope funding won't be required to get this issue fixed like the GRASS 7 support in the QGIS plugin. If it's easy to fix I'll forward the patch for the Debian package in a PR.

sebastic commented 9 years ago

I don't see an easy fix to support both CGAL 4.7 and earlier versions, but it seems that Side_of_triangle_mesh is a suitable alternative in 4.7 to Point_inside_polyhedron_3 in 4.6:

include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h switched its Inside_poly_test typedef from Point_inside_polyhedron_3<Polyhedron, Kernel> in 4.6 to Side_of_triangle_mesh<Polyhedron, Kernel> in 4.7.

This can probably be used for is_in_poly() in SFCGAL too.

mhugo commented 9 years ago

@sebastic Thanks for these clues. I've fixed SFCGAL to compile with CGAL 4.7 on master. I am working on travis to add CGAL 4.7 test I will release a 1.2.1 to fix this.

mhugo commented 9 years ago

@sebastic There is now a 1.2.1 release which compiles with CGAL 4.7

sebastic commented 9 years ago

@mhugo, thanks for the quick fix. The Debian package build with CGAL 4.7 is looking good.

mhugo commented 8 years ago

@sebastic FYI a new 1.2.2 release is out (1.2.1 did not include the correct version number)