tdhock / data.table-revdeps

0 stars 1 forks source link

actel check lacks gWidgets2tcltk (DISPLAY not set) #8

Closed tdhock closed 8 months ago

tdhock commented 8 months ago
* installing *source* package 'gWidgets2tcltk' ...
** package 'gWidgets2tcltk' successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Warning message:
no DISPLAY variable so Tk is not available 
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : 
  [tcl] invalid command name "font".

Error: unable to load R code in package 'gWidgets2tcltk'
Execution halted
ERROR: lazy loading failed for package 'gWidgets2tcltk'
* removing '/tmp/th798/7296922/R-4.3.2/5/library/gWidgets2tcltk'
tdhock commented 8 months ago

This works if DISPLAY is set to a valid value, different error if set to a bogus value.

th798@cn49:/tmp/th798/7299995/RtmphTBFpn/downloaded_packages$ ~/R/R-devel/bin/R -e 'install.packages("gWidgets2tcltk")'

R Under development (unstable) (2024-01-17 r85813) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("gWidgets2tcltk")
also installing the dependency ‘gWidgets2’

trying URL 'http://cloud.r-project.org/src/contrib/gWidgets2_1.0-9.tar.gz'
Content type 'application/x-gzip' length 415364 bytes (405 KB)
==================================================
downloaded 405 KB

trying URL 'http://cloud.r-project.org/src/contrib/gWidgets2tcltk_1.0-8.tar.gz'
Content type 'application/x-gzip' length 511003 bytes (499 KB)
==================================================
downloaded 499 KB

* installing *source* package ‘gWidgets2’ ...
** package ‘gWidgets2’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gWidgets2)
* installing *source* package ‘gWidgets2tcltk’ ...
** package ‘gWidgets2tcltk’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gWidgets2tcltk)

The downloaded source packages are in
    ‘/tmp/th798/7299995/Rtmpi1mci4/downloaded_packages’
> 
> 
th798@cn49:/tmp/th798/7299995/RtmphTBFpn/downloaded_packages$ DISPLAY= ~/R/R-devel/bin/R -e 'install.packages("gWidgets2tcltk")'

R Under development (unstable) (2024-01-17 r85813) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("gWidgets2tcltk")
trying URL 'http://cloud.r-project.org/src/contrib/gWidgets2tcltk_1.0-8.tar.gz'
Content type 'application/x-gzip' length 511003 bytes (499 KB)
==================================================
downloaded 499 KB

* installing *source* package ‘gWidgets2tcltk’ ...
** package ‘gWidgets2tcltk’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Warning message:
no DISPLAY variable so Tk is not available 
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : 
  [tcl] invalid command name "font".

Error: unable to load R code in package ‘gWidgets2tcltk’
Execution halted
ERROR: lazy loading failed for package ‘gWidgets2tcltk’
* removing ‘/projects/genomic-ml/R/R-devel/library/gWidgets2tcltk’
* restoring previous ‘/projects/genomic-ml/R/R-devel/library/gWidgets2tcltk’

The downloaded source packages are in
    ‘/tmp/th798/7299995/RtmpQgm8bg/downloaded_packages’
Warning message:
In install.packages("gWidgets2tcltk") :
  installation of package ‘gWidgets2tcltk’ had non-zero exit status
> 
> 
th798@cn49:/tmp/th798/7299995/RtmphTBFpn/downloaded_packages$ echo $DISPLAY
172.16.2.21:12.0
th798@cn49:/tmp/th798/7299995/RtmphTBFpn/downloaded_packages$ DISPLAY=foo ~/R/R-devel/bin/R -e 'install.packages("gWidgets2tcltk")'

R Under development (unstable) (2024-01-17 r85813) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("gWidgets2tcltk")
trying URL 'http://cloud.r-project.org/src/contrib/gWidgets2tcltk_1.0-8.tar.gz'
Content type 'application/x-gzip' length 511003 bytes (499 KB)
==================================================
downloaded 499 KB

* installing *source* package ‘gWidgets2tcltk’ ...
** package ‘gWidgets2tcltk’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
Warning message:
In fun(libname, pkgname) : couldn't connect to display "foo"
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : 
  [tcl] invalid command name "font".

Error: unable to load R code in package ‘gWidgets2tcltk’
Execution halted
ERROR: lazy loading failed for package ‘gWidgets2tcltk’
* removing ‘/projects/genomic-ml/R/R-devel/library/gWidgets2tcltk’
* restoring previous ‘/projects/genomic-ml/R/R-devel/library/gWidgets2tcltk’

The downloaded source packages are in
    ‘/tmp/th798/7299995/Rtmp1koKnA/downloaded_packages’
Warning message:
In install.packages("gWidgets2tcltk") :
  installation of package ‘gWidgets2tcltk’ had non-zero exit status
> 
jverzani commented 8 months ago

I wish I could help, but I can't replicate the issue. If you do find some solution (maybe just load tcltk first?) a PR to https://github.com/gwidgets3/gWidgets2tcltk would be quite welcom.

tdhock commented 8 months ago

I see something similar when checking RcmdrPlugin.RiskDemo

> system(paste(c("diff -u", Rcheck.list), collapse=" "))
--- R_version_4.3.2_2023-10-31/release_1.14.10.Rcheck/00check.log   2024-01-28 04:27:54.184787663 -0700
+++ R_version_4.3.2_2023-10-31/master_1.14.99.6f43a96ad478e02a48f61939e0c0d3047e949353.Rcheck/00check.log   2024-01-28 04:30:11.064001698 -0700
@@ -20,6 +20,8 @@
 * checking whether package 'RcmdrPlugin.RiskDemo' can be installed ... WARNING
 Found the following significant warnings:
   Warning: no DISPLAY variable so Tk is not available
+  Warning: replacing previous import 'zoo::yearmon' by 'data.table::yearmon' when loading 'RcmdrPlugin.RiskDemo'
+  Warning: replacing previous import 'zoo::yearqtr' by 'data.table::yearqtr' when loading 'RcmdrPlugin.RiskDemo'
 See '/tmp/th798/7398642/R-4.3.2/1046/RcmdrPlugin.RiskDemo.Rcheck/00install.out' for details.
 * checking installed package size ... OK
 * checking package directory ... OK

output above says that checking using both versions of data.table give WARNING for whether the pkg can be installed, so no difference in check result. But actually using master there are two additional Warnings about import zoo replace (this is a false negative).

both issues could be fixed if we set DISPLAY somehow, I will ask our cluster admins if that is possible, seems like it should be https://slurm.schedmd.com/faq.html#x11

tdhock commented 8 months ago

related https://lists.schedmd.com/pipermail/slurm-users/2018-November/002347.html says

In both modes of access we ensure DISPLAY is set in a form that is network accessible within the cluster. ie not localhost:NN With ssh this is done with the sshd_config X11UseLocalHost=no option.

With DISPLAY set to a network accessible form and an xauth entry in the home directory, batch processes can access DISPLAY as long as the DISPLAY variable is passed into the job.

No plugin, no compiled in support in slurm.

Note that DISPLAY is not in a form immediately accessible outside the cluster (not fqdn of the external interface) and we have various firewalls in place.

tdhock commented 8 months ago

this works with xvfb-run, see below

th798@wind:~$ srun -G 1 xvfb-run ~/R/R-4.3.2/bin/R -e 'install.packages("gWidgets2tcltk")'

R version 4.3.2 (2023-10-31) -- "Eye Holes"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages("gWidgets2tcltk")
trying URL 'http://cloud.r-project.org/src/contrib/gWidgets2tcltk_1.0-8.tar.gz'
Content type 'application/x-gzip' length 511003 bytes (499 KB)
==================================================
downloaded 499 KB

* installing *source* package ‘gWidgets2tcltk’ ...
** package ‘gWidgets2tcltk’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gWidgets2tcltk)

The downloaded source packages are in
        ‘/tmp/th798/7429739/RtmpYKPIa7/downloaded_packages’
>
>

https://anaconda.org/anaconda/xorg-x11-server-xvfb-cos6-x86_64 may be able to provide xvfb-run? anyway Monsoon admins said they would install xvfb-run on compute nodes.

tdhock commented 8 months ago

should be fixed by https://github.com/tdhock/data.table-revdeps/commit/2711571035d6b48ea83019f3fee54a5d75f2fe66 now that xvfb-run is installed on all compute nodes.

jverzani commented 8 months ago

Thanks for figuring this out.