m-jahn/WeightedTreemaps

R CMD CHECK warning "<mpfr.h> cannot be found and the GMP support in CGAL requires it."

Closed this issue · 2 comments

Hi @dickoa, I tested the installation without the Remotes: gitlab::dickoa/cgal4h link in DESCRIPTION and it worked just fine. However I noticed that travis CI threw a warning that I wasn't getting locally, but going back to a previous commit showed it was there already (on travis). The warning is related to a CGAL number type and it seems it doesn't find the following header file:

Found the following significant warnings:
warning "<mpfr.h> cannot be found and the GMP support in CGAL requires it. 
Less efficient number types will be used instead. Define CGAL_NO_GMP=1 if that is on purpose.

I'm making this a new issue because I didn't notice it before. But i's not related to installing cgal4h from CRAN so that went just fine. Do you have an idea how to fix that? I will try the recommended quick fix by adding -DCGAL_NO_GMP=1 to Makevars.

I'm also building a tool that rely on cgal4h and for the windows Makevars I added this my flags:

-DCGAL_DISABLE_GMP

Does -DCGAL_NO_GMP=1 also works ?

For Linux, I made a config file that check if gmp/mpfr are in the system and add the appropriate flags. I don't know how to do this in windows but I will keep you updated as soon as I find a solution. For the moment, I disabled GMP for windows build of my package prepr. You can have a look at my configure.ac and Makevars.in/Makevars.win.
Let me know if you find a good solution/tradeoff.

Best,

Thanks for your input! I tried the compiler option -DCGAL_NO_GMP=1 and it worked, see commit 3f6cf3b. I will keep your comment in mind when it comes to building on windows. Haven't tested that yet.