Thank you!
Installing openblas and then using ./configure --without-lapack --with-blas
--enable-R-shlib
..got everything working. Does this need reporting upstream as a bug in R or
lapack? I'm good now, but it might help others to get this fixed.
Simon.
-----Original Message-----
From: Ivan Krylov <ikrylov at disroot.org>
Sent: 08 May 2024 20:05
To: Simon Andrews <simon.andrews at babraham.ac.uk>
Cc: Simon Andrews via R-help <r-help at r-project.org>; Miguel Esteva
<esteva.m at wehi.edu.au>
Subject: Re: [R] Compilation problems with R4.4.0
? Wed, 8 May 2024 16:59:25 +0000
Simon Andrews <simon.andrews at babraham.ac.uk> ?????:
> The lapack libraries are:
>
> $ rpm -qa | grep lapack
> lapack-3.9.0-10.el9.x86_64
> lapack64_-3.9.0-10.el9.x86_64
> lapack64-3.9.0-10.el9.x86_64
> lapack-devel-3.9.0-10.el9.x86_64
Thanks for this information! I figured out I needed to enable the
"PowerTools/CRB" repo, installed lapack-devel from there, and now I
get the same configure output and the same crash: by linking with R's
built-in Rblas but and system-provided LAPACK-3.9.0.
If I configure --without-lapack, i.e. use both Rblas and R-provided functions
from LAPACK up to 3.12.0, the build doesn't crash.
If I try to enable --with-blas=-lblas, here's what happens:
configure:47862: checking whether double complex BLAS can be used
configure:47946: result: no
The test compares the result of the BLAS function zdotu with the manually
computed vector norm for a complex vector [*]. In this case, the Fortran program
thinks that the BLAS returns a zero instead of the correct answer, thus failing
the test and refusing to compile with system BLAS.
I think that you somehow stumbled upon a Fortran ABI incompatibility regarding
passing complex numbers between the Fortran code compiled during R build and the
BLAS and LAPACK provided in the PowerTools/CRB repo. I don't know what
exactly is the problem, but at least --without-lapack is an easy workaround
without any cost in performance.
In fact, if you install openblas-devel and configure --with-blas (to replace
Rblas with OpenBLAS), the double complex BLAS test will pass, the build
won't crash, and you will get even better performance.
--
Best regards,
Ivan
[*] https://stat.ethz.ch/pipermail/r-devel/2024-March/083302.html
------------------------------------
This email has been scanned for spam & viruses. If you believe this email
should have been stopped by our filters, click the following link to report it
(https://portal-uk.mailanyone.net/index.html#/outer/reportspam?token=dXNlcj1zaW1vbi5hbmRyZXdzQGJhYnJhaGFtLmFjLnVrO3RzPTE3MTUxOTUxMjQ7dXVpZD02NjNCQ0NGMzA1RDJGMzA3RDhDMjIxQTZCRUE3MEQ3MDt0b2tlbj0yZTdkOWY0ZjNjZmQ2NGQyZGFlMmYwZjQ2MTk5NjdmODk2ZDM3YjQyOw%3D%3D).