r-lib/svglite

Generate better error messages when unable to install.

barrel0luck opened this issue · 1 comments

svglite cannot get installed on R 4.0 (especially if you'd previously installed libraries of R 3.6.x)
The problem is with gdtools.

At least for other packages a warning message is thrown out saying so and so package was installed with the older version of R, please re-install it (which by the way for the love of God that I don't believe in, I don't understand why R can't install on its own).

Such an error message is not thrown out by the failed installation of svglite.

After fiddling with it for a while I noticed that the error was with gdtools.

devSVG.cpp:20:10: fatal error: gdtools.h: No such file or directory
   20 | #include <gdtools.h>

I don't know WTH gdtools is, but as a hail mary I install.packages("gdtools") after which gdtools got installed after which install.packages("svglite") worked perfectly.

So a better error message or warning will help big time here.

All of this is outside what a package can do as it is all orchestrated by the R build system, so while I can empathise with your issue there is nothing that svglite can do about this