easybuilders / easybuild-easyconfigs

A collection of easyconfig files that describe which software to build using which build options with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
380 stars 703 forks source link

Bioconductor build can be broken by ~/.Rprofile #4636

Open verdurin opened 7 years ago

verdurin commented 7 years ago

Building Bioconductor 3.5 I saw this error with the Gviz extension:

* installing *source* package ‘Gviz’ ...
** R
** data
** inst
** preparing package for lazy loading
Warning in device.call(...) :
  unable to open connection to X11 display ''
Error in .External2(C_X11, d$display, d$width, d$height, d$pointsize,  : 
  unable to start device X11cairo
Error : unable to load R code in package 'Gviz'
ERROR: lazy loading failed for package 'Gviz'

I have a setting in ~/.Rprofile to use Cairo with X11.

Is it expected that X11 forwarding must be available to build this extension?

verdurin commented 7 years ago

If I commented out everything in ~/.Rprofile, the build succeeded, including Gviz.

boegel commented 7 years ago

@verdurin Can you show the contents you had in ~/.Rprofile?

How can we make R more robust against ~/.Rprofile? See also https://github.com/hpcugent/easybuild-easyblocks/issues/867?

verdurin commented 7 years ago

@boegel here's what I had:

setHook(packageEvent("grDevices", "onLoad"),
function(...) grDevices::X11.options(type='cairo'))
options(device='x11')

which may be imperfect, but it does fix a problem with fonts that was reported locally.

As I said in the earlier report, it's probably cleaner and simpler just to refuse to build if a non-empty ~/.Rprofile exists.

serverhorror commented 7 years ago

Try with R --vanilla .... That should ignore any user settings.