HectorRDB / condiments

Trajectory inference across multiple conditions with condiments: differential topology, progression, differentiation, and expression
https://hectorrdb.github.io/condiments/
Other
16 stars 1 forks source link

Compilation issue from wsl2 #1

Closed kmshort closed 3 years ago

kmshort commented 3 years ago

Hi HectorRDB,

I'm using WSL Ubuntu 21.04, with R4.1 RC compiled with znver3 optimisations using g++11.

I've used devtools::install_git("https://github.com/HectorRDB/condiments")

I've installed trajectory utils, tradeseq and slingshot without any problems (as well as many many many other R packages which are fine). However installing condiments I've come into an odd warning.

Much of the front half of the compilation works fine, but in the back half, I start getting odd errors, which all seem to involve "timedatectl".

For example, when 'recipes' is being installed, this happens:

* installing *source* package ‘recipes’ ...
** package ‘recipes’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Warning in system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Warning in system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
** testing if installed package can be loaded from final location
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Warning in system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1
** testing if installed package keeps a record of temporary installation path
* DONE (recipes)

When it's all finished and installed,

> library(condiments)
Warning message:
In system("timedatectl", intern = TRUE) :
  running command 'timedatectl' had status 1

I haven't yet actually tried to do anything meaningful, but I'm wondering if you might know what's going on here? I'm not sure what "systemd" should have to do with it?

many thanks, K

HectorRDB commented 3 years ago

Hi @kmshort I've never seen this and I am unsure what is happening. You can also try to install condiments from the devel branch of bioconductor? I would not be too worried about this though, it looks like it's related to differences between the internal time zones of your R session and your computer. If you want to insure there is no obvious issues, you can run the vignette and see if you can reproduce the results. Best

kmshort commented 3 years ago

Hi @HectorRDB

Indeed you are correct. If I first do Sys.setenv(TZ="Australia/Melbourne"), condiments does not complain. This is most odd - I wonder what part of condiments is causing this. I have found the root cause of it though, is that systemd is not the bootstrapper for loading the linux kernel in WSL2. The workaround for R is to set its own time environment as I've found above. So it seems as though a call to timedatectl is the culprit that's triggering the issue in R. This is interesting because in baseR, Sys.time() and Sys.date() report the current time and date without issue; so base R is more robust in that manner. It seems as though some improvement of timedatectl to not solely rely on systemd would be useful.

I went through your Description. It looks like it's coming from your Ecume dependency. Ecume uses library(caret). From there, it gets complicated.

I think the easiest workaround is just to set the environment time in R. Thanks @HectorRDB .

best regards, Kieran

HectorRDB commented 3 years ago

Thanks for doing an in-depth look!! I'm closing this issue but feel free to reopen if needed