Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cech_complex_example_from_points fails to compile with CGAL 5.1 #1095

Open
VincentRouvreau opened this issue Jun 28, 2024 · 0 comments
Open
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@VincentRouvreau
Copy link
Contributor

src/Cech_complex/example/cech_complex_example_from_points.cpp fails to compile with CGAL 5.1, but it is fixed in CGAL 5.1.5+:

In file included from /custom-cgal/include/boost/none_t.hpp:17,
                 from /custom-cgal/include/boost/none.hpp:17,
                 from /custom-cgal/include/boost/optional/optional.hpp:60,
                 from /custom-cgal/include/boost/optional.hpp:15,
                 from /CGAL-5.1/include/CGAL/Object.h:30,
                 from /CGAL-5.1/include/CGAL/kernel_basic.h:25,
                 from /CGAL-5.1/include/CGAL/basic.h:35,
                 from /CGAL-5.1/include/CGAL/NewKernel_d/Cartesian_base.h:15,
                 from /CGAL-5.1/include/CGAL/Epick_d.h:17,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Sphere_circumradius.h:14,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Cech_complex.h:15,
                 from /gudhi-devel/src/Cech_complex/example/cech_complex_example_from_points.cpp:1:
/custom-cgal/include/boost/function_output_iterator.hpp:14:1: note: ‘#pragma message: This header is deprecated. Use <boost/iterator/function_output_iterator.hpp> instead.’
   14 | BOOST_HEADER_DEPRECATED("<boost/iterator/function_output_iterator.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /custom-cgal/include/boost/none_t.hpp:17,
                 from /custom-cgal/include/boost/none.hpp:17,
                 from /custom-cgal/include/boost/optional/optional.hpp:60,
                 from /custom-cgal/include/boost/optional.hpp:15,
                 from /CGAL-5.1/include/CGAL/Object.h:30,
                 from /CGAL-5.1/include/CGAL/kernel_basic.h:25,
                 from /CGAL-5.1/include/CGAL/basic.h:35,
                 from /CGAL-5.1/include/CGAL/NewKernel_d/Cartesian_base.h:15,
                 from /CGAL-5.1/include/CGAL/Epick_d.h:17,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Sphere_circumradius.h:14,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Cech_complex.h:15,
                 from /gudhi-devel/src/Cech_complex/utilities/cech_persistence.cpp:11:
/custom-cgal/include/boost/function_output_iterator.hpp:14:1: note: ‘#pragma message: This header is deprecated. Use <boost/iterator/function_output_iterator.hpp> instead.’
   14 | BOOST_HEADER_DEPRECATED("<boost/iterator/function_output_iterator.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /CGAL-5.1/include/CGAL/NewKernel_d/KernelD_converter.h:20,
                 from /CGAL-5.1/include/CGAL/NewKernel_d/Cartesian_filter_K.h:16,
                 from /CGAL-5.1/include/CGAL/Epick_d.h:19,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Sphere_circumradius.h:14,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Cech_complex.h:15,
                 from /gudhi-devel/src/Cech_complex/example/cech_complex_example_from_points.cpp:1:
/CGAL-5.1/include/CGAL/NT_converter.h: In instantiation of ‘NT2 CGAL::NT_converter<NT1, NT2>::operator()(const NT1&) const [with NT1 = CGAL::Lazy_exact_nt<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >; NT2 = float]’:
/gudhi-devel/src/Cech_complex/include/gudhi/Sphere_circumradius.h:49:32:   required from ‘Filtration_value Gudhi::cech_complex::Sphere_circumradius<Kernel, Filtration_value>::operator()(const Point&, const Point&) const [with Kernel = CGAL::Epeck_d<CGAL::Dimension_tag<2> >; Filtration_value = float; Gudhi::cech_complex::Sphere_circumradius<Kernel, Filtration_value>::Point = CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dimension_tag<2> > >]’
/gudhi-devel/src/common/include/gudhi/graph_simplicial_complex.h:79:21:   required from ‘Gudhi::Proximity_graph<SimplicialComplexForProximityGraph> Gudhi::compute_proximity_graph(const ForwardPointRange&, typename SimplicialComplexForProximityGraph::Filtration_value, Distance) [with SimplicialComplexForProximityGraph = Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_fast_persistence>; ForwardPointRange = std::vector<CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dimension_tag<2> > > >; Distance = Gudhi::cech_complex::Sphere_circumradius<CGAL::Epeck_d<CGAL::Dimension_tag<2> >, float>; Gudhi::Proximity_graph<SimplicialComplexForProximityGraph> = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<Gudhi::vertex_filtration_t, float, boost::no_property>, boost::property<Gudhi::edge_filtration_t, float, boost::no_property>, boost::no_property, boost::listS>; typename SimplicialComplexForProximityGraph::Filtration_value = float]’
/gudhi-devel/src/Cech_complex/include/gudhi/Cech_complex.h:76:91:   required from ‘Gudhi::cech_complex::Cech_complex<Kernel, SimplicialComplexForCechComplex>::Cech_complex(const InputPointRange&, Gudhi::cech_complex::Cech_complex<Kernel, SimplicialComplexForCechComplex>::Filtration_value, bool) [with InputPointRange = std::vector<CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dimension_tag<2> > > >; Kernel = CGAL::Epeck_d<CGAL::Dimension_tag<2> >; SimplicialComplexForCechComplex = Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_fast_persistence>; Gudhi::cech_complex::Cech_complex<Kernel, SimplicialComplexForCechComplex>::Filtration_value = float]’
/gudhi-devel/src/Cech_complex/example/cech_complex_example_from_points.cpp:36:59:   required from here
/CGAL-5.1/include/CGAL/NT_converter.h:33:16: error: invalid cast from type ‘const CGAL::Lazy_exact_nt<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >’ to type ‘float’
   33 |         return NT2(a);
      |                ^~~~~~
In file included from /CGAL-5.1/include/CGAL/NewKernel_d/KernelD_converter.h:20,
                 from /CGAL-5.1/include/CGAL/NewKernel_d/Cartesian_filter_K.h:16,
                 from /CGAL-5.1/include/CGAL/Epick_d.h:19,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Sphere_circumradius.h:14,
                 from /gudhi-devel/src/Cech_complex/include/gudhi/Cech_complex.h:15,
                 from /gudhi-devel/src/Cech_complex/utilities/cech_persistence.cpp:11:
/CGAL-5.1/include/CGAL/NT_converter.h: In instantiation of ‘NT2 CGAL::NT_converter<NT1, NT2>::operator()(const NT1&) const [with NT1 = CGAL::Lazy_exact_nt<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >; NT2 = float]’:
/gudhi-devel/src/Cech_complex/include/gudhi/Sphere_circumradius.h:49:32:   required from ‘Filtration_value Gudhi::cech_complex::Sphere_circumradius<Kernel, Filtration_value>::operator()(const Point&, const Point&) const [with Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>; Filtration_value = float; Gudhi::cech_complex::Sphere_circumradius<Kernel, Filtration_value>::Point = CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag> >]’
/gudhi-devel/src/common/include/gudhi/graph_simplicial_complex.h:79:21:   required from ‘Gudhi::Proximity_graph<SimplicialComplexForProximityGraph> Gudhi::compute_proximity_graph(const ForwardPointRange&, typename SimplicialComplexForProximityGraph::Filtration_value, Distance) [with SimplicialComplexForProximityGraph = Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_fast_persistence>; ForwardPointRange = std::vector<CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag> >, std::allocator<CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag> > > >; Distance = Gudhi::cech_complex::Sphere_circumradius<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>, float>; Gudhi::Proximity_graph<SimplicialComplexForProximityGraph> = boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<Gudhi::vertex_filtration_t, float, boost::no_property>, boost::property<Gudhi::edge_filtration_t, float, boost::no_property>, boost::no_property, boost::listS>; typename SimplicialComplexForProximityGraph::Filtration_value = float]’
/gudhi-devel/src/Cech_complex/include/gudhi/Cech_complex.h:76:91:   required from ‘Gudhi::cech_complex::Cech_complex<Kernel, SimplicialComplexForCechComplex>::Cech_complex(const InputPointRange&, Gudhi::cech_complex::Cech_complex<Kernel, SimplicialComplexForCechComplex>::Filtration_value, bool) [with InputPointRange = std::vector<CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag> >, std::allocator<CGAL::Wrap::Point_d<CGAL::Epeck_d<CGAL::Dynamic_dimension_tag> > > >; Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>; SimplicialComplexForCechComplex = Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_fast_persistence>; Gudhi::cech_complex::Cech_complex<Kernel, SimplicialComplexForCechComplex>::Filtration_value = float]’
/gudhi-devel/src/Cech_complex/utilities/cech_persistence.cpp:46:16:   required from ‘Simplex_tree create_simplex_tree(const string&, bool, Filtration_value, int) [with Kernel = CGAL::Epeck_d<CGAL::Dynamic_dimension_tag>; Simplex_tree = Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_fast_persistence>; std::string = std::__cxx11::basic_string<char>; Filtration_value = float]’
/gudhi-devel/src/Cech_complex/utilities/cech_persistence.cpp:78:40:   required from here
/CGAL-5.1/include/CGAL/NT_converter.h:33:16: error: invalid cast from type ‘const CGAL::Lazy_exact_nt<__gmp_expr<__mpq_struct [1], __mpq_struct [1]> >’ to type ‘float’
   33 |         return NT2(a);
      |                ^~~~~~
make[2]: *** [src/Cech_complex/example/CMakeFiles/Cech_complex_example_from_points.dir/build.make:76: src/Cech_complex/example/CMakeFiles/Cech_complex_example_from_points.dir/cech_complex_example_from_points.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3381: src/Cech_complex/example/CMakeFiles/Cech_complex_example_from_points.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [src/Cech_complex/utilities/CMakeFiles/cech_persistence.dir/build.make:76: src/Cech_complex/utilities/CMakeFiles/cech_persistence.dir/cech_persistence.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3433: src/Cech_complex/utilities/CMakeFiles/cech_persistence.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
@VincentRouvreau VincentRouvreau added bug Something isn't working wontfix This will not be worked on labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant