Description of problem: While working on python-graph-tool, I found that CGAL detection was broken. I looked into the details and found that there was a new compiler error due to the interaction between CGAL and mpfr-4.1.1-1. Version-Release number of selected component (if applicable): CGAL-5.5.1-1.fc38 How reproducible: Steps to Reproduce: 1. mock -r fedora-rawhide-x86_64 --enablerepo=local -i CGAL-devel gcc-c++ 2. mock -r fedora-rawhide-x86_64 --shell 3. echo '#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>' > foo.cc 4. g++ -c foo.cc Actual results: In file included from /usr/include/CGAL/boost_mp.h:54, from /usr/include/CGAL/Number_types/internal/Exact_type_selector.h:27, from /usr/include/CGAL/Exact_kernel_selector.h:26, from /usr/include/CGAL/Filtered_kernel.h:22, from /usr/include/CGAL/Exact_predicates_inexact_constructions_kernel.h:21, from foo.cc:1: /usr/include/CGAL/GMP/Gmpfr_type.h: In constructor ‘CGAL::Gmpfr::Gmpfr(mpfr_srcptr)’: /usr/include/CGAL/GMP/Gmpfr_type.h:199:25: error: invalid conversion from ‘mpfr_srcptr’ {aka ‘const __mpfr_struct*’} to ‘mpfr_ptr’ {aka ‘__mpfr_struct*’} [-fpermissive] 199 | mpfr_custom_get_kind(f), | ^ | | | mpfr_srcptr {aka const __mpfr_struct*} /usr/include/CGAL/GMP/Gmpfr_type.h: In constructor ‘CGAL::Gmpfr::Gmpfr(mpfr_srcptr, std::float_round_style, Precision_type)’: /usr/include/CGAL/GMP/Gmpfr_type.h:216:33: error: invalid conversion from ‘mpfr_srcptr’ {aka ‘const __mpfr_struct*’} to ‘mpfr_ptr’ {aka ‘__mpfr_struct*’} [-fpermissive] 216 | mpfr_custom_get_kind(f), | ^ | | | mpfr_srcptr {aka const __mpfr_struct*} /usr/include/CGAL/GMP/Gmpfr_type.h: In constructor ‘CGAL::Gmpfr::Gmpfr(mpfr_srcptr, Precision_type)’: /usr/include/CGAL/GMP/Gmpfr_type.h:237:33: error: invalid conversion from ‘mpfr_srcptr’ {aka ‘const __mpfr_struct*’} to ‘mpfr_ptr’ {aka ‘__mpfr_struct*’} [-fpermissive] 237 | mpfr_custom_get_kind(f), | ^ | | | mpfr_srcptr {aka const __mpfr_struct*} Expected results: (compiles without error, emitting foo.o, as on F37) Additional info: I can work around this in python-graph-tool by adding -fpermissive to the CPPFLAGS.
We also have an upstream issue: https://github.com/CGAL/cgal/issues/7064. It is said that is an issue of MPFR itself.
Thanks for finding the upstream issue. Looks like it was reported upstream to CGAL at almost the same time I reported it downstream here.
See also the upstream bug (MPFR): https://gitlab.inria.fr/mpfr/mpfr/-/issues/1
Things are progressing. The upstream MPFR team has issued a patch (see the Bugs section of https://www.mpfr.org/mpfr-4.1.1/#bugs), and I reported bug #2147377. Now, mpfr in Fedora Rawhide (f38) has been rebuild with the patch: https://bodhi.fedoraproject.org/updates/FEDORA-2022-7f5a496474 Ben, can you confirm that new build of mpfr solves the issue you got with python-graph-tool?
(In reply to Laurent Rineau from comment #4) > Ben, can you confirm that new build of mpfr solves the issue you got with > python-graph-tool? I just kicked off a local test-rebuild, and it was able to detect CGAL without -fpermissive, so it looks like the problem is solved. It will take a few hours to complete a full rebuild without -fpermissive, but I don’t expect I will encounter any further problems. Thanks!