[R] Compilation problems with R4.4.0
Ivan Krylov
|kry|ov @end|ng |rom d|@root@org
Wed May 8 21:05:15 CEST 2024
В Wed, 8 May 2024 16:59:25 +0000
Simon Andrews <simon.andrews using 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
More information about the R-help
mailing list