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

Compilation failure with CGAL <5.5 when compiling with clang #14322

Closed
tamiko opened this issue Sep 28, 2022 · 2 comments · Fixed by #14325
Closed

Compilation failure with CGAL <5.5 when compiling with clang #14322

tamiko opened this issue Sep 28, 2022 · 2 comments · Fixed by #14325
Milestone

Comments

@tamiko
Copy link
Member

tamiko commented Sep 28, 2022

I am not sure there is much we can do about this one. But compiling deal.II with clang against CGAL versions prior to 5.5 fails:

/usr/include/CGAL/Intersections_3/internal/Tetrahedron_3_Bounded_3_do_intersect.h:55:23: error: call to 'do_intersect' is ambiguous
    const Boolean b = do_intersect(tr,
                      ^~~~~~~~~~~~
/usr/include/CGAL/Intersections_3/internal/Tetrahedron_3_Triangle_3_do_intersect.h:36:10: note: in instantiation of function template specialization 'CGAL::Intersections::internal::do_intersect_tetrahedron_bounded<CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::Triangle_3<CGAL::Simple_cartesian<CGAL::Mpzf>>>' requested here
  return do_intersect_tetrahedron_bounded(tr, tet, tr[0], k);
         ^
/usr/include/CGAL/Kernel/function_objects.h:3031:39: note: in instantiation of function template specialization 'CGAL::Intersections::internal::do_intersect<CGAL::Simple_cartesian<CGAL::Mpzf>>' requested here
    { return Intersections::internal::do_intersect(t1, t2, K()); }
                                      ^
/usr/include/CGAL/Filtered_predicate.h:111:12: note: in instantiation of function template specialization 'CGAL::CommonKernelFunctors::Do_intersect_3<CGAL::Simple_cartesian<CGAL::Mpzf>>::operator()<CGAL::Tetrahedron_3<CGAL::Simple_cartesian<CGAL::Mpzf>>, CGAL::Triangle_3<CGAL::Simple_cartesian<CGAL::Mpzf>>>' requested here
    return ep(c2e(args)...);
           ^
/usr/include/CGAL/Static_filtered_predicate.h:52:12: note: in instantiation of function template specialization 'CGAL::Filtered_predicate<CGAL::CommonKernelFunctors::Do_intersect_3<CGAL::Simple_cartesian<CGAL::Mpzf>>, CGAL::CommonKernelFunctors::Do_intersect_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false>>>, CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Mpzf>, CGAL::NT_converter<double, CGAL::Mpzf>>, CGAL::Cartesian_converter<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>, CGAL::Simple_cartesian<CGAL::Interval_nt<false>>, CGAL::NT_converter<double, CGAL::Interval_nt<false>>>, true>::operator()<CGAL::Tetrahedron_3<CGAL::Epick>, CGAL::Triangle_3<CGAL::Epick>>' requested here
    return epicp(aa1.first, aa2.first);
           ^
/usr/include/CGAL/Intersections_3/Tetrahedron_3_Triangle_3.h:32:1: note: in instantiation of function template specialization 'CGAL::Static_filtered_predicate<CGAL::Simple_cartesian<CGAL::Interval_nt<false>>, CGAL::Filtered_predicate<CGAL::CommonKernelFunctors::Do_intersect_3<CGAL::Simple_cartesian<boost::multiprecision::number<boost::multiprecision::backends::gmp_rational, boost::multiprecision::et_on>>>, CGAL::CommonKernelFunctors::Do_intersect_3<CGAL::Simple_cartesian<CGAL::Interval_nt<false>>>, CGAL::Exact_converter<CGAL::Epeck, CGAL::Simple_cartesian<boost::multiprecision::number<boost::multiprecision::backends::gmp_rational, boost::multiprecision::et_on>>>, CGAL::Approx_converter<CGAL::Epeck, CGAL::Simple_cartesian<CGAL::Interval_nt<false>>>, true>, CGAL::internal::Static_filters_predicates::Do_intersect_3<CGAL::Filtered_kernel_base<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>>, CGAL::internal::Static_filters<CGAL::Filtered_kernel_base<CGAL::Type_equality_wrapper<CGAL::Cartesian_base_no_ref_count<double, CGAL::Epick>, CGAL::Epick>>>>>::operator()<CGAL::Tetrahedron_3<CGAL::Epeck>, CGAL::Triangle_3<CGAL::Epeck>>' requested here
CGAL_DO_INTERSECT_FUNCTION(Tetrahedron_3, Triangle_3, 3)
^
/usr/include/CGAL/Intersection_traits.h:66:25: note: expanded from macro 'CGAL_DO_INTERSECT_FUNCTION'
    return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \
                        ^
/home/tamiko/workspace/dealii/source/cgal/intersections.cc:558:23: note: in instantiation of function template specialization 'CGAL::do_intersect<CGAL::Epeck>' requested here
            if (CGAL::do_intersect(tet, tria_quad.triangle(f)))
                      ^
/usr/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h:180:1: note: candidate function [with K = CGAL::Simple_cartesian<CGAL::Mpzf>]
do_intersect(const typename K::Triangle_3& t1,
^
/usr/include/CGAL/Boolean_set_operations_2/do_intersect.h:239:13: note: candidate function [with InputIterator = CGAL::Triangle_3<CGAL::Simple_cartesian<CGAL::Mpzf>>, Traits = const CGAL::Simple_cartesian<CGAL::Mpzf>]
inline bool do_intersect(InputIterator begin, InputIterator end, Traits& traits,
            ^

This is fixed in the newest version (5.5)

@tamiko tamiko added this to the Release 9.5 milestone Sep 28, 2022
@fdrmrc
Copy link
Contributor

fdrmrc commented Sep 29, 2022

Thanks for this check and the other patches. There's only one function triggering this (so far). It is compute_intersection_of_cells() and it requires versions >= 5.1.5.

# if DEAL_II_CGAL_VERSION_GTE(5, 1, 5)

In 9.5, we could directly require CGAL versions >= 5.5.x for this routine(s).

@luca-heltai
Copy link
Member

If this does not compile with CGAL < 5.5, let's just update the requirement. This is not even in 9.4, so we can be very liberal in changing compatibilities....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants