Page MenuHomePhabricator

[Newpyter] Can't install 'haven' package with conda R but can with system R
Closed, ResolvedPublicBUG REPORT

Description

Can't install haven package for R, which is a dependency for tidyverse package that we use for data wrangling. What's interesting here is the inconsistency in outcomes between conda and system R.

Note: Unlike T282260 this is consistent across stat100[45678].

system R

With /usr/bin/R (R version 3.5.2 (2018-12-20)

List of steps to reproduce:

  • R -> install.packages("haven")
  • It will ask about system library not being writable and ask if you want to use and create a personal library within your homedir instead. (yes, yes)
...
** installing vignettes
** testing if installed package can be loaded
* DONE (haven)

Yay!

conda R

With /usr/lib/anaconda-wmf/bin/R (R version 3.6.1 (2019-07-05))

List of steps to reproduce:

  • conda-create-stacked && source conda-activate-stacked
  • R -> install.packages("haven")
  • It will ask about system library not being writable and ask if you want to use and create a personal library within your homedir instead. (yes, yes)
...
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘haven’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/srv/home/bearloga/R/x86_64-conda_cos6-linux-gnu-library/3.6/00LOCK-haven/00new/haven/libs/haven.so':
  /srv/home/bearloga/R/x86_64-conda_cos6-linux-gnu-library/3.6/00LOCK-haven/00new/haven/libs/haven.so: undefined symbol: libiconv
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/srv/home/bearloga/R/x86_64-conda_cos6-linux-gnu-library/3.6/haven’

The downloaded source packages are in
	‘/tmp/RtmpNeew7x/downloaded_packages’
Warning message:
In install.packages("haven") :
  installation of package ‘haven’ had non-zero exit status

Boo :(

Event Timeline

Similarly as in T282260, I tested this out with R 3.6.1 too. The installation fails with the same error message that's reported.

Milimetric triaged this task as High priority.
Milimetric moved this task from Incoming to Operational Excellence on the Analytics board.
Milimetric added a project: Analytics-Kanban.

Thanks so much for figuring out the solution and documenting it so well, @Ottomata!