R package compilation problem due to LAPACK on Ubuntu 20.04 after upgrade from 18.04

322 views Asked by At

I have upgraded Ubuntu from 18.04 to 20.04 and now some of my R packages fail to compile/load. One example is shown below:

** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for 'myPackage' in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/00LOCK-my_package/00new/myPackage/libs/myPackage.so':
  /usr/local/lib/R/site-library/00LOCK-my_package/00new/myPackge/libs/myPackage.so: undefined symbol: dgesvx_
Error: loading failed
Execution halted
ERROR: loading failed

This dgesvx_ looks like a LAPACK problem (https://www.netlib.org/lapack/explore-html/d7/d3b/group__double_g_esolve_ga9d90ccf6e340cacd08b7bbbb502ceb21.html#ga9d90ccf6e340cacd08b7bbbb502ceb21).

And I have latest LAPACK version available in Ubuntu 20.04 installed (3.9.0-1build1).

What can I do here to resolve the problem?

My sessionInfo():

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2   
0

There are 0 answers