[R-sig-Debian] custom built R will not change BLAS/LAPACK with update-alternatives

Ramon Diaz-Uriarte rd|@z02 @end|ng |rom gm@||@com
Sat Dec 30 23:49:40 CET 2023


On Sat, 30-December-2023, at 22:45:12, Dirk Eddelbuettel <edd using debian.org> wrote:
> What blas/lapack -dev libraries do you installed when you build?  I varied
> this over the two+ decades for the Debian build but any consistent pair of
> LAPACK and BLAS should work. From the aforementioned build log:
>
> Get: 150 http://ftp.us.debian.org/debian sid/main amd64 libblas3 amd64 3.11.0-2 [149 kB]
> Get: 151 http://ftp.us.debian.org/debian sid/main amd64 libblas-dev amd64 3.11.0-2 [158 kB]
> [...]
> Get: 227 http://ftp.us.debian.org/debian sid/main amd64 liblapack3 amd64 3.11.0-2 [2323 kB]
> Get: 228 http://ftp.us.debian.org/debian sid/main amd64 liblapack-dev amd64 3.11.0-2 [4631 kB]
> [...]
> Setting up libblas3:amd64 (3.11.0-2) ...
> update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode
> [...]
> Setting up liblapack3:amd64 (3.11.0-2) ...
> update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode
>
> I use
>
>   libblas-dev, liblapack-dev
>
> as the Build-Depends in the chroot.  I think these are the generic one, they
> provide a fallback.

I have those same four.  But right now also atlas and openblas (and this in pthreads and openmp versions), and I don't build in a chroot (it is just for my own consumption).  So this is the source of the differences: these extra ones are picked (and then BLAS_LIBS set to "-lwhatever") before the generic ones.

Mystery solved :-)  

> (And run-time I think I am defaulting to OpenBLAS most of
> the time.)
>
>
> FWIW I always found
>
>   --with-blas="-lblas"
>   --with-lapack="-llapack"
>
> a little suspicious, but maybe that is just me if this works for you we are
> where we wanted to be and all is good?
>

All is good. (Just for the sake of curiosity, and if you have the time: why did you find those incantations suspicious?)

Thanks a lot again to both you and Ivan.

Best,

R.

> Dirk


-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-31
Facultad de Medicina 
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdiaz02 using gmail.com
       r.diaz using uam.es
       ramon.diaz using iib.uam.es

https://ligarto.org/rdiaz




More information about the R-SIG-Debian mailing list