[R-pkg-devel] Lapack: undefined symbol: zgbsv_

Ralf Stubner ralf.stubner at r-institute.com
Tue Dec 19 13:41:39 CET 2017

On 19.12.2017 09:38, Baptiste Auguie wrote:
> Thanks for the pointer to `arma::solve_opts::no_band`, it sounds like a
> good solution (assuming the compiler will then skip all the parts
> related to banded inversion routines). I've been unable to test it so
> far; I haven't managed to reproduce the error reported on CRAN on a mac.

Reproducing this error is not easy. I was able to do so using docker
as starting point. If you remove lines 30 and 97 (openblas-dev and
--with-blas), you can build a docker image with R included that uses the
BLAS and LAPACK supplied by R.

I have given this a try and installing 'cda' in such a image does indeed
reproduce the error. Unfortunately adding 'arma::solve_opts::no_band' to
the two places where arma::solve is used did not help in my tests :-(

> The 'crippled Lapack' macro was useful as a workaround in the past but
> I'm not sure of its exact mode of operation so I'm reluctant to set
> something to "cripple" the code (does it target only those routines that
> are found missing, or is it more of a blanket switch with no fine-tuning?).

I think it is a blanket switch that will affect also those methods that
where already added in the past. So this would be only a temporary
solution, but I think that's what you need right now.

BTW, setting ARMA_CRIPPLED_LAPACK is more difficult than I thought since
it is #undefed in the RcppArmadillo-Config. Short of editing that file,
you can add this to src/Makevars


I hope there is a better way ...


Ralf Stubner
Senior Software Engineer / Trainer

R Institute GmbH
Dortustraße 48
14467 Potsdam

T: +49 331 23 70 81 66
F: +49 331 23 70 81 67
M: +49 162 20 91 196

Mail: ralf.stubner at r-institute.com

Sitz: Potsdam
Register: AG Potsdam HRB 27966 P
Ust.-IdNr.: DE300072622
Geschäftsführer: Prof. Dr. Dr. Karl-Kuno Kunze

More information about the R-package-devel mailing list